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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT 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 | Annotate | Revision Log
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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 693
694 if (is_popup_mode_) { 694 if (is_popup_mode_) {
695 state->AddStateFlag(ui::AX_STATE_READ_ONLY); 695 state->AddStateFlag(ui::AX_STATE_READ_ONLY);
696 } else { 696 } else {
697 state->set_value_callback = 697 state->set_value_callback =
698 base::Bind(&LocationBarView::AccessibilitySetValue, 698 base::Bind(&LocationBarView::AccessibilitySetValue,
699 weak_ptr_factory_.GetWeakPtr()); 699 weak_ptr_factory_.GetWeakPtr());
700 } 700 }
701 } 701 }
702 702
703 gfx::Size LocationBarView::GetPreferredSize() { 703 gfx::Size LocationBarView::GetPreferredSize() const {
704 // Compute minimum height. 704 // Compute minimum height.
705 gfx::Size min_size(border_painter_->GetMinimumSize()); 705 gfx::Size min_size(border_painter_->GetMinimumSize());
706 if (!IsInitialized()) 706 if (!IsInitialized())
707 return min_size; 707 return min_size;
708 gfx::Size search_button_min_size(search_button_->GetMinimumSize()); 708 gfx::Size search_button_min_size(search_button_->GetMinimumSize());
709 min_size.SetToMax(search_button_min_size); 709 min_size.SetToMax(search_button_min_size);
710 710
711 // Compute width of omnibox-leading content. 711 // Compute width of omnibox-leading content.
712 const int horizontal_edge_thickness = GetHorizontalEdgeThickness(); 712 const int horizontal_edge_thickness = GetHorizontalEdgeThickness();
713 int leading_width = horizontal_edge_thickness; 713 int leading_width = horizontal_edge_thickness;
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 void LocationBarView::ModelChanged(const SearchModel::State& old_state, 1689 void LocationBarView::ModelChanged(const SearchModel::State& old_state,
1690 const SearchModel::State& new_state) { 1690 const SearchModel::State& new_state) {
1691 const bool visible = !GetToolbarModel()->input_in_progress() && 1691 const bool visible = !GetToolbarModel()->input_in_progress() &&
1692 new_state.voice_search_supported; 1692 new_state.voice_search_supported;
1693 if (mic_search_view_->visible() != visible) { 1693 if (mic_search_view_->visible() != visible) {
1694 mic_search_view_->SetVisible(visible); 1694 mic_search_view_->SetVisible(visible);
1695 Layout(); 1695 Layout();
1696 } 1696 }
1697 } 1697 }
1698 1698
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('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