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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 2840073002: Revert of [Mac] Retain location bar focus on switching to fullscreen and back. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 - (LocationBarViewMac*)locationBarBridge { 591 - (LocationBarViewMac*)locationBarBridge {
592 return locationBarView_.get(); 592 return locationBarView_.get();
593 } 593 }
594 594
595 - (void)locationBarWasAddedToWindow { 595 - (void)locationBarWasAddedToWindow {
596 // Allow the |locationBarView_| to update itself to match the browser window 596 // Allow the |locationBarView_| to update itself to match the browser window
597 // theme. 597 // theme.
598 locationBarView_->OnAddedToWindow(); 598 locationBarView_->OnAddedToWindow();
599 } 599 }
600 600
601 - (BOOL)locationBarHasFocus {
602 return [[autocompleteTextFieldEditor_ window] firstResponder] ==
603 autocompleteTextFieldEditor_.get();
604 }
605
606 - (void)focusLocationBar:(BOOL)selectAll { 601 - (void)focusLocationBar:(BOOL)selectAll {
607 if (locationBarView_.get()) { 602 if (locationBarView_.get()) {
608 locationBarView_->FocusLocation(selectAll ? true : false); 603 locationBarView_->FocusLocation(selectAll ? true : false);
609 } 604 }
610 } 605 }
611 606
612 // Called when the state for a command changes to |enabled|. Update the 607 // Called when the state for a command changes to |enabled|. Update the
613 // corresponding UI element. 608 // corresponding UI element.
614 - (void)enabledStateChangedForCommand:(int)command enabled:(bool)enabled { 609 - (void)enabledStateChangedForCommand:(int)command enabled:(bool)enabled {
615 NSButton* button = nil; 610 NSButton* button = nil;
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 - (void)hideDropURLsIndicatorInView:(NSView*)view { 1109 - (void)hideDropURLsIndicatorInView:(NSView*)view {
1115 // Do nothing. 1110 // Do nothing.
1116 } 1111 }
1117 1112
1118 // (URLDropTargetController protocol) 1113 // (URLDropTargetController protocol)
1119 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 1114 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
1120 return drag_util::IsUnsupportedDropData(profile_, info); 1115 return drag_util::IsUnsupportedDropData(profile_, info);
1121 } 1116 }
1122 1117
1123 @end 1118 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698