diff options
Diffstat (limited to 'chrome/browser/ui/cocoa/confirm_quit_panel_controller.h')
-rw-r--r-- | chrome/browser/ui/cocoa/confirm_quit_panel_controller.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.h b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.h index be56941..8a1816d 100644 --- a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.h +++ b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.h @@ -12,6 +12,26 @@ @class ConfirmQuitFrameView; +namespace confirm_quit { + +enum ConfirmQuitMetric { + // The user quit without having the feature enabled. + kNoConfirm = 0, + // The user held Cmd+Q for the entire duration. + kHoldDuration, + // The user hit Cmd+Q twice for the accelerated path. + kDoubleTap, + // The user tapped Cmd+Q once and then held it. + kTapHold, + + kSampleCount +}; + +// Records the histogram value for the above metric. +void RecordHistogram(ConfirmQuitMetric sample); + +} // namespace confirm_quit + // The ConfirmQuitPanelController manages the black HUD window that tells users // to "Hold Cmd+Q to Quit". @interface ConfirmQuitPanelController : NSWindowController<NSWindowDelegate> { @@ -42,10 +62,13 @@ // Returns the Accelerator for the Quit menu item. + (ui::AcceleratorCocoa)quitAccelerator; +// Returns a string representation fit for display of |+quitAccelerator|. ++ (NSString*)keyCommandString; + @end @interface ConfirmQuitPanelController (UnitTesting) -- (NSString*)keyCombinationForAccelerator:(const ui::AcceleratorCocoa&)item; ++ (NSString*)keyCombinationForAccelerator:(const ui::AcceleratorCocoa&)item; @end #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_PANEL_CONTROLLER_H_ |