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

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

Issue 59903002: Fix for comment regarding content settings icons being added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 [cell addLeftDecoration:selected_keyword_decoration_.get()]; 344 [cell addLeftDecoration:selected_keyword_decoration_.get()];
345 [cell addLeftDecoration:ev_bubble_decoration_.get()]; 345 [cell addLeftDecoration:ev_bubble_decoration_.get()];
346 [cell addRightDecoration:star_decoration_.get()]; 346 [cell addRightDecoration:star_decoration_.get()];
347 [cell addRightDecoration:zoom_decoration_.get()]; 347 [cell addRightDecoration:zoom_decoration_.get()];
348 348
349 // Note that display order is right to left. 349 // Note that display order is right to left.
350 for (size_t i = 0; i < page_action_decorations_.size(); ++i) { 350 for (size_t i = 0; i < page_action_decorations_.size(); ++i) {
351 [cell addRightDecoration:page_action_decorations_[i]]; 351 [cell addRightDecoration:page_action_decorations_[i]];
352 } 352 }
353 353
354 // Iterate through |content_setting_decorations_| in reverse order so that
355 // the order in which the decorations are drawn matches the Views code.
356 for (ScopedVector<ContentSettingDecoration>::iterator i = 354 for (ScopedVector<ContentSettingDecoration>::iterator i =
357 content_setting_decorations_.begin(); 355 content_setting_decorations_.begin();
358 i != content_setting_decorations_.end(); ++i) { 356 i != content_setting_decorations_.end(); ++i) {
359 [cell addRightDecoration:*i]; 357 [cell addRightDecoration:*i];
360 } 358 }
361 359
362 [cell addRightDecoration:keyword_hint_decoration_.get()]; 360 [cell addRightDecoration:keyword_hint_decoration_.get()];
363 [cell addRightDecoration:mic_search_decoration_.get()]; 361 [cell addRightDecoration:mic_search_decoration_.get()];
364 362
365 // By default only the location icon is visible. 363 // By default only the location icon is visible.
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 682 }
685 683
686 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { 684 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() {
687 bool is_visible = !GetToolbarModel()->input_in_progress() && 685 bool is_visible = !GetToolbarModel()->input_in_progress() &&
688 browser_->search_model()->voice_search_supported(); 686 browser_->search_model()->voice_search_supported();
689 if (mic_search_decoration_->IsVisible() == is_visible) 687 if (mic_search_decoration_->IsVisible() == is_visible)
690 return false; 688 return false;
691 mic_search_decoration_->SetVisible(is_visible); 689 mic_search_decoration_->SetVisible(is_visible);
692 return true; 690 return true;
693 } 691 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698