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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 422233009: Add ManagePasswordsBubbleController and unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NSWidth Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { 371 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const {
372 DCHECK(IsStarEnabled()); 372 DCHECK(IsStarEnabled());
373 return [field_ bubblePointForDecoration:star_decoration_.get()]; 373 return [field_ bubblePointForDecoration:star_decoration_.get()];
374 } 374 }
375 375
376 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const { 376 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const {
377 return [field_ bubblePointForDecoration:translate_decoration_.get()]; 377 return [field_ bubblePointForDecoration:translate_decoration_.get()];
378 } 378 }
379 379
380 NSPoint LocationBarViewMac::GetManagePasswordsBubblePoint() const {
381 return [field_ bubblePointForDecoration:manage_passwords_decoration_.get()];
382 }
383
380 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { 384 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const {
381 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) { 385 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) {
382 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()]; 386 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()];
383 } else if (ev_bubble_decoration_->IsVisible()) { 387 } else if (ev_bubble_decoration_->IsVisible()) {
384 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()]; 388 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()];
385 } else { 389 } else {
386 return [field_ bubblePointForDecoration:location_icon_decoration_.get()]; 390 return [field_ bubblePointForDecoration:location_icon_decoration_.get()];
387 } 391 }
388 } 392 }
389 393
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 } 808 }
805 809
806 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { 810 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() {
807 bool is_visible = !GetToolbarModel()->input_in_progress() && 811 bool is_visible = !GetToolbarModel()->input_in_progress() &&
808 browser_->search_model()->voice_search_supported(); 812 browser_->search_model()->voice_search_supported();
809 if (mic_search_decoration_->IsVisible() == is_visible) 813 if (mic_search_decoration_->IsVisible() == is_visible)
810 return false; 814 return false;
811 mic_search_decoration_->SetVisible(is_visible); 815 mic_search_decoration_->SetVisible(is_visible);
812 return true; 816 return true;
813 } 817 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698