| 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 | |
| 178 gfx::Rect GlassBrowserFrameView::GetWindowBoundsForClientBounds( | 174 gfx::Rect GlassBrowserFrameView::GetWindowBoundsForClientBounds( |
| 179 const gfx::Rect& client_bounds) const { | 175 const gfx::Rect& client_bounds) const { |
| 180 HWND hwnd = frame_->GetNativeWindow(); | 176 HWND hwnd = frame_->GetNativeWindow(); |
| 181 if (!browser_view_->IsTabStripVisible() && hwnd) { | 177 if (!browser_view_->IsTabStripVisible() && hwnd) { |
| 182 // If we don't have a tabstrip, we're either a popup or an app window, in | 178 // If we don't have a tabstrip, we're either a popup or an app window, in |
| 183 // which case we have a standard size non-client area and can just use | 179 // which case we have a standard size non-client area and can just use |
| 184 // AdjustWindowRectEx to obtain it. We check for a non-NULL window handle in | 180 // AdjustWindowRectEx to obtain it. We check for a non-NULL window handle in |
| 185 // case this gets called before the window is actually created. | 181 // case this gets called before the window is actually created. |
| 186 RECT rect = client_bounds.ToRECT(); | 182 RECT rect = client_bounds.ToRECT(); |
| 187 AdjustWindowRectEx(&rect, GetWindowLong(hwnd, GWL_STYLE), FALSE, | 183 AdjustWindowRectEx(&rect, GetWindowLong(hwnd, GWL_STYLE), FALSE, |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 static bool initialized = false; | 623 static bool initialized = false; |
| 628 if (!initialized) { | 624 if (!initialized) { |
| 629 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 625 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| 630 for (int i = 0; i < kThrobberIconCount; ++i) { | 626 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 631 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); | 627 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); |
| 632 DCHECK(throbber_icons_[i]); | 628 DCHECK(throbber_icons_[i]); |
| 633 } | 629 } |
| 634 initialized = true; | 630 initialized = true; |
| 635 } | 631 } |
| 636 } | 632 } |
| OLD | NEW |