| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); | 321 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); |
| 322 AddChildView(generated_credit_card_view_); | 322 AddChildView(generated_credit_card_view_); |
| 323 | 323 |
| 324 zoom_view_ = new ZoomView(delegate_); | 324 zoom_view_ = new ZoomView(delegate_); |
| 325 AddChildView(zoom_view_); | 325 AddChildView(zoom_view_); |
| 326 | 326 |
| 327 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); | 327 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); |
| 328 AddChildView(open_pdf_in_reader_view_); | 328 AddChildView(open_pdf_in_reader_view_); |
| 329 | 329 |
| 330 manage_passwords_icon_view_ = new ManagePasswordsIconView(command_updater()); | 330 manage_passwords_icon_view_ = |
| 331 new ManagePasswordsIconView(command_updater(), 0); |
| 331 AddChildView(manage_passwords_icon_view_); | 332 AddChildView(manage_passwords_icon_view_); |
| 332 | 333 |
| 333 translate_icon_view_ = new TranslateIconView(command_updater()); | 334 translate_icon_view_ = new TranslateIconView(command_updater(), 0); |
| 334 translate_icon_view_->SetVisible(false); | 335 translate_icon_view_->SetVisible(false); |
| 335 AddChildView(translate_icon_view_); | 336 AddChildView(translate_icon_view_); |
| 336 | 337 |
| 337 star_view_ = new StarView(command_updater()); | 338 star_view_ = new StarView(command_updater(), browser_); |
| 338 star_view_->SetVisible(false); | 339 star_view_->SetVisible(false); |
| 339 AddChildView(star_view_); | 340 AddChildView(star_view_); |
| 340 | 341 |
| 341 search_button_ = new SearchButton(this); | 342 search_button_ = new SearchButton(this); |
| 342 search_button_->SetVisible(false); | 343 search_button_->SetVisible(false); |
| 343 AddChildView(search_button_); | 344 AddChildView(search_button_); |
| 344 | 345 |
| 345 show_url_animation_.reset(new gfx::SlideAnimation(this)); | 346 show_url_animation_.reset(new gfx::SlideAnimation(this)); |
| 346 show_url_animation_->SetTweenType(kShowTweenType); | 347 show_url_animation_->SetTweenType(kShowTweenType); |
| 347 show_url_animation_->SetSlideDuration(200); | 348 show_url_animation_->SetSlideDuration(200); |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 | 1659 |
| 1659 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1660 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
| 1660 const SearchModel::State& new_state) { | 1661 const SearchModel::State& new_state) { |
| 1661 const bool visible = !GetToolbarModel()->input_in_progress() && | 1662 const bool visible = !GetToolbarModel()->input_in_progress() && |
| 1662 new_state.voice_search_supported; | 1663 new_state.voice_search_supported; |
| 1663 if (mic_search_view_->visible() != visible) { | 1664 if (mic_search_view_->visible() != visible) { |
| 1664 mic_search_view_->SetVisible(visible); | 1665 mic_search_view_->SetVisible(visible); |
| 1665 Layout(); | 1666 Layout(); |
| 1666 } | 1667 } |
| 1667 } | 1668 } |
| OLD | NEW |