Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/ui/extensions/extension_message_bubble_bridge.h

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" 11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 class Extension;
14 class ExtensionMessageBubbleController; 15 class ExtensionMessageBubbleController;
15 } 16 }
16 17
17 // A bridge between an ExtensionMessageBubbleController and a 18 // A bridge between an ExtensionMessageBubbleController and a
18 // ToolbarActionsBarBubble. 19 // ToolbarActionsBarBubble.
19 class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate { 20 class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate {
20 public: 21 public:
21 explicit ExtensionMessageBubbleBridge( 22 explicit ExtensionMessageBubbleBridge(
22 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller); 23 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller);
23 ~ExtensionMessageBubbleBridge() override; 24 ~ExtensionMessageBubbleBridge() override;
24 25
25 private: 26 private:
26 // ToolbarActionsBarBubbleDelegate: 27 // ToolbarActionsBarBubbleDelegate:
27 bool ShouldShow() override; 28 bool ShouldShow() override;
28 bool ShouldCloseOnDeactivate() override; 29 bool ShouldCloseOnDeactivate() override;
30 bool IsPolicyIndicationNeeded(const extensions::Extension* extension);
29 base::string16 GetHeadingText() override; 31 base::string16 GetHeadingText() override;
30 base::string16 GetBodyText(bool anchored_to_action) override; 32 base::string16 GetBodyText(bool anchored_to_action) override;
31 base::string16 GetItemListText() override; 33 base::string16 GetItemListText() override;
32 base::string16 GetActionButtonText() override; 34 base::string16 GetActionButtonText() override;
33 base::string16 GetDismissButtonText() override; 35 base::string16 GetDismissButtonText() override;
34 base::string16 GetLearnMoreButtonText() override; 36 base::string16 GetLearnMoreButtonText() override;
37 std::unique_ptr<ExtraViewInfo> GetExtraViewInfo() override;
35 std::string GetAnchorActionId() override; 38 std::string GetAnchorActionId() override;
36 void OnBubbleShown() override; 39 void OnBubbleShown() override;
37 void OnBubbleClosed(CloseAction action) override; 40 void OnBubbleClosed(CloseAction action) override;
38 41
39 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_; 42 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge); 44 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge);
42 }; 45 };
43 46
44 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ 47 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698