OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 } | 602 } |
603 | 603 |
604 - (void)mouseEntered:(NSEvent*)event { | 604 - (void)mouseEntered:(NSEvent*)event { |
605 [self mouseMoved:event]; | 605 [self mouseMoved:event]; |
606 } | 606 } |
607 | 607 |
608 - (LocationBarViewMac*)locationBarBridge { | 608 - (LocationBarViewMac*)locationBarBridge { |
609 return locationBarView_.get(); | 609 return locationBarView_.get(); |
610 } | 610 } |
611 | 611 |
| 612 - (void)locationBarWasAddedToWindow { |
| 613 // Allow the |locationBarView_| to update itself to match the browser window |
| 614 // theme. |
| 615 locationBarView_->OnAddedToWindow(); |
| 616 } |
| 617 |
612 - (void)focusLocationBar:(BOOL)selectAll { | 618 - (void)focusLocationBar:(BOOL)selectAll { |
613 if (locationBarView_.get()) { | 619 if (locationBarView_.get()) { |
614 locationBarView_->FocusLocation(selectAll ? true : false); | 620 locationBarView_->FocusLocation(selectAll ? true : false); |
615 } | 621 } |
616 } | 622 } |
617 | 623 |
618 // Called when the state for a command changes to |enabled|. Update the | 624 // Called when the state for a command changes to |enabled|. Update the |
619 // corresponding UI element. | 625 // corresponding UI element. |
620 - (void)enabledStateChangedForCommand:(int)command enabled:(bool)enabled { | 626 - (void)enabledStateChangedForCommand:(int)command enabled:(bool)enabled { |
621 NSButton* button = nil; | 627 NSButton* button = nil; |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 - (void)hideDropURLsIndicatorInView:(NSView*)view { | 1130 - (void)hideDropURLsIndicatorInView:(NSView*)view { |
1125 // Do nothing. | 1131 // Do nothing. |
1126 } | 1132 } |
1127 | 1133 |
1128 // (URLDropTargetController protocol) | 1134 // (URLDropTargetController protocol) |
1129 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { | 1135 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { |
1130 return drag_util::IsUnsupportedDropData(profile_, info); | 1136 return drag_util::IsUnsupportedDropData(profile_, info); |
1131 } | 1137 } |
1132 | 1138 |
1133 @end | 1139 @end |
OLD | NEW |