Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
index 30d2f598da30cabc50ebed3f3f82695b6a4122c6..75baf03d5ab0d38d0ff3595386a942cfaa053bf8 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
@@ -4,6 +4,7 @@ |
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h" |
+#include "base/mac/mac_util.h" |
#include "base/string_util.h" |
#include "base/sys_string_conversions.h" |
#include "chrome/app/chrome_command_ids.h" // IDC_* |
@@ -398,12 +399,19 @@ BOOL ThePasteboardIsTooDamnBig() { |
} |
// If the escape key was pressed and no revert happened and we're in |
- // fullscreen mode, make it resign key. |
+ // presentaion mode, make the window resign key. If we're in Lion full-screen |
+ // mode, Esc should toggle out of fullscreen. |
Mark Mentovai
2011/08/09 16:41:15
So the idea is that in presentation mode, we take
rohitrao (ping after 24h)
2011/08/09 16:46:23
That's the other part of the equation, and once th
Mark Mentovai
2011/08/09 16:48:52
Seems like if we’re going to make enough Esc keypr
|
if (cmd == @selector(cancelOperation:)) { |
BrowserWindowController* windowController = |
[BrowserWindowController browserWindowControllerForView:self]; |
if ([windowController inPresentationMode]) { |
[windowController focusTabContents]; |
+ textChangedByKeyEvents_ = NO; |
+ return; |
+ } else if ([windowController isFullscreen] && |
+ base::mac::IsOSLionOrLater()) { |
+ [windowController setFullscreen:NO]; |
+ textChangedByKeyEvents_ = NO; |
return; |
} |
} |