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

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: rebase 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const { 370 NSPoint LocationBarViewMac::GetBookmarkBubblePoint() const {
371 DCHECK(IsStarEnabled()); 371 DCHECK(IsStarEnabled());
372 return [field_ bubblePointForDecoration:star_decoration_.get()]; 372 return [field_ bubblePointForDecoration:star_decoration_.get()];
373 } 373 }
374 374
375 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const { 375 NSPoint LocationBarViewMac::GetTranslateBubblePoint() const {
376 return [field_ bubblePointForDecoration:translate_decoration_.get()]; 376 return [field_ bubblePointForDecoration:translate_decoration_.get()];
377 } 377 }
378 378
379 NSPoint LocationBarViewMac::GetManagePasswordsBubblePoint() const {
380 return [field_ bubblePointForDecoration:manage_passwords_decoration_.get()];
381 }
382
379 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const { 383 NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const {
380 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) { 384 if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) {
381 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()]; 385 return [field_ bubblePointForDecoration:origin_chip_decoration_.get()];
382 } else if (ev_bubble_decoration_->IsVisible()) { 386 } else if (ev_bubble_decoration_->IsVisible()) {
383 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()]; 387 return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()];
384 } else { 388 } else {
385 return [field_ bubblePointForDecoration:location_icon_decoration_.get()]; 389 return [field_ bubblePointForDecoration:location_icon_decoration_.get()];
386 } 390 }
387 } 391 }
388 392
(...skipping 415 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