Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 233623002: Shows the info bubble when the location bar icon is clicked in the origin chip. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 background_min_size.width() + 710 background_min_size.width() +
711 search_button_min_size.width()); 711 search_button_min_size.width());
712 return min_size; 712 return min_size;
713 } 713 }
714 714
715 void LocationBarView::Layout() { 715 void LocationBarView::Layout() {
716 if (!IsInitialized()) 716 if (!IsInitialized())
717 return; 717 return;
718 718
719 animated_host_label_->SetVisible(false); 719 animated_host_label_->SetVisible(false);
720 origin_chip_view_->SetVisible(origin_chip_view_->ShouldShow()); 720 origin_chip_view_->SetVisible(GetToolbarModel()->ShouldShowOriginChip());
721 selected_keyword_view_->SetVisible(false); 721 selected_keyword_view_->SetVisible(false);
722 location_icon_view_->SetVisible(false); 722 location_icon_view_->SetVisible(false);
723 ev_bubble_view_->SetVisible(false); 723 ev_bubble_view_->SetVisible(false);
724 keyword_hint_view_->SetVisible(false); 724 keyword_hint_view_->SetVisible(false);
725 725
726 // The textfield has 1 px of whitespace before the text in the RTL case only. 726 // The textfield has 1 px of whitespace before the text in the RTL case only.
727 const int kEditLeadingInternalSpace = base::i18n::IsRTL() ? 1 : 0; 727 const int kEditLeadingInternalSpace = base::i18n::IsRTL() ? 1 : 0;
728 LocationBarLayout leading_decorations( 728 LocationBarLayout leading_decorations(
729 LocationBarLayout::LEFT_EDGE, kItemPadding - kEditLeadingInternalSpace); 729 LocationBarLayout::LEFT_EDGE, kItemPadding - kEditLeadingInternalSpace);
730 LocationBarLayout trailing_decorations(LocationBarLayout::RIGHT_EDGE, 730 LocationBarLayout trailing_decorations(LocationBarLayout::RIGHT_EDGE,
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 void LocationBarView::ModelChanged(const SearchModel::State& old_state, 1641 void LocationBarView::ModelChanged(const SearchModel::State& old_state,
1642 const SearchModel::State& new_state) { 1642 const SearchModel::State& new_state) {
1643 const bool visible = !GetToolbarModel()->input_in_progress() && 1643 const bool visible = !GetToolbarModel()->input_in_progress() &&
1644 new_state.voice_search_supported; 1644 new_state.voice_search_supported;
1645 if (mic_search_view_->visible() != visible) { 1645 if (mic_search_view_->visible() != visible) {
1646 mic_search_view_->SetVisible(visible); 1646 mic_search_view_->SetVisible(visible);
1647 Layout(); 1647 Layout();
1648 } 1648 }
1649 } 1649 }
1650 1650
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_impl.cc ('k') | chrome/browser/ui/views/location_bar/origin_chip_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698