| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); | 380 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); |
| 381 AddChildView(generated_credit_card_view_); | 381 AddChildView(generated_credit_card_view_); |
| 382 | 382 |
| 383 zoom_view_ = new ZoomView(delegate_); | 383 zoom_view_ = new ZoomView(delegate_); |
| 384 zoom_view_->set_id(VIEW_ID_ZOOM_BUTTON); | 384 zoom_view_->set_id(VIEW_ID_ZOOM_BUTTON); |
| 385 AddChildView(zoom_view_); | 385 AddChildView(zoom_view_); |
| 386 | 386 |
| 387 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); | 387 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); |
| 388 AddChildView(open_pdf_in_reader_view_); | 388 AddChildView(open_pdf_in_reader_view_); |
| 389 | 389 |
| 390 manage_passwords_icon_view_ = new ManagePasswordsIconView(delegate_); | 390 manage_passwords_icon_view_ = new ManagePasswordsIconView(delegate_, |
| 391 command_updater()); |
| 391 manage_passwords_icon_view_->set_id(VIEW_ID_MANAGE_PASSWORDS_ICON_BUTTON); | 392 manage_passwords_icon_view_->set_id(VIEW_ID_MANAGE_PASSWORDS_ICON_BUTTON); |
| 392 AddChildView(manage_passwords_icon_view_); | 393 AddChildView(manage_passwords_icon_view_); |
| 393 | 394 |
| 394 translate_icon_view_ = new TranslateIconView(command_updater()); | 395 translate_icon_view_ = new TranslateIconView(command_updater()); |
| 395 translate_icon_view_->SetVisible(false); | 396 translate_icon_view_->SetVisible(false); |
| 396 AddChildView(translate_icon_view_); | 397 AddChildView(translate_icon_view_); |
| 397 | 398 |
| 398 star_view_ = new StarView(command_updater()); | 399 star_view_ = new StarView(command_updater()); |
| 399 star_view_->SetVisible(false); | 400 star_view_->SetVisible(false); |
| 400 AddChildView(star_view_); | 401 AddChildView(star_view_); |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1703 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
| 1703 const SearchModel::State& new_state) { | 1704 const SearchModel::State& new_state) { |
| 1704 const bool visible = !GetToolbarModel()->input_in_progress() && | 1705 const bool visible = !GetToolbarModel()->input_in_progress() && |
| 1705 new_state.voice_search_supported; | 1706 new_state.voice_search_supported; |
| 1706 if (mic_search_view_->visible() != visible) { | 1707 if (mic_search_view_->visible() != visible) { |
| 1707 mic_search_view_->SetVisible(visible); | 1708 mic_search_view_->SetVisible(visible); |
| 1708 Layout(); | 1709 Layout(); |
| 1709 } | 1710 } |
| 1710 } | 1711 } |
| 1711 | 1712 |
| OLD | NEW |