Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm

Issue 7599029: Grab bag of bugfixes for Lion fullscreen mode. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add comment for InstantLoader. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
}

Powered by Google App Engine
This is Rietveld 408576698