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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/extensions/extension_message_bubble_bridge.h
diff --git a/chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h b/chrome/browser/ui/extensions/extension_message_bubble_bridge.h
similarity index 70%
rename from chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h
rename to chrome/browser/ui/extensions/extension_message_bubble_bridge.h
index 638aa6676212f8a391c4216ad289fb0fafb6a3ff..51b2bc604b70140b1ef864a35b2d2a6e9a6947c8 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_message_bubble_bridge.h
+++ b/chrome/browser/ui/extensions/extension_message_bubble_bridge.h
@@ -2,16 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
-#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
+#ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
+#define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
#include <memory>
#include "base/macros.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
-@class ToolbarActionsBarBubbleMac;
-
namespace extensions {
class ExtensionMessageBubbleController;
}
@@ -20,15 +18,16 @@ class ExtensionMessageBubbleController;
// ToolbarActionsBarBubble.
class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate {
public:
- ExtensionMessageBubbleBridge(
- std::unique_ptr<extensions::ExtensionMessageBubbleController> controller,
- bool anchored_to_extension);
+ explicit ExtensionMessageBubbleBridge(
+ std::unique_ptr<extensions::ExtensionMessageBubbleController> controller);
~ExtensionMessageBubbleBridge() override;
private:
// ToolbarActionsBarBubbleDelegate:
+ bool ShouldShow() override;
+ bool ShouldCloseOnDeactivate() override;
base::string16 GetHeadingText() override;
- base::string16 GetBodyText() override;
+ base::string16 GetBodyText(bool anchored_to_action) override;
base::string16 GetItemListText() override;
base::string16 GetActionButtonText() override;
base::string16 GetDismissButtonText() override;
@@ -36,13 +35,11 @@ class ExtensionMessageBubbleBridge : public ToolbarActionsBarBubbleDelegate {
std::string GetAnchorActionId() override;
void OnBubbleShown() override;
void OnBubbleClosed(CloseAction action) override;
+ bool IsExtensionMessageBubble() override;
std::unique_ptr<extensions::ExtensionMessageBubbleController> controller_;
- // True if the bubble is anchored to an extension action.
- bool anchored_to_extension_;
-
DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleBridge);
};
-#endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_
+#endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698