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

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

Issue 11298004: alternate ntp: add "Recent Tabs" submenu to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased to resolve conflicts Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_WRENCH_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_
6 #define CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // BaseBookmarkModelObserver overrides: 89 // BaseBookmarkModelObserver overrides:
90 virtual void BookmarkModelChanged() OVERRIDE; 90 virtual void BookmarkModelChanged() OVERRIDE;
91 91
92 // content::NotificationObserver overrides: 92 // content::NotificationObserver overrides:
93 virtual void Observe(int type, 93 virtual void Observe(int type,
94 const content::NotificationSource& source, 94 const content::NotificationSource& source,
95 const content::NotificationDetails& details) OVERRIDE; 95 const content::NotificationDetails& details) OVERRIDE;
96 96
97 private: 97 private:
98 class CutCopyPasteView; 98 class CutCopyPasteView;
99 class RecentTabsMenuModelDelegate;
99 class ZoomView; 100 class ZoomView;
100 101
101 typedef std::pair<ui::MenuModel*,int> Entry; 102 typedef std::pair<ui::MenuModel*,int> Entry;
102 typedef std::map<int,Entry> IDToEntry; 103 typedef std::map<int,Entry> IDToEntry;
103 104
104 // Populates |parent| with all the child menus in |model|. Recursively invokes 105 // Populates |parent| with all the child menus in |model|. Recursively invokes
105 // |PopulateMenu| for any submenu. |next_id| is incremented for every menu 106 // |PopulateMenu| for any submenu. |next_id| is incremented for every menu
106 // that is created. 107 // that is created.
107 void PopulateMenu(views::MenuItemView* parent, 108 void PopulateMenu(views::MenuItemView* parent,
108 ui::MenuModel* model, 109 ui::MenuModel* model,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 154
154 // Used for managing the bookmark menu items. 155 // Used for managing the bookmark menu items.
155 scoped_ptr<BookmarkMenuDelegate> bookmark_menu_delegate_; 156 scoped_ptr<BookmarkMenuDelegate> bookmark_menu_delegate_;
156 157
157 // Menu corresponding to IDC_BOOKMARKS_MENU. 158 // Menu corresponding to IDC_BOOKMARKS_MENU.
158 views::MenuItemView* bookmark_menu_; 159 views::MenuItemView* bookmark_menu_;
159 160
160 // Menu corresponding to IDC_FEEDBACK. 161 // Menu corresponding to IDC_FEEDBACK.
161 views::MenuItemView* feedback_menu_item_; 162 views::MenuItemView* feedback_menu_item_;
162 163
164 // Used for managing "Recent tabs" menu items.
165 scoped_ptr<RecentTabsMenuModelDelegate> recent_tabs_menu_model_delegate_;
166
163 // ID to use for the items representing bookmarks in the bookmark menu. 167 // ID to use for the items representing bookmarks in the bookmark menu.
164 int first_bookmark_command_id_; 168 int first_bookmark_command_id_;
165 169
166 content::NotificationRegistrar registrar_; 170 content::NotificationRegistrar registrar_;
167 171
168 const bool use_new_menu_; 172 const bool use_new_menu_;
169 173
170 const bool supports_new_separators_; 174 const bool supports_new_separators_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(WrenchMenu); 176 DISALLOW_COPY_AND_ASSIGN(WrenchMenu);
173 }; 177 };
174 178
175 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ 179 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698