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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); | 370 generated_credit_card_view_ = new GeneratedCreditCardView(delegate_); |
371 AddChildView(generated_credit_card_view_); | 371 AddChildView(generated_credit_card_view_); |
372 | 372 |
373 zoom_view_ = new ZoomView(delegate_); | 373 zoom_view_ = new ZoomView(delegate_); |
374 zoom_view_->set_id(VIEW_ID_ZOOM_BUTTON); | 374 zoom_view_->set_id(VIEW_ID_ZOOM_BUTTON); |
375 AddChildView(zoom_view_); | 375 AddChildView(zoom_view_); |
376 | 376 |
377 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); | 377 open_pdf_in_reader_view_ = new OpenPDFInReaderView(); |
378 AddChildView(open_pdf_in_reader_view_); | 378 AddChildView(open_pdf_in_reader_view_); |
379 | 379 |
380 manage_passwords_icon_view_ = new ManagePasswordsIconView(delegate_); | 380 manage_passwords_icon_view_ = |
381 manage_passwords_icon_view_->SetState(ManagePasswordsIcon::INACTIVE_STATE); | 381 new ManagePasswordsIconView(delegate_, command_updater()); |
382 AddChildView(manage_passwords_icon_view_); | 382 AddChildView(manage_passwords_icon_view_); |
383 | 383 |
384 translate_icon_view_ = new TranslateIconView(command_updater()); | 384 translate_icon_view_ = new TranslateIconView(command_updater()); |
385 translate_icon_view_->SetVisible(false); | 385 translate_icon_view_->SetVisible(false); |
386 AddChildView(translate_icon_view_); | 386 AddChildView(translate_icon_view_); |
387 | 387 |
388 star_view_ = new StarView(command_updater()); | 388 star_view_ = new StarView(command_updater()); |
389 star_view_->SetVisible(false); | 389 star_view_->SetVisible(false); |
390 AddChildView(star_view_); | 390 AddChildView(star_view_); |
391 | 391 |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1653 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
1654 const SearchModel::State& new_state) { | 1654 const SearchModel::State& new_state) { |
1655 const bool visible = !GetToolbarModel()->input_in_progress() && | 1655 const bool visible = !GetToolbarModel()->input_in_progress() && |
1656 new_state.voice_search_supported; | 1656 new_state.voice_search_supported; |
1657 if (mic_search_view_->visible() != visible) { | 1657 if (mic_search_view_->visible() != visible) { |
1658 mic_search_view_->SetVisible(visible); | 1658 mic_search_view_->SetVisible(visible); |
1659 Layout(); | 1659 Layout(); |
1660 } | 1660 } |
1661 } | 1661 } |
1662 | 1662 |
OLD | NEW |