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

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

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 10 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/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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (!browser_view_->IsBrowserTypeNormal() && 246 if (!browser_view_->IsBrowserTypeNormal() &&
247 !DesktopWindowTreeHostWin::IsUsingCustomFrame()) { 247 !DesktopWindowTreeHostWin::IsUsingCustomFrame()) {
248 return false; 248 return false;
249 } 249 }
250 250
251 // Otherwise, we use the native frame when we're told we should by the theme 251 // Otherwise, we use the native frame when we're told we should by the theme
252 // provider (e.g. no custom theme is active). 252 // provider (e.g. no custom theme is active).
253 return !GetWidget()->GetThemeProvider()->ShouldUseNativeFrame(); 253 return !GetWidget()->GetThemeProvider()->ShouldUseNativeFrame();
254 } 254 }
255 255
256 bool BrowserDesktopWindowTreeHostWin::ShouldUseNativeFrame() { 256 bool BrowserDesktopWindowTreeHostWin::ShouldUseNativeFrame() const {
257 if (!views::DesktopWindowTreeHostWin::ShouldUseNativeFrame()) 257 if (!views::DesktopWindowTreeHostWin::ShouldUseNativeFrame())
258 return false; 258 return false;
259 // This function can get called when the Browser window is closed i.e. in the 259 // This function can get called when the Browser window is closed i.e. in the
260 // context of the BrowserView destructor. 260 // context of the BrowserView destructor.
261 if (!browser_view_->browser()) 261 if (!browser_view_->browser())
262 return false; 262 return false;
263 return chrome::ShouldUseNativeFrame(browser_view_, 263 return chrome::ShouldUseNativeFrame(browser_view_,
264 GetWidget()->GetThemeProvider()); 264 GetWidget()->GetThemeProvider());
265 } 265 }
266 266
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( 325 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
326 views::internal::NativeWidgetDelegate* native_widget_delegate, 326 views::internal::NativeWidgetDelegate* native_widget_delegate,
327 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 327 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
328 BrowserView* browser_view, 328 BrowserView* browser_view,
329 BrowserFrame* browser_frame) { 329 BrowserFrame* browser_frame) {
330 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, 330 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate,
331 desktop_native_widget_aura, 331 desktop_native_widget_aura,
332 browser_view, 332 browser_view,
333 browser_frame); 333 browser_frame);
334 } 334 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698