| 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_APP_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // A menu model that builds the contents of an encoding menu. | 78 // A menu model that builds the contents of an encoding menu. |
| 79 class EncodingMenuModel : public ui::SimpleMenuModel, | 79 class EncodingMenuModel : public ui::SimpleMenuModel, |
| 80 public ui::SimpleMenuModel::Delegate { | 80 public ui::SimpleMenuModel::Delegate { |
| 81 public: | 81 public: |
| 82 explicit EncodingMenuModel(Browser* browser); | 82 explicit EncodingMenuModel(Browser* browser); |
| 83 ~EncodingMenuModel() override; | 83 ~EncodingMenuModel() override; |
| 84 | 84 |
| 85 // Overridden from ui::SimpleMenuModel::Delegate: | 85 // Overridden from ui::SimpleMenuModel::Delegate: |
| 86 bool IsCommandIdChecked(int command_id) const override; | 86 bool IsCommandIdChecked(int command_id) const override; |
| 87 bool IsCommandIdEnabled(int command_id) const override; | 87 bool IsCommandIdEnabled(int command_id) const override; |
| 88 bool GetAcceleratorForCommandId(int command_id, | |
| 89 ui::Accelerator* accelerator) const override; | |
| 90 void ExecuteCommand(int command_id, int event_flags) override; | 88 void ExecuteCommand(int command_id, int event_flags) override; |
| 91 | 89 |
| 92 private: | 90 private: |
| 93 void Build(); | 91 void Build(); |
| 94 | 92 |
| 95 Browser* browser_; // weak | 93 Browser* browser_; // weak |
| 96 | 94 |
| 97 DISALLOW_COPY_AND_ASSIGN(EncodingMenuModel); | 95 DISALLOW_COPY_AND_ASSIGN(EncodingMenuModel); |
| 98 }; | 96 }; |
| 99 | 97 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 Browser* browser_; // weak | 245 Browser* browser_; // weak |
| 248 | 246 |
| 249 std::unique_ptr<content::HostZoomMap::Subscription> | 247 std::unique_ptr<content::HostZoomMap::Subscription> |
| 250 browser_zoom_subscription_; | 248 browser_zoom_subscription_; |
| 251 content::NotificationRegistrar registrar_; | 249 content::NotificationRegistrar registrar_; |
| 252 | 250 |
| 253 DISALLOW_COPY_AND_ASSIGN(AppMenuModel); | 251 DISALLOW_COPY_AND_ASSIGN(AppMenuModel); |
| 254 }; | 252 }; |
| 255 | 253 |
| 256 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ | 254 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ |
| OLD | NEW |