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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 179 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
180 | 180 |
181 bool ShouldShowNewIncognitoWindowMenuItem(); | 181 bool ShouldShowNewIncognitoWindowMenuItem(); |
182 | 182 |
183 // Called when a command is selected. | 183 // Called when a command is selected. |
184 // Logs UMA metrics about which command was chosen and how long the user | 184 // Logs UMA metrics about which command was chosen and how long the user |
185 // took to select the command. | 185 // took to select the command. |
186 void LogMenuMetrics(int command_id); | 186 void LogMenuMetrics(int command_id); |
187 | 187 |
188 // Helper function to record the menu action in a UMA histogram. | 188 // Helper function to record the menu action in a UMA histogram. |
189 void LogMenuAction(int action_id); | 189 void LogMenuAction(AppMenuAction action_id); |
190 | 190 |
191 // Time menu has been open. Used by LogMenuMetrics() to record the time | 191 // Time menu has been open. Used by LogMenuMetrics() to record the time |
192 // to action when the user selects a menu item. | 192 // to action when the user selects a menu item. |
193 base::ElapsedTimer timer_; | 193 base::ElapsedTimer timer_; |
194 | 194 |
195 // Whether a UMA menu action has been recorded since the menu is open. | 195 // Whether a UMA menu action has been recorded since the menu is open. |
196 // Only the first time to action is recorded since some commands | 196 // Only the first time to action is recorded since some commands |
197 // (zoom controls) don't dimiss the menu. | 197 // (zoom controls) don't dimiss the menu. |
198 bool uma_action_recorded_; | 198 bool uma_action_recorded_; |
199 | 199 |
(...skipping 23 matching lines...) Expand all Loading... |
223 Browser* browser_; // weak | 223 Browser* browser_; // weak |
224 | 224 |
225 std::unique_ptr<content::HostZoomMap::Subscription> | 225 std::unique_ptr<content::HostZoomMap::Subscription> |
226 browser_zoom_subscription_; | 226 browser_zoom_subscription_; |
227 content::NotificationRegistrar registrar_; | 227 content::NotificationRegistrar registrar_; |
228 | 228 |
229 DISALLOW_COPY_AND_ASSIGN(AppMenuModel); | 229 DISALLOW_COPY_AND_ASSIGN(AppMenuModel); |
230 }; | 230 }; |
231 | 231 |
232 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ | 232 #endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_ |
OLD | NEW |