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

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

Issue 321463003: Revert 265329 "Add SM_CXSIZEFRAME and SM_CXPADDEDBORDER metrics ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | trunk/src/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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets( 136 bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets(
137 gfx::Insets* insets) const { 137 gfx::Insets* insets) const {
138 // Use the default client insets for an opaque frame or a glass popup/app 138 // Use the default client insets for an opaque frame or a glass popup/app
139 // frame. 139 // frame.
140 if (!GetWidget()->ShouldUseNativeFrame() || 140 if (!GetWidget()->ShouldUseNativeFrame() ||
141 !browser_view_->IsBrowserTypeNormal()) { 141 !browser_view_->IsBrowserTypeNormal()) {
142 return false; 142 return false;
143 } 143 }
144 144
145 int border_thickness = 145 int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
146 GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
147 // In fullscreen mode, we have no frame. In restored mode, we draw our own 146 // In fullscreen mode, we have no frame. In restored mode, we draw our own
148 // client edge over part of the default frame. 147 // client edge over part of the default frame.
149 if (GetWidget()->IsFullscreen()) 148 if (GetWidget()->IsFullscreen())
150 border_thickness = 0; 149 border_thickness = 0;
151 else if (!IsMaximized()) 150 else if (!IsMaximized())
152 border_thickness -= kClientEdgeThickness; 151 border_thickness -= kClientEdgeThickness;
153 insets->Set(0, border_thickness, border_thickness, border_thickness); 152 insets->Set(0, border_thickness, border_thickness, border_thickness);
154 return true; 153 return true;
155 } 154 }
156 155
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( 327 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
329 views::internal::NativeWidgetDelegate* native_widget_delegate, 328 views::internal::NativeWidgetDelegate* native_widget_delegate,
330 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 329 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
331 BrowserView* browser_view, 330 BrowserView* browser_view,
332 BrowserFrame* browser_frame) { 331 BrowserFrame* browser_frame) {
333 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, 332 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate,
334 desktop_native_widget_aura, 333 desktop_native_widget_aura,
335 browser_view, 334 browser_view,
336 browser_frame); 335 browser_frame);
337 } 336 }
OLDNEW
« no previous file with comments | « no previous file | trunk/src/ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698