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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm

Issue 493143004: mac: Major fullscreen refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests. Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h" 5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" // IDC_* 9 #include "chrome/app/chrome_command_ids.h" // IDC_*
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 textChangedByKeyEvents_ = NO; 479 textChangedByKeyEvents_ = NO;
480 return; 480 return;
481 } 481 }
482 482
483 // If the escape key was pressed and no revert happened and we're in 483 // If the escape key was pressed and no revert happened and we're in
484 // fullscreen mode, give focus to the web contents, which may dismiss the 484 // fullscreen mode, give focus to the web contents, which may dismiss the
485 // overlay. 485 // overlay.
486 if (cmd == @selector(cancelOperation:)) { 486 if (cmd == @selector(cancelOperation:)) {
487 BrowserWindowController* windowController = 487 BrowserWindowController* windowController =
488 [BrowserWindowController browserWindowControllerForView:self]; 488 [BrowserWindowController browserWindowControllerForView:self];
489 if ([windowController isFullscreen]) { 489 if ([windowController isInAnyFullscreenMode]) {
490 [windowController focusTabContents]; 490 [windowController focusTabContents];
491 textChangedByKeyEvents_ = NO; 491 textChangedByKeyEvents_ = NO;
492 return; 492 return;
493 } 493 }
494 } 494 }
495 495
496 [super doCommandBySelector:cmd]; 496 [super doCommandBySelector:cmd];
497 } 497 }
498 498
499 - (void)setAttributedString:(NSAttributedString*)aString { 499 - (void)setAttributedString:(NSAttributedString*)aString {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 [super drawRect:rect]; 542 [super drawRect:rect];
543 autocomplete_text_field::DrawGrayTextAutocompletion( 543 autocomplete_text_field::DrawGrayTextAutocompletion(
544 [self textStorage], 544 [self textStorage],
545 [[self delegate] suggestText], 545 [[self delegate] suggestText],
546 [[self delegate] suggestColor], 546 [[self delegate] suggestColor],
547 self, 547 self,
548 [self bounds]); 548 [self bounds]);
549 } 549 }
550 550
551 @end 551 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/fullscreen_mode_controller.mm ('k') | chrome/browser/ui/cocoa/presentation_mode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698