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

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

Issue 13139004: Deprecate Browser::TYPE_PANEL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
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_root_window_host_win.h" 5 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 10 #include "chrome/browser/themes/theme_service_factory.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param); 201 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param);
202 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) { 202 if (window_pos->flags & SWP_SHOWWINDOW && GetWidget()->non_client_view()) {
203 GetWidget()->non_client_view()->Layout(); 203 GetWidget()->non_client_view()->Layout();
204 GetWidget()->non_client_view()->SchedulePaint(); 204 GetWidget()->non_client_view()->SchedulePaint();
205 } 205 }
206 break; 206 break;
207 } 207 }
208 } 208 }
209 209
210 bool BrowserDesktopRootWindowHostWin::IsUsingCustomFrame() const { 210 bool BrowserDesktopRootWindowHostWin::IsUsingCustomFrame() const {
211 // App panel windows draw their own frame.
212 if (browser_view_->IsPanel())
213 return true;
214
215 // We don't theme popup or app windows, so regardless of whether or not a 211 // We don't theme popup or app windows, so regardless of whether or not a
216 // theme is active for normal browser windows, we don't want to use the custom 212 // theme is active for normal browser windows, we don't want to use the custom
217 // frame for popups/apps. 213 // frame for popups/apps.
218 if (!browser_view_->IsBrowserTypeNormal() && 214 if (!browser_view_->IsBrowserTypeNormal() &&
219 !DesktopRootWindowHostWin::IsUsingCustomFrame()) { 215 !DesktopRootWindowHostWin::IsUsingCustomFrame()) {
220 return false; 216 return false;
221 } 217 }
222 218
223 // Otherwise, we use the native frame when we're told we should by the theme 219 // Otherwise, we use the native frame when we're told we should by the theme
224 // provider (e.g. no custom theme is active). 220 // provider (e.g. no custom theme is active).
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 285 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
290 const gfx::Rect& initial_bounds, 286 const gfx::Rect& initial_bounds,
291 BrowserView* browser_view, 287 BrowserView* browser_view,
292 BrowserFrame* browser_frame) { 288 BrowserFrame* browser_frame) {
293 return new BrowserDesktopRootWindowHostWin(native_widget_delegate, 289 return new BrowserDesktopRootWindowHostWin(native_widget_delegate,
294 desktop_native_widget_aura, 290 desktop_native_widget_aura,
295 initial_bounds, 291 initial_bounds,
296 browser_view, 292 browser_view,
297 browser_frame); 293 browser_frame);
298 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698