| 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/browser_desktop_root_window_host_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
| 10 #include "chrome/browser/themes/theme_service_factory.h" | 10 #include "chrome/browser/themes/theme_service_factory.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 margins.cxLeftWidth = kClientEdgeThickness + 1; | 263 margins.cxLeftWidth = kClientEdgeThickness + 1; |
| 264 margins.cxRightWidth = kClientEdgeThickness + 1; | 264 margins.cxRightWidth = kClientEdgeThickness + 1; |
| 265 margins.cyBottomHeight = kClientEdgeThickness + 1; | 265 margins.cyBottomHeight = kClientEdgeThickness + 1; |
| 266 margins.cyTopHeight = kClientEdgeThickness + 1; | 266 margins.cyTopHeight = kClientEdgeThickness + 1; |
| 267 } | 267 } |
| 268 // In maximized mode, we only have a titlebar strip of glass, no side/bottom | 268 // In maximized mode, we only have a titlebar strip of glass, no side/bottom |
| 269 // borders. | 269 // borders. |
| 270 if (!browser_view_->IsFullscreen()) { | 270 if (!browser_view_->IsFullscreen()) { |
| 271 gfx::Rect tabstrip_bounds( | 271 gfx::Rect tabstrip_bounds( |
| 272 browser_frame_->GetBoundsForTabStrip(browser_view_->tabstrip())); | 272 browser_frame_->GetBoundsForTabStrip(browser_view_->tabstrip())); |
| 273 tabstrip_bounds = ui::win::DIPToScreenRect(tabstrip_bounds); |
| 273 margins.cyTopHeight = tabstrip_bounds.bottom() + kDWMFrameTopOffset; | 274 margins.cyTopHeight = tabstrip_bounds.bottom() + kDWMFrameTopOffset; |
| 274 } | 275 } |
| 275 } | 276 } |
| 276 | 277 |
| 277 DwmExtendFrameIntoClientArea(GetHWND(), &margins); | 278 DwmExtendFrameIntoClientArea(GetHWND(), &margins); |
| 278 } | 279 } |
| 279 | 280 |
| 280 //////////////////////////////////////////////////////////////////////////////// | 281 //////////////////////////////////////////////////////////////////////////////// |
| 281 // BrowserDesktopRootWindowHost, public: | 282 // BrowserDesktopRootWindowHost, public: |
| 282 | 283 |
| 283 // static | 284 // static |
| 284 BrowserDesktopRootWindowHost* | 285 BrowserDesktopRootWindowHost* |
| 285 BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost( | 286 BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost( |
| 286 views::internal::NativeWidgetDelegate* native_widget_delegate, | 287 views::internal::NativeWidgetDelegate* native_widget_delegate, |
| 287 views::DesktopNativeWidgetAura* desktop_native_widget_aura, | 288 views::DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 288 const gfx::Rect& initial_bounds, | 289 const gfx::Rect& initial_bounds, |
| 289 BrowserView* browser_view, | 290 BrowserView* browser_view, |
| 290 BrowserFrame* browser_frame) { | 291 BrowserFrame* browser_frame) { |
| 291 return new BrowserDesktopRootWindowHostWin(native_widget_delegate, | 292 return new BrowserDesktopRootWindowHostWin(native_widget_delegate, |
| 292 desktop_native_widget_aura, | 293 desktop_native_widget_aura, |
| 293 initial_bounds, | 294 initial_bounds, |
| 294 browser_view, | 295 browser_view, |
| 295 browser_frame); | 296 browser_frame); |
| 296 } | 297 } |
| OLD | NEW |