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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ = new ManagePasswordsIconView(command_updater()); |
331 AddChildView(manage_passwords_icon_view_); | 331 AddChildView(manage_passwords_icon_view_); |
332 | 332 |
333 translate_icon_view_ = new TranslateIconView(command_updater()); | 333 translate_icon_view_ = new TranslateIconView(command_updater()); |
334 translate_icon_view_->SetVisible(false); | 334 translate_icon_view_->SetVisible(false); |
335 AddChildView(translate_icon_view_); | 335 AddChildView(translate_icon_view_); |
336 | 336 |
337 star_view_ = new StarView(command_updater()); | 337 star_view_ = new StarView(browser_); |
338 star_view_->SetVisible(false); | 338 star_view_->SetVisible(false); |
339 AddChildView(star_view_); | 339 AddChildView(star_view_); |
340 | 340 |
341 search_button_ = new SearchButton(this); | 341 search_button_ = new SearchButton(this); |
342 search_button_->SetVisible(false); | 342 search_button_->SetVisible(false); |
343 AddChildView(search_button_); | 343 AddChildView(search_button_); |
344 | 344 |
345 show_url_animation_.reset(new gfx::SlideAnimation(this)); | 345 show_url_animation_.reset(new gfx::SlideAnimation(this)); |
346 show_url_animation_->SetTweenType(kShowTweenType); | 346 show_url_animation_->SetTweenType(kShowTweenType); |
347 show_url_animation_->SetSlideDuration(200); | 347 show_url_animation_->SetSlideDuration(200); |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 | 1658 |
1659 void LocationBarView::ModelChanged(const SearchModel::State& old_state, | 1659 void LocationBarView::ModelChanged(const SearchModel::State& old_state, |
1660 const SearchModel::State& new_state) { | 1660 const SearchModel::State& new_state) { |
1661 const bool visible = !GetToolbarModel()->input_in_progress() && | 1661 const bool visible = !GetToolbarModel()->input_in_progress() && |
1662 new_state.voice_search_supported; | 1662 new_state.voice_search_supported; |
1663 if (mic_search_view_->visible() != visible) { | 1663 if (mic_search_view_->visible() != visible) { |
1664 mic_search_view_->SetVisible(visible); | 1664 mic_search_view_->SetVisible(visible); |
1665 Layout(); | 1665 Layout(); |
1666 } | 1666 } |
1667 } | 1667 } |
OLD | NEW |