| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ | |
| 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" | |
| 12 | |
| 13 @class ToolbarActionsBarBubbleMac; | |
| 14 | |
| 15 namespace extensions { | |
| 16 class ExtensionMessageBubbleController; | |
| 17 } | |
| 18 | |
| 19 // A bridge between an ExtensionMessageBubbleController and a | |
| 20 // ToolbarActionsBarBubble. | |
| 21 class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate { | |
| 22 public: | |
| 23 ExtensionMessageBubbleBridge( | |
| 24 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller, | |
| 25 bool anchored_to_extension); | |
| 26 ~ExtensionMessageBubbleBridge() override; | |
| 27 | |
| 28 private: | |
| 29 // ToolbarActionsBarBubbleDelegate: | |
| 30 base::string16 GetHeadingText() override; | |
| 31 base::string16 GetBodyText() override; | |
| 32 base::string16 GetItemListText() override; | |
| 33 base::string16 GetActionButtonText() override; | |
| 34 base::string16 GetDismissButtonText() override; | |
| 35 base::string16 GetLearnMoreButtonText() override; | |
| 36 std::string GetAnchorActionId() override; | |
| 37 void OnBubbleShown() override; | |
| 38 void OnBubbleClosed(CloseAction action) override; | |
| 39 | |
| 40 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_; | |
| 41 | |
| 42 // True if the bubble is anchored to an extension action. | |
| 43 bool anchored_to_extension_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge); | |
| 46 }; | |
| 47 | |
| 48 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_ | |
| OLD | NEW |