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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h

Issue 670463004: Make a platform-independent ToolbarActionViewController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h b/chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h
similarity index 66%
rename from chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h
rename to chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h
index 733b0315a9213ab789df47d4098a842a4f2e709f..a9374773acf654926ad0f1c92e8a47729d29dafa 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_
-#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_
+#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_
+#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_
-namespace content {
-class WebContents;
-}
+#include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h"
namespace views {
class FocusManager;
@@ -16,12 +14,8 @@ class View;
class Widget;
}
-class ToolbarActionViewController;
-
-// The view that surrounds an ToolbarAction and owns the
-// ToolbarActionViewController. Since different actions can subclass
-// different views, we don't derive views::View directly here.
-class ToolbarActionViewDelegate {
+// The views-specific methods necessary for a ToolbarActionViewDelegate.
+class ToolbarActionViewDelegateViews : public ToolbarActionViewDelegate {
public:
// Returns |this| as a view. We need this because our subclasses implement
// different kinds of views, and inheriting View here is a really bad idea.
@@ -36,11 +30,6 @@ class ToolbarActionViewDelegate {
// Returns the parent for the associated context menu.
virtual views::Widget* GetParentForContextMenu() = 0;
- // In some cases (such as when an action is shown in a menu), a substitute
- // ToolbarActionViewController should be used for showing popups. This
- // returns the preferred control.
- virtual ToolbarActionViewController* GetPreferredPopupViewController() = 0;
-
// Returns the reference view for the extension action's popup.
virtual views::View* GetReferenceViewForPopup() = 0;
@@ -48,15 +37,9 @@ class ToolbarActionViewDelegate {
// allows views code to update the pressed state of the button).
virtual views::MenuButton* GetContextMenuButton() = 0;
- // Returns the current web contents.
- virtual content::WebContents* GetCurrentWebContents() const = 0;
-
// Hides whatever popup is active (even if it's not this one).
virtual void HideActivePopup() = 0;
- // Called when the icon is updated; this is forwarded from the icon factory.
- virtual void OnIconUpdated() = 0;
-
// Called when a popup is shown. See ExecuteAction() for the definition of
// |grant_tab_permissions|.
virtual void OnPopupShown(bool grant_tab_permissions) {}
@@ -65,7 +48,7 @@ class ToolbarActionViewDelegate {
virtual void CleanupPopup() {}
protected:
- virtual ~ToolbarActionViewDelegate() {}
+ virtual ~ToolbarActionViewDelegateViews() {}
};
-#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_H_
+#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_DELEGATE_VIEWS_H_
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698