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

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

Issue 99553008: Fix regression where the active window header was not used for apps on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // position when the window becomes visible. This fixes bugs where the icon 269 // position when the window becomes visible. This fixes bugs where the icon
270 // appears to overlay the minimize button. 270 // appears to overlay the minimize button.
271 // Note that we will call Layout every time SetWindowPos is called with 271 // Note that we will call Layout every time SetWindowPos is called with
272 // SWP_SHOWWINDOW, however callers typically are careful about not 272 // SWP_SHOWWINDOW, however callers typically are careful about not
273 // specifying this flag unless necessary to avoid flicker. 273 // specifying this flag unless necessary to avoid flicker.
274 // This may be invoked during creation on XP and before the non_client_view 274 // This may be invoked during creation on XP and before the non_client_view
275 // has been created. 275 // has been created.
276 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param); 276 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param);
277 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) { 277 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) {
278 GetWidget()->non_client_view()->Layout(); 278 GetWidget()->non_client_view()->Layout();
279 GetWidget()->non_client_view()->SchedulePaint(); 279 GetWidget()->non_client_view()->frame_view()->SchedulePaint();
280 } 280 }
281 break; 281 break;
282 } 282 }
283 } 283 }
284 284
285 bool BrowserFrameWin::ShouldUseNativeFrame() const { 285 bool BrowserFrameWin::ShouldUseNativeFrame() const {
286 if (!NativeWidgetWin::ShouldUseNativeFrame()) 286 if (!NativeWidgetWin::ShouldUseNativeFrame())
287 return false; 287 return false;
288 return chrome::ShouldUseNativeFrame(browser_view_, 288 return chrome::ShouldUseNativeFrame(browser_view_,
289 GetWidget()->GetThemeProvider()); 289 GetWidget()->GetThemeProvider());
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 //////////////////////////////////////////////////////////////////////////////// 516 ////////////////////////////////////////////////////////////////////////////////
517 // BrowserFrame, public: 517 // BrowserFrame, public:
518 518
519 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { 519 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() {
520 if (win8::IsSingleWindowMetroMode()) { 520 if (win8::IsSingleWindowMetroMode()) {
521 if (ui::GetDisplayLayout() == ui::LAYOUT_DESKTOP) 521 if (ui::GetDisplayLayout() == ui::LAYOUT_DESKTOP)
522 return false; 522 return false;
523 } 523 }
524 return !IsMaximized(); 524 return !IsMaximized();
525 } 525 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698