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

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

Issue 11273107: Fix BrowserFrameWin artifact on opaque to glass frame changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 8 years, 1 month 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) 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_frame_win.h" 5 #include "chrome/browser/ui/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 #include <set> 9 #include <set>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // client edge over part of the default frame. 170 // client edge over part of the default frame.
171 if (IsFullscreen()) 171 if (IsFullscreen())
172 border_thickness = 0; 172 border_thickness = 0;
173 else if (!IsMaximized()) 173 else if (!IsMaximized())
174 border_thickness -= kClientEdgeThickness; 174 border_thickness -= kClientEdgeThickness;
175 insets->Set(0, border_thickness, border_thickness, border_thickness); 175 insets->Set(0, border_thickness, border_thickness, border_thickness);
176 return true; 176 return true;
177 } 177 }
178 178
179 void BrowserFrameWin::HandleFrameChanged() { 179 void BrowserFrameWin::HandleFrameChanged() {
180 // We need to update the glass region on or off before the base class adjusts 180 // Handle window frame layout changes, then set the updated glass region.
181 // the window region. 181 NativeWidgetWin::HandleFrameChanged();
182 UpdateDWMFrame(); 182 UpdateDWMFrame();
183 NativeWidgetWin::HandleFrameChanged();
184 } 183 }
185 184
186 bool BrowserFrameWin::PreHandleMSG(UINT message, 185 bool BrowserFrameWin::PreHandleMSG(UINT message,
187 WPARAM w_param, 186 WPARAM w_param,
188 LPARAM l_param, 187 LPARAM l_param,
189 LRESULT* result) { 188 LRESULT* result) {
190 static const UINT metro_navigation_search_message = 189 static const UINT metro_navigation_search_message =
191 RegisterWindowMessage(chrome::kMetroNavigationAndSearchMessage); 190 RegisterWindowMessage(chrome::kMetroNavigationAndSearchMessage);
192 191
193 static const UINT metro_get_current_tab_info_message = 192 static const UINT metro_get_current_tab_info_message =
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // because the GDI-drawn text in the web content composited over it will 447 // because the GDI-drawn text in the web content composited over it will
449 // become semi-transparent over any glass area. 448 // become semi-transparent over any glass area.
450 if (!IsMaximized() && !IsFullscreen()) { 449 if (!IsMaximized() && !IsFullscreen()) {
451 margins.cxLeftWidth = kClientEdgeThickness + 1; 450 margins.cxLeftWidth = kClientEdgeThickness + 1;
452 margins.cxRightWidth = kClientEdgeThickness + 1; 451 margins.cxRightWidth = kClientEdgeThickness + 1;
453 margins.cyBottomHeight = kClientEdgeThickness + 1; 452 margins.cyBottomHeight = kClientEdgeThickness + 1;
454 margins.cyTopHeight = kClientEdgeThickness + 1; 453 margins.cyTopHeight = kClientEdgeThickness + 1;
455 } 454 }
456 // In maximized mode, we only have a titlebar strip of glass, no side/bottom 455 // In maximized mode, we only have a titlebar strip of glass, no side/bottom
457 // borders. 456 // borders.
458 if (!browser_view_->IsFullscreen()) { 457 if (!IsFullscreen()) {
459 gfx::Rect tabstrip_bounds( 458 gfx::Rect tabstrip_bounds(
460 browser_frame_->GetBoundsForTabStrip(browser_view_->tabstrip())); 459 browser_frame_->GetBoundsForTabStrip(browser_view_->tabstrip()));
461 margins.cyTopHeight = tabstrip_bounds.bottom() + kDWMFrameTopOffset; 460 margins.cyTopHeight = tabstrip_bounds.bottom() + kDWMFrameTopOffset;
462 } 461 }
463 } 462 }
464 463
465 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); 464 DwmExtendFrameIntoClientArea(GetNativeView(), &margins);
466 } 465 }
467 466
468 void BrowserFrameWin::BuildSystemMenuForBrowserWindow() { 467 void BrowserFrameWin::BuildSystemMenuForBrowserWindow() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 614
616 //////////////////////////////////////////////////////////////////////////////// 615 ////////////////////////////////////////////////////////////////////////////////
617 // NativeBrowserFrame, public: 616 // NativeBrowserFrame, public:
618 617
619 // static 618 // static
620 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( 619 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame(
621 BrowserFrame* browser_frame, 620 BrowserFrame* browser_frame,
622 BrowserView* browser_view) { 621 BrowserView* browser_view) {
623 return new BrowserFrameWin(browser_frame, browser_view); 622 return new BrowserFrameWin(browser_frame, browser_view);
624 } 623 }
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