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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { | 356 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { |
357 DCHECK(IsStarEnabled()); | 357 DCHECK(IsStarEnabled()); |
358 return [field_ bubblePointForDecoration:star_decoration_.get()]; | 358 return [field_ bubblePointForDecoration:star_decoration_.get()]; |
359 } | 359 } |
360 | 360 |
361 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const { | 361 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const { |
362 return [field_ bubblePointForDecoration:translate_decoration_.get()]; | 362 return [field_ bubblePointForDecoration:translate_decoration_.get()]; |
363 } | 363 } |
364 | 364 |
| 365 NSPoint LocationBarViewMac::GetManagePasswordsBubblePoint() const { |
| 366 return [field_ bubblePointForDecoration:manage_passwords_decoration_.get()]; |
| 367 } |
| 368 |
365 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { | 369 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { |
366 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) { | 370 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) { |
367 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()]; | 371 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()]; |
368 } else if (ev_bubble_decoration_->IsVisible()) { | 372 } else if (ev_bubble_decoration_->IsVisible()) { |
369 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()]; | 373 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()]; |
370 } else { | 374 } else { |
371 return [field_ bubblePointForDecoration:location_icon_decoration_.get()]; | 375 return [field_ bubblePointForDecoration:location_icon_decoration_.get()]; |
372 } | 376 } |
373 } | 377 } |
374 | 378 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } | 793 } |
790 | 794 |
791 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 795 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
792 bool is_visible = !GetToolbarModel()->input_in_progress() && | 796 bool is_visible = !GetToolbarModel()->input_in_progress() && |
793 browser_->search_model()->voice_search_supported(); | 797 browser_->search_model()->voice_search_supported(); |
794 if (mic_search_decoration_->IsVisible() == is_visible) | 798 if (mic_search_decoration_->IsVisible() == is_visible) |
795 return false; | 799 return false; |
796 mic_search_decoration_->SetVisible(is_visible); | 800 mic_search_decoration_->SetVisible(is_visible); |
797 return true; | 801 return true; |
798 } | 802 } |
OLD | NEW |