summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 16:34:43 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 16:34:43 +0000
commite90eca1550812bb5694c9523ffc75963c845d46d (patch)
tree285f0916c80f573274940f96538ae16823f5fc40
parent1e5babb0c100f18e2f0b67c3709d5b6981ebf537 (diff)
downloadchromium_src-e90eca1550812bb5694c9523ffc75963c845d46d.zip
chromium_src-e90eca1550812bb5694c9523ffc75963c845d46d.tar.gz
chromium_src-e90eca1550812bb5694c9523ffc75963c845d46d.tar.bz2
Mac: make Esc close the Search Engines dialog.
BUG=24494 TEST=Open Preferences... -> Basics -> Manage; Search Engines dialog box pops up; press Esc; Search Engines dialog box should close. Review URL: http://codereview.chromium.org/650114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39557 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/keyword_editor_cocoa_controller.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/keyword_editor_cocoa_controller.mm b/chrome/browser/cocoa/keyword_editor_cocoa_controller.mm
index c5dc4ec..b64ad25 100644
--- a/chrome/browser/cocoa/keyword_editor_cocoa_controller.mm
+++ b/chrome/browser/cocoa/keyword_editor_cocoa_controller.mm
@@ -4,12 +4,13 @@
#import <Cocoa/Cocoa.h>
+#import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h"
+
#import "base/mac_util.h"
#include "base/singleton.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
#import "chrome/browser/cocoa/edit_search_engine_cocoa_controller.h"
-#import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h"
#import "chrome/browser/cocoa/window_size_autosaver.h"
#include "chrome/browser/pref_service.h"
#include "chrome/browser/profile.h"
@@ -255,6 +256,11 @@ typedef std::map<Profile*,KeywordEditorCocoaController*> ProfileControllerMap;
controller_->MakeDefaultTemplateURL(row);
}
+// Called when the user hits the escape key. Closes the window.
+- (void)cancel:(id)sender {
+ [[self window] performClose:self];
+}
+
// Table View Data Source -----------------------------------------------------
- (NSInteger)numberOfRowsInTableView:(NSTableView*)table {