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

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

Issue 1858773006: [Extensions UI] Use the ExtensionMessageBubbleBridge for Views platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_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 @class ToolbarActionsBarBubbleMac;
14
15 namespace extensions { 13 namespace extensions {
16 class ExtensionMessageBubbleController; 14 class ExtensionMessageBubbleController;
17 } 15 }
18 16
19 // A bridge between an ExtensionMessageBubbleController and a 17 // A bridge between an ExtensionMessageBubbleController and a
20 // ToolbarActionsBarBubble. 18 // ToolbarActionsBarBubble.
21 class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate { 19 class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate {
22 public: 20 public:
23 ExtensionMessageBubbleBridge( 21 explicit ExtensionMessageBubbleBridge(
24 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller, 22 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller);
25 bool anchored_to_extension);
26 ~ExtensionMessageBubbleBridge() override; 23 ~ExtensionMessageBubbleBridge() override;
27 24
28 private: 25 private:
29 // ToolbarActionsBarBubbleDelegate: 26 // ToolbarActionsBarBubbleDelegate:
27 bool ShouldShow() override;
28 bool ShouldCloseOnDeactivate() override;
30 base::string16 GetHeadingText() override; 29 base::string16 GetHeadingText() override;
31 base::string16 GetBodyText() override; 30 base::string16 GetBodyText(bool anchored_to_action) override;
32 base::string16 GetItemListText() override; 31 base::string16 GetItemListText() override;
33 base::string16 GetActionButtonText() override; 32 base::string16 GetActionButtonText() override;
34 base::string16 GetDismissButtonText() override; 33 base::string16 GetDismissButtonText() override;
35 base::string16 GetLearnMoreButtonText() override; 34 base::string16 GetLearnMoreButtonText() override;
36 std::string GetAnchorActionId() override; 35 std::string GetAnchorActionId() override;
37 void OnBubbleShown() override; 36 void OnBubbleShown() override;
38 void OnBubbleClosed(CloseAction action) override; 37 void OnBubbleClosed(CloseAction action) override;
38 bool IsExtensionMessageBubble() override;
39 39
40 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_; 40 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_;
41 41
42 // True if the bubble is anchored to an extension action.
43 bool anchored_to_extension_;
44
45 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge); 42 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge);
46 }; 43 };
47 44
48 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ 45 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698