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

Unified Diff: chrome/browser/ui/views/action_box_menu.h

Issue 12095023: Allow platform apps to add themselves to the Action Box. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use raw pointer + IconImage signature changed Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/toolbar/action_box_menu_model.cc ('k') | chrome/browser/ui/views/action_box_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/action_box_menu.h
diff --git a/chrome/browser/ui/views/action_box_menu.h b/chrome/browser/ui/views/action_box_menu.h
index 4df47886e3a92d36d86f1be272b1735479e4f1f8..2838ecab34f151bea8a3a72e5604bed0ba2f1dae 100644
--- a/chrome/browser/ui/views/action_box_menu.h
+++ b/chrome/browser/ui/views/action_box_menu.h
@@ -5,32 +5,23 @@
#ifndef CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
#define CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
-#include <map>
-
#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "chrome/browser/ui/views/browser_action_view.h"
#include "ui/views/controls/menu/menu_delegate.h"
-class ActionBoxButtonController;
class ActionBoxMenuModel;
+class Profile;
namespace views {
-class Background;
-class Border;
-class MenuItemView;
+class MenuButton;
class MenuRunner;
-class View;
}
// ActionBoxMenu adapts the ActionBoxMenuModel to view's menu related classes.
-class ActionBoxMenu : public views::MenuDelegate,
- public BrowserActionView::Delegate {
+class ActionBoxMenu : public views::MenuDelegate {
public:
// Constructs and initializes an ActionBoxMenu.
- static scoped_ptr<ActionBoxMenu> Create(
- Browser* browser,
- scoped_ptr<ActionBoxMenuModel> model);
+ static scoped_ptr<ActionBoxMenu> Create(Profile* profile,
+ scoped_ptr<ActionBoxMenuModel> model);
virtual ~ActionBoxMenu();
@@ -38,32 +29,15 @@ class ActionBoxMenu : public views::MenuDelegate,
void RunMenu(views::MenuButton* menu_button, gfx::Point menu_offset);
private:
- ActionBoxMenu(Browser* browser, scoped_ptr<ActionBoxMenuModel> model);
+ ActionBoxMenu(Profile* profile, scoped_ptr<ActionBoxMenuModel> model);
// Overridden from views::MenuDelegate:
virtual void ExecuteCommand(int id) OVERRIDE;
- // Overridden from BrowserActionView::Delegate and DragController overrides:
- virtual void InspectPopup(ExtensionAction* button) OVERRIDE;
- virtual int GetCurrentTabId() const OVERRIDE;
- virtual void OnBrowserActionExecuted(BrowserActionButton* button) OVERRIDE;
- virtual void OnBrowserActionVisibilityChanged() OVERRIDE;
- virtual gfx::Point GetViewContentOffset() const OVERRIDE;
- virtual bool NeedToShowMultipleIconStates() const OVERRIDE;
- virtual bool NeedToShowTooltip() const OVERRIDE;
- virtual void WriteDragDataForView(views::View* sender,
- const gfx::Point& press_pt,
- ui::OSExchangeData* data) OVERRIDE;
- virtual int GetDragOperationsForView(views::View* sender,
- const gfx::Point& p) OVERRIDE;
- virtual bool CanStartDragForView(views::View* sender,
- const gfx::Point& press_pt,
- const gfx::Point& p) OVERRIDE;
-
// Populates |root_| with all the child menu items from the |model_|.
void PopulateMenu();
- Browser* browser_;
+ Profile* profile_;
scoped_ptr<views::MenuRunner> menu_runner_;
« no previous file with comments | « chrome/browser/ui/toolbar/action_box_menu_model.cc ('k') | chrome/browser/ui/views/action_box_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698