OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_VIEWS_BOOKMARK_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_CONTEXT_MENU_H_ |
7 | 7 |
8 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" | 8 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" |
9 #include "views/controls/menu/chrome_menu.h" | 9 #include "views/controls/menu/chrome_menu.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // Shows the context menu at the specified point. | 23 // Shows the context menu at the specified point. |
24 void RunMenuAt(const gfx::Point& point); | 24 void RunMenuAt(const gfx::Point& point); |
25 | 25 |
26 views::MenuItemView* menu() const { return menu_.get(); } | 26 views::MenuItemView* menu() const { return menu_.get(); } |
27 | 27 |
28 // Overridden from views::MenuDelegate: | 28 // Overridden from views::MenuDelegate: |
29 virtual void ExecuteCommand(int command_id); | 29 virtual void ExecuteCommand(int command_id); |
30 virtual bool IsItemChecked(int command_id) const; | 30 virtual bool IsItemChecked(int command_id) const; |
31 virtual bool IsCommandEnabled(int command_id) const; | 31 virtual bool IsCommandEnabled(int command_id) const; |
32 | 32 |
33 // Overridden from BookmarkContextMenuControllerDelegate: | 33 // Overridden from BookmarkContextMenuControllerDelegate: |
34 virtual void CloseMenu(); | 34 virtual void CloseMenu(); |
35 virtual void AddItem(int command_id); | 35 virtual void AddItem(int command_id); |
36 virtual void AddItemWithStringId(int command_id, int string_id); | 36 virtual void AddItemWithStringId(int command_id, int string_id); |
37 virtual void AddSeparator(); | 37 virtual void AddSeparator(); |
38 virtual void AddCheckboxItem(int command_id); | 38 virtual void AddCheckboxItem(int command_id); |
39 | 39 |
40 private: | 40 private: |
41 | |
42 scoped_ptr<BookmarkContextMenuController> controller_; | 41 scoped_ptr<BookmarkContextMenuController> controller_; |
43 | 42 |
44 // The window used to parent dialog boxes opened from the context menu. | 43 // The parent of dialog boxes opened from the context menu. |
45 gfx::NativeWindow parent_window_; | 44 gfx::NativeView parent_window_; |
46 | 45 |
47 // The menu itself. | 46 // The menu itself. |
48 scoped_ptr<views::MenuItemView> menu_; | 47 scoped_ptr<views::MenuItemView> menu_; |
49 | 48 |
50 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); | 49 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); |
51 }; | 50 }; |
52 | 51 |
53 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_CONTEXT_MENU_H_ | 52 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_CONTEXT_MENU_H_ |
OLD | NEW |