diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index 1763262..8e14a50 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -204,6 +204,13 @@ class PrefObserverBridge : public NotificationObserver { context:context]; } +// Called when the user hits the escape key. Closes the window. This will +// automatically abandon/cancel any in-progress edits in text fields, we don't +// have to do anything special. +- (void)cancel:(id)sender { + [window performClose:self]; +} + // Record the user performed a certain action and save the preferences. - (void)recordUserAction:(const wchar_t*)action { UserMetrics::RecordComputedAction(action, profile_); |