| 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/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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |