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

Side by Side Diff: chrome/browser/views/frame/browser_frame_win.cc

Issue 118252: Fix for DWM crash.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/frame/browser_frame_win.h" 5 #include "chrome/browser/views/frame/browser_frame_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 views::RootView* BrowserFrameWin::CreateRootView() { 250 views::RootView* BrowserFrameWin::CreateRootView() {
251 root_view_ = new BrowserRootView(this); 251 root_view_ = new BrowserRootView(this);
252 return root_view_; 252 return root_view_;
253 } 253 }
254 254
255 /////////////////////////////////////////////////////////////////////////////// 255 ///////////////////////////////////////////////////////////////////////////////
256 // BrowserFrame, private: 256 // BrowserFrame, private:
257 257
258 void BrowserFrameWin::UpdateDWMFrame() { 258 void BrowserFrameWin::UpdateDWMFrame() {
259 // Nothing to do yet. 259 // Nothing to do yet.
260 if (!GetClientView() || !browser_view_->IsBrowserTypeNormal()) 260 if (!GetClientView() || !browser_view_->IsBrowserTypeNormal() ||
261 !win_util::ShouldUseVistaFrame())
261 return; 262 return;
262 263
263 // In fullscreen mode, we don't extend glass into the client area at all, 264 // In fullscreen mode, we don't extend glass into the client area at all,
264 // because the GDI-drawn text in the web content composited over it will 265 // because the GDI-drawn text in the web content composited over it will
265 // become semi-transparent over any glass area. 266 // become semi-transparent over any glass area.
266 MARGINS margins = { 0 }; 267 MARGINS margins = { 0 };
267 if (!IsMaximized() && !IsFullscreen()) { 268 if (!IsMaximized() && !IsFullscreen()) {
268 margins.cxLeftWidth = kClientEdgeThickness + 1; 269 margins.cxLeftWidth = kClientEdgeThickness + 1;
269 margins.cxRightWidth = kClientEdgeThickness + 1; 270 margins.cxRightWidth = kClientEdgeThickness + 1;
270 margins.cyBottomHeight = kClientEdgeThickness + 1; 271 margins.cyBottomHeight = kClientEdgeThickness + 1;
271 } 272 }
272 // In maximized mode, we only have a titlebar strip of glass, no side/bottom 273 // In maximized mode, we only have a titlebar strip of glass, no side/bottom
273 // borders. 274 // borders.
274 if (!browser_view_->IsFullscreen()) { 275 if (!browser_view_->IsFullscreen()) {
275 margins.cyTopHeight = 276 margins.cyTopHeight =
276 GetBoundsForTabStrip(browser_view_->tabstrip()).bottom(); 277 GetBoundsForTabStrip(browser_view_->tabstrip()).bottom();
277 } 278 }
278 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); 279 DwmExtendFrameIntoClientArea(GetNativeView(), &margins);
279 } 280 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698