Chromium Code Reviews| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 354 // Iterate through |content_setting_decorations_| in reverse order so that |
| 355 // the order in which the decorations are drawn matches the Views code. | 355 // the order in which the decorations are drawn matches the Views code. |
| 356 for (ScopedVector<ContentSettingDecoration>::reverse_iterator i = | 356 for (ScopedVector<ContentSettingDecoration>::iterator i = |
| 357 content_setting_decorations_.rbegin(); | 357 content_setting_decorations_.begin(); |
|
Ilya Sherman
2013/10/29 20:48:09
nit: As long as you're updating this loop, mind in
| |
| 358 i != content_setting_decorations_.rend(); ++i) { | 358 i != content_setting_decorations_.end(); ++i) { |
| 359 [cell addRightDecoration:*i]; | 359 [cell addRightDecoration:*i]; |
| 360 } | 360 } |
| 361 | 361 |
| 362 [cell addRightDecoration:keyword_hint_decoration_.get()]; | 362 [cell addRightDecoration:keyword_hint_decoration_.get()]; |
| 363 [cell addRightDecoration:mic_search_decoration_.get()]; | 363 [cell addRightDecoration:mic_search_decoration_.get()]; |
| 364 | 364 |
| 365 // By default only the location icon is visible. | 365 // By default only the location icon is visible. |
| 366 location_icon_decoration_->SetVisible(true); | 366 location_icon_decoration_->SetVisible(true); |
| 367 selected_keyword_decoration_->SetVisible(false); | 367 selected_keyword_decoration_->SetVisible(false); |
| 368 ev_bubble_decoration_->SetVisible(false); | 368 ev_bubble_decoration_->SetVisible(false); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 } | 684 } |
| 685 | 685 |
| 686 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 686 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
| 687 bool is_visible = !GetToolbarModel()->input_in_progress() && | 687 bool is_visible = !GetToolbarModel()->input_in_progress() && |
| 688 browser_->search_model()->voice_search_supported(); | 688 browser_->search_model()->voice_search_supported(); |
| 689 if (mic_search_decoration_->IsVisible() == is_visible) | 689 if (mic_search_decoration_->IsVisible() == is_visible) |
| 690 return false; | 690 return false; |
| 691 mic_search_decoration_->SetVisible(is_visible); | 691 mic_search_decoration_->SetVisible(is_visible); |
| 692 return true; | 692 return true; |
| 693 } | 693 } |
| OLD | NEW |