| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |