| 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 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 void LocationBarViewMac::SetActionBoxIcon(int image_id) { | 509 void LocationBarViewMac::SetActionBoxIcon(int image_id) { |
| 510 plus_decoration_->SetTemporaryIcon(image_id); | 510 plus_decoration_->SetTemporaryIcon(image_id); |
| 511 OnDecorationsChanged(); | 511 OnDecorationsChanged(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void LocationBarViewMac::ZoomChangedForActiveTab(bool can_show_bubble) { | 514 void LocationBarViewMac::ZoomChangedForActiveTab(bool can_show_bubble) { |
| 515 UpdateZoomDecoration(); | 515 UpdateZoomDecoration(); |
| 516 OnDecorationsChanged(); | 516 OnDecorationsChanged(); |
| 517 | 517 |
| 518 if (can_show_bubble && zoom_decoration_->IsVisible()) | 518 if (can_show_bubble && zoom_decoration_->IsVisible()) |
| 519 zoom_decoration_->ShowBubble(YES); | 519 zoom_decoration_->ToggleBubble(YES); |
| 520 } | 520 } |
| 521 | 521 |
| 522 NSPoint LocationBarViewMac::GetActionBoxAnchorPoint() const { | 522 NSPoint LocationBarViewMac::GetActionBoxAnchorPoint() const { |
| 523 return plus_decoration_->GetActionBoxAnchorPoint(); | 523 return plus_decoration_->GetActionBoxAnchorPoint(); |
| 524 } | 524 } |
| 525 | 525 |
| 526 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { | 526 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { |
| 527 AutocompleteTextFieldCell* cell = [field_ cell]; | 527 AutocompleteTextFieldCell* cell = [field_ cell]; |
| 528 const NSRect frame = [cell frameForDecoration:star_decoration_.get() | 528 const NSRect frame = [cell frameForDecoration:star_decoration_.get() |
| 529 inFrame:[field_ bounds]]; | 529 inFrame:[field_ bounds]]; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 if (!toolbar_model_->GetInputInProgress() && | 782 if (!toolbar_model_->GetInputInProgress() && |
| 783 toolbar_model_->WouldReplaceSearchURLWithSearchTerms()) { | 783 toolbar_model_->WouldReplaceSearchURLWithSearchTerms()) { |
| 784 const TemplateURL* template_url = | 784 const TemplateURL* template_url = |
| 785 TemplateURLServiceFactory::GetForProfile(profile_)-> | 785 TemplateURLServiceFactory::GetForProfile(profile_)-> |
| 786 GetDefaultSearchProvider(); | 786 GetDefaultSearchProvider(); |
| 787 if (template_url) | 787 if (template_url) |
| 788 return template_url->short_name(); | 788 return template_url->short_name(); |
| 789 } | 789 } |
| 790 return string16(); | 790 return string16(); |
| 791 } | 791 } |
| OLD | NEW |