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

Side by Side Diff: chrome/browser/ui/views/frame/glass_browser_frame_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/frame/glass_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (running) { 155 if (running) {
156 DisplayNextThrobberFrame(); 156 DisplayNextThrobberFrame();
157 } else { 157 } else {
158 StopThrobber(); 158 StopThrobber();
159 } 159 }
160 } else if (running) { 160 } else if (running) {
161 StartThrobber(); 161 StartThrobber();
162 } 162 }
163 } 163 }
164 164
165 gfx::Size GlassBrowserFrameView::GetMinimumSize() { 165 gfx::Size GlassBrowserFrameView::GetMinimumSize() const {
166 gfx::Size min_size(browser_view()->GetMinimumSize()); 166 gfx::Size min_size(browser_view()->GetMinimumSize());
167 167
168 // Account for the client area insets. 168 // Account for the client area insets.
169 gfx::Insets insets = GetClientAreaInsets(); 169 gfx::Insets insets = GetClientAreaInsets();
170 min_size.Enlarge(insets.width(), insets.height()); 170 min_size.Enlarge(insets.width(), insets.height());
171 // Client area insets do not include the shadow thickness. 171 // Client area insets do not include the shadow thickness.
172 min_size.Enlarge(2 * kContentEdgeShadowThickness, 0); 172 min_size.Enlarge(2 * kContentEdgeShadowThickness, 0);
173 173
174 // Ensure that the minimum width is enough to hold a tab strip with minimum 174 // Ensure that the minimum width is enough to hold a tab strip with minimum
175 // width at its usual insets. 175 // width at its usual insets.
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 static bool initialized = false; 584 static bool initialized = false;
585 if (!initialized) { 585 if (!initialized) {
586 for (int i = 0; i < kThrobberIconCount; ++i) { 586 for (int i = 0; i < kThrobberIconCount; ++i) {
587 throbber_icons_[i] = 587 throbber_icons_[i] =
588 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 588 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
589 DCHECK(throbber_icons_[i]); 589 DCHECK(throbber_icons_[i]);
590 } 590 }
591 initialized = true; 591 initialized = true;
592 } 592 }
593 } 593 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.h ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698