blob: 5a12ab690c950bc2d0a6806487c4256f4d54b6e0 [file] [log] [blame]
rdevlin.cronin690e44f2015-11-06 00:27:141// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_EXTENSIONS_PROXY_OVERRIDDEN_BUBBLE_DELEGATE_H_
6#define CHROME_BROWSER_EXTENSIONS_PROXY_OVERRIDDEN_BUBBLE_DELEGATE_H_
7
avia2f4804a2015-12-24 23:11:138#include <stddef.h>
9
rdevlin.cronin690e44f2015-11-06 00:27:1410#include <string>
11
12#include "base/macros.h"
13#include "chrome/browser/extensions/extension_message_bubble_controller.h"
14
rdevlin.cronin690e44f2015-11-06 00:27:1415namespace extensions {
16
17class ProxyOverriddenBubbleDelegate
18 : public ExtensionMessageBubbleController::Delegate {
19 public:
20 explicit ProxyOverriddenBubbleDelegate(Profile* profile);
21 ~ProxyOverriddenBubbleDelegate() override;
22
23 // ExtensionMessageBubbleController::Delegate methods.
24 bool ShouldIncludeExtension(const Extension* extension) override;
25 void AcknowledgeExtension(
26 const std::string& extension_id,
27 ExtensionMessageBubbleController::BubbleAction user_action) override;
28 void PerformAction(const ExtensionIdList& list) override;
29 base::string16 GetTitle() const override;
30 base::string16 GetMessageBody(bool anchored_to_browser_action,
31 int extension_count) const override;
32 base::string16 GetOverflowText(
33 const base::string16& overflow_count) const override;
34 GURL GetLearnMoreUrl() const override;
35 base::string16 GetActionButtonLabel() const override;
36 base::string16 GetDismissButtonLabel() const override;
37 bool ShouldCloseOnDeactivate() const override;
rdevlin.cronincf27f866a2017-02-01 16:34:3938 bool ShouldAcknowledgeOnDeactivate() const override;
Catherine Mullings478a0432017-11-22 07:06:0639 bool ShouldShow(const ExtensionIdList& extensions) const override;
40 void OnShown(const ExtensionIdList& extensions) override;
41 void OnAction() override;
42 void ClearProfileSetForTesting() override;
rdevlin.cronin690e44f2015-11-06 00:27:1443 bool ShouldShowExtensionList() const override;
44 bool ShouldHighlightExtensions() const override;
45 bool ShouldLimitToEnabledExtensions() const override;
46 void LogExtensionCount(size_t count) override;
47 void LogAction(ExtensionMessageBubbleController::BubbleAction) override;
catmullings22bc2372016-11-02 19:59:3548 bool SupportsPolicyIndicator() override;
rdevlin.cronin690e44f2015-11-06 00:27:1449
50 private:
Catherine Mullings478a0432017-11-22 07:06:0651 Profile* profile_;
52
rdevlin.cronin690e44f2015-11-06 00:27:1453 // The ID of the extension we are showing the bubble for.
54 std::string extension_id_;
55
56 DISALLOW_COPY_AND_ASSIGN(ProxyOverriddenBubbleDelegate);
57};
58
59} // namespace extensions
60
61#endif // CHROME_BROWSER_EXTENSIONS_PROXY_OVERRIDDEN_BUBBLE_DELEGATE_H_