OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 /////////////////////////////////////////////////////////////////////////////// | 167 /////////////////////////////////////////////////////////////////////////////// |
168 // GlassBrowserFrameView, views::NonClientFrameView implementation: | 168 // GlassBrowserFrameView, views::NonClientFrameView implementation: |
169 | 169 |
170 gfx::Rect GlassBrowserFrameView::GetBoundsForClientView() const { | 170 gfx::Rect GlassBrowserFrameView::GetBoundsForClientView() const { |
171 return client_view_bounds_; | 171 return client_view_bounds_; |
172 } | 172 } |
173 | 173 |
| 174 bool GlassBrowserFrameView::AlwaysUseNativeFrame() const { |
| 175 return frame_->AlwaysUseNativeFrame(); |
| 176 } |
| 177 |
174 gfx::Rect GlassBrowserFrameView::GetWindowBoundsForClientBounds( | 178 gfx::Rect GlassBrowserFrameView::GetWindowBoundsForClientBounds( |
175 const gfx::Rect& client_bounds) const { | 179 const gfx::Rect& client_bounds) const { |
176 HWND hwnd = frame_->GetNativeWindow(); | 180 HWND hwnd = frame_->GetNativeWindow(); |
177 if (!browser_view_->IsTabStripVisible() && hwnd) { | 181 if (!browser_view_->IsTabStripVisible() && hwnd) { |
178 // If we don't have a tabstrip, we're either a popup or an app window, in | 182 // If we don't have a tabstrip, we're either a popup or an app window, in |
179 // which case we have a standard size non-client area and can just use | 183 // which case we have a standard size non-client area and can just use |
180 // AdjustWindowRectEx to obtain it. We check for a non-NULL window handle in | 184 // AdjustWindowRectEx to obtain it. We check for a non-NULL window handle in |
181 // case this gets called before the window is actually created. | 185 // case this gets called before the window is actually created. |
182 RECT rect = client_bounds.ToRECT(); | 186 RECT rect = client_bounds.ToRECT(); |
183 AdjustWindowRectEx(&rect, GetWindowLong(hwnd, GWL_STYLE), FALSE, | 187 AdjustWindowRectEx(&rect, GetWindowLong(hwnd, GWL_STYLE), FALSE, |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 static bool initialized = false; | 627 static bool initialized = false; |
624 if (!initialized) { | 628 if (!initialized) { |
625 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 629 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
626 for (int i = 0; i < kThrobberIconCount; ++i) { | 630 for (int i = 0; i < kThrobberIconCount; ++i) { |
627 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); | 631 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); |
628 DCHECK(throbber_icons_[i]); | 632 DCHECK(throbber_icons_[i]); |
629 } | 633 } |
630 initialized = true; | 634 initialized = true; |
631 } | 635 } |
632 } | 636 } |
OLD | NEW |