OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
6 #define CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
7 | 7 |
8 #include "chrome/views/chrome_menu.h" | 8 #include "chrome/views/chrome_menu.h" |
9 #include "chrome/browser/views/bookmark_bar_view.h" | 9 #include "chrome/browser/views/bookmark_bar_view.h" |
10 #include "webkit/glue/window_open_disposition.h" | 10 #include "webkit/glue/window_open_disposition.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual void ModelChanged(); | 36 virtual void ModelChanged(); |
37 | 37 |
38 // Returns the menu. | 38 // Returns the menu. |
39 ChromeViews::MenuItemView* menu() { return &menu_; } | 39 ChromeViews::MenuItemView* menu() { return &menu_; } |
40 | 40 |
41 // Menu::Delegate methods. | 41 // Menu::Delegate methods. |
42 virtual void ExecuteCommand(int id); | 42 virtual void ExecuteCommand(int id); |
43 virtual bool IsItemChecked(int id) const; | 43 virtual bool IsItemChecked(int id) const; |
44 virtual bool IsCommandEnabled(int id) const; | 44 virtual bool IsCommandEnabled(int id) const; |
45 | 45 |
46 // IDs used for the menus. Public for testing. | |
47 static const int always_show_command_id; | |
48 static const int open_bookmark_id; | |
49 static const int open_bookmark_in_new_window_id; | |
50 static const int open_bookmark_in_new_tab_id; | |
51 static const int open_all_bookmarks_id; | |
52 static const int open_all_bookmarks_in_new_window_id; | |
53 static const int edit_bookmark_id; | |
54 static const int delete_bookmark_id; | |
55 static const int add_bookmark_id; | |
56 static const int new_folder_id; | |
57 | |
58 private: | 46 private: |
59 // Returns the parent node and visual_order to use when adding new | 47 // Returns the parent node and visual_order to use when adding new |
60 // bookmarks/folders. | 48 // bookmarks/folders. |
61 BookmarkNode* GetParentAndVisualOrderForNewNode(int* visual_order); | 49 BookmarkNode* GetParentAndVisualOrderForNewNode(int* visual_order); |
62 | 50 |
63 ChromeViews::MenuItemView menu_; | 51 ChromeViews::MenuItemView menu_; |
64 BookmarkBarView* view_; | 52 BookmarkBarView* view_; |
65 BookmarkNode* node_; | 53 BookmarkNode* node_; |
66 | 54 |
67 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarContextMenuController); | 55 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarContextMenuController); |
68 }; | 56 }; |
69 | 57 |
70 #endif // CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 58 #endif // CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
71 | 59 |
OLD | NEW |