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

Side by Side Diff: chrome/browser/ui/cocoa/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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698