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

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

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 7 years, 6 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/views/controls/menu/menu_delegate.h" 9 #include "ui/views/controls/menu/menu_delegate.h"
10 10
(...skipping 20 matching lines...) Expand all
31 void RunMenu(views::MenuButton* menu_button, gfx::Point menu_offset); 31 void RunMenu(views::MenuButton* menu_button, gfx::Point menu_offset);
32 32
33 private: 33 private:
34 ActionBoxMenu(Browser* browser, scoped_ptr<ActionBoxMenuModel> model); 34 ActionBoxMenu(Browser* browser, scoped_ptr<ActionBoxMenuModel> model);
35 35
36 // Overridden from views::MenuDelegate: 36 // Overridden from views::MenuDelegate:
37 virtual void ExecuteCommand(int id) OVERRIDE; 37 virtual void ExecuteCommand(int id) OVERRIDE;
38 virtual bool ShowContextMenu(views::MenuItemView* source, 38 virtual bool ShowContextMenu(views::MenuItemView* source,
39 int id, 39 int id,
40 const gfx::Point& p, 40 const gfx::Point& p,
41 bool is_mouse_gesture) OVERRIDE; 41 ui::MenuSourceType source_type) OVERRIDE;
42 42
43 // Populates |root_| with all the child menu items from the |model_|. 43 // Populates |root_| with all the child menu items from the |model_|.
44 void PopulateMenu(); 44 void PopulateMenu();
45 45
46 Browser* browser_; 46 Browser* browser_;
47 47
48 scoped_ptr<ActionBoxContextMenu> context_menu_; 48 scoped_ptr<ActionBoxContextMenu> context_menu_;
49 scoped_ptr<views::MenuRunner> menu_runner_; 49 scoped_ptr<views::MenuRunner> menu_runner_;
50 views::Widget* menu_parent_; 50 views::Widget* menu_parent_;
51 51
52 // The model that tracks the order of the toolbar icons. 52 // The model that tracks the order of the toolbar icons.
53 scoped_ptr<ActionBoxMenuModel> model_; 53 scoped_ptr<ActionBoxMenuModel> model_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(ActionBoxMenu); 55 DISALLOW_COPY_AND_ASSIGN(ActionBoxMenu);
56 }; 56 };
57 57
58 #endif // CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_ 58 #endif // CHROME_BROWSER_UI_VIEWS_ACTION_BOX_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698