Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_TOOLBAR_WRENCH_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 | 123 |
| 124 // A menu model that builds the contents of the wrench menu. | 124 // A menu model that builds the contents of the wrench menu. |
| 125 class WrenchMenuModel : public ui::SimpleMenuModel, | 125 class WrenchMenuModel : public ui::SimpleMenuModel, |
| 126 public ui::SimpleMenuModel::Delegate, | 126 public ui::SimpleMenuModel::Delegate, |
| 127 public ui::ButtonMenuItemModel::Delegate, | 127 public ui::ButtonMenuItemModel::Delegate, |
| 128 public TabStripModelObserver, | 128 public TabStripModelObserver, |
| 129 public content::NotificationObserver { | 129 public content::NotificationObserver { |
| 130 public: | 130 public: |
| 131 // Range of command ID's to use for the items representing bookmarks in the | 131 // Range of command ID's to use for the items representing bookmarks in the |
| 132 // bookmark menu, must not overlap with that for recent tabs submenu. | 132 // bookmark menu, must not overlap with that for recent tabs submenu. |
| 133 static const int kMinBookmarkCommandId = 1; | 133 // NOTE: this starts at 0xF000 as Chrome does not assign any ids in that |
| 134 static const int kMaxBookmarkCommandId = 1000; | 134 // range. ids >= 0xF000 are problematic if exposed to Windows, but these |
| 135 // ids aren't exposed to the system. | |
|
Peter Kasting
2015/03/25 21:31:29
Is it possible to define these values in chrome/ap
sky
2015/03/30 20:46:35
Done.
| |
| 136 static const int kMinBookmarkCommandId = 0xF000; | |
| 137 static const int kMaxBookmarkCommandId = 0xF000 + 10000; | |
|
Peter Kasting
2015/03/25 21:31:29
Can this use kMinBookmarkCommandId instead of repe
sky
2015/03/30 20:46:35
I've nuked the defines here entirely.
| |
| 135 | 138 |
| 136 // Range of command ID's to use for the items in the recent tabs submenu, must | 139 // Range of command ID's to use for the items in the recent tabs submenu, must |
| 137 // not overlap with that for bookmarks. | 140 // not overlap with that for bookmarks. |
| 138 static const int kMinRecentTabsCommandId = 1001; | 141 static const int kMinRecentTabsCommandId = 1001; |
| 139 static const int kMaxRecentTabsCommandId = 1200; | 142 static const int kMaxRecentTabsCommandId = 1200; |
| 140 | 143 |
| 141 WrenchMenuModel(ui::AcceleratorProvider* provider, Browser* browser); | 144 WrenchMenuModel(ui::AcceleratorProvider* provider, Browser* browser); |
| 142 ~WrenchMenuModel() override; | 145 ~WrenchMenuModel() override; |
| 143 | 146 |
| 144 // Overridden for ButtonMenuItemModel::Delegate: | 147 // Overridden for ButtonMenuItemModel::Delegate: |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 Browser* browser_; // weak | 253 Browser* browser_; // weak |
| 251 TabStripModel* tab_strip_model_; // weak | 254 TabStripModel* tab_strip_model_; // weak |
| 252 | 255 |
| 253 scoped_ptr<content::HostZoomMap::Subscription> browser_zoom_subscription_; | 256 scoped_ptr<content::HostZoomMap::Subscription> browser_zoom_subscription_; |
| 254 content::NotificationRegistrar registrar_; | 257 content::NotificationRegistrar registrar_; |
| 255 | 258 |
| 256 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 259 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 257 }; | 260 }; |
| 258 | 261 |
| 259 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 262 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |