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

Side by Side Diff: chrome/browser/ui/views/action_box_menu.h

Issue 10905296: Adjusted action box menu position relative to omnibox and action box menu button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
6 #define CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 class ActionBoxMenu : public views::MenuDelegate, 27 class ActionBoxMenu : public views::MenuDelegate,
28 public BrowserActionView::Delegate, 28 public BrowserActionView::Delegate,
29 public content::NotificationObserver { 29 public content::NotificationObserver {
30 public: 30 public:
31 ActionBoxMenu(Browser* browser, ActionBoxMenuModel* model); 31 ActionBoxMenu(Browser* browser, ActionBoxMenuModel* model);
32 virtual ~ActionBoxMenu(); 32 virtual ~ActionBoxMenu();
33 33
34 void Init(); 34 void Init();
35 35
36 // Shows the menu relative to the specified button. 36 // Shows the menu relative to the specified button.
37 void RunMenu(views::MenuButton* menu_button); 37 void RunMenu(views::MenuButton* menu_button, gfx::Point menu_offset);
38 38
39 private: 39 private:
40 // Overridden from views::MenuDelegate: 40 // Overridden from views::MenuDelegate:
41 virtual void ExecuteCommand(int id) OVERRIDE; 41 virtual void ExecuteCommand(int id) OVERRIDE;
42 virtual views::Border* CreateMenuBorder() OVERRIDE; 42 virtual views::Border* CreateMenuBorder() OVERRIDE;
43 virtual views::Background* CreateMenuBackground() OVERRIDE; 43 virtual views::Background* CreateMenuBackground() OVERRIDE;
44 44
45 // Overridden from BrowserActionView::Delegate and DragController overrides: 45 // Overridden from BrowserActionView::Delegate and DragController overrides:
46 virtual void InspectPopup(ExtensionAction* button) OVERRIDE; 46 virtual void InspectPopup(ExtensionAction* button) OVERRIDE;
47 virtual int GetCurrentTabId() const OVERRIDE; 47 virtual int GetCurrentTabId() const OVERRIDE;
(...skipping 26 matching lines...) Expand all
74 74
75 scoped_ptr<views::MenuRunner> menu_runner_; 75 scoped_ptr<views::MenuRunner> menu_runner_;
76 76
77 // The model that tracks the order of the toolbar icons. 77 // The model that tracks the order of the toolbar icons.
78 ActionBoxMenuModel* model_; 78 ActionBoxMenuModel* model_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(ActionBoxMenu); 80 DISALLOW_COPY_AND_ASSIGN(ActionBoxMenu);
81 }; 81 };
82 82
83 #endif // CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_ 83 #endif // CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/action_box_menu.cc » ('j') | chrome/browser/ui/views/action_box_menu.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698