| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/location_bar/location_bar_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 const int resource_id = omnibox_view_->GetIcon(); | 620 const int resource_id = omnibox_view_->GetIcon(); |
| 621 NSImage* image = OmniboxViewMac::ImageForResource(resource_id); | 621 NSImage* image = OmniboxViewMac::ImageForResource(resource_id); |
| 622 location_icon_decoration_->SetImage(image); | 622 location_icon_decoration_->SetImage(image); |
| 623 ev_bubble_decoration_->SetImage(image); | 623 ev_bubble_decoration_->SetImage(image); |
| 624 Layout(); | 624 Layout(); |
| 625 return; | 625 return; |
| 626 } | 626 } |
| 627 UpdateLocationIcon(); | 627 UpdateLocationIcon(); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void LocationBarViewMac::OnSetFocus() { | |
| 631 // Update the keyword and search hint states. | |
| 632 OnChanged(); | |
| 633 } | |
| 634 | |
| 635 void LocationBarViewMac::ShowURL() { | 630 void LocationBarViewMac::ShowURL() { |
| 636 omnibox_view_->ShowURL(); | 631 omnibox_view_->ShowURL(); |
| 637 } | 632 } |
| 638 | 633 |
| 639 ToolbarModel* LocationBarViewMac::GetToolbarModel() { | 634 ToolbarModel* LocationBarViewMac::GetToolbarModel() { |
| 640 return browser_->toolbar_model(); | 635 return browser_->toolbar_model(); |
| 641 } | 636 } |
| 642 | 637 |
| 643 const ToolbarModel* LocationBarViewMac::GetToolbarModel() const { | 638 const ToolbarModel* LocationBarViewMac::GetToolbarModel() const { |
| 644 return browser_->toolbar_model(); | 639 return browser_->toolbar_model(); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 | 802 |
| 808 return zoom_decoration_->UpdateIfNecessary( | 803 return zoom_decoration_->UpdateIfNecessary( |
| 809 ui_zoom::ZoomController::FromWebContents(web_contents), | 804 ui_zoom::ZoomController::FromWebContents(web_contents), |
| 810 default_zoom_changed, IsLocationBarDark()); | 805 default_zoom_changed, IsLocationBarDark()); |
| 811 } | 806 } |
| 812 | 807 |
| 813 void LocationBarViewMac::OnDefaultZoomLevelChanged() { | 808 void LocationBarViewMac::OnDefaultZoomLevelChanged() { |
| 814 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) | 809 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) |
| 815 OnDecorationsChanged(); | 810 OnDecorationsChanged(); |
| 816 } | 811 } |
| OLD | NEW |