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

Side by Side Diff: chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc

Issue 243173005: Add SM_CXSIZEFRAME and SM_CXPADDEDBORDER metrics to get window border size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_desktop_window_tree_host_win.h" 5 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "chrome/browser/lifetime/application_lifetime.h" 9 #include "chrome/browser/lifetime/application_lifetime.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets( 137 bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets(
138 gfx::Insets* insets) const { 138 gfx::Insets* insets) const {
139 // Use the default client insets for an opaque frame or a glass popup/app 139 // Use the default client insets for an opaque frame or a glass popup/app
140 // frame. 140 // frame.
141 if (!GetWidget()->ShouldUseNativeFrame() || 141 if (!GetWidget()->ShouldUseNativeFrame() ||
142 !browser_view_->IsBrowserTypeNormal()) { 142 !browser_view_->IsBrowserTypeNormal()) {
143 return false; 143 return false;
144 } 144 }
145 145
146 int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); 146 int border_thickness =
147 GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
147 // In fullscreen mode, we have no frame. In restored mode, we draw our own 148 // In fullscreen mode, we have no frame. In restored mode, we draw our own
148 // client edge over part of the default frame. 149 // client edge over part of the default frame.
149 if (GetWidget()->IsFullscreen()) 150 if (GetWidget()->IsFullscreen())
150 border_thickness = 0; 151 border_thickness = 0;
151 else if (!IsMaximized()) 152 else if (!IsMaximized())
152 border_thickness -= kClientEdgeThickness; 153 border_thickness -= kClientEdgeThickness;
153 insets->Set(0, border_thickness, border_thickness, border_thickness); 154 insets->Set(0, border_thickness, border_thickness, border_thickness);
154 return true; 155 return true;
155 } 156 }
156 157
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( 329 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
329 views::internal::NativeWidgetDelegate* native_widget_delegate, 330 views::internal::NativeWidgetDelegate* native_widget_delegate,
330 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 331 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
331 BrowserView* browser_view, 332 BrowserView* browser_view,
332 BrowserFrame* browser_frame) { 333 BrowserFrame* browser_frame) {
333 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, 334 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate,
334 desktop_native_widget_aura, 335 desktop_native_widget_aura,
335 browser_view, 336 browser_view,
336 browser_frame); 337 browser_frame);
337 } 338 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698