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

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

Issue 12251010: Ensure that when themes in desktop chrome AURA on Windows use the opaque browser frame view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/frame/browser_frame_common_win.h"
6
7 #include "chrome/browser/ui/views/frame/browser_view.h"
8 #include "ui/base/theme_provider.h"
9 #include "ui/views/widget/native_widget_private.h"
10
11 namespace chrome {
12
13 bool ShouldUseNativeFrame(
14 const views::internal::NativeWidgetPrivate* native_widget,
15 const BrowserView* browser_view,
16 const ui::ThemeProvider* theme_provider) {
17 // App panel windows draw their own frame.
18 if (browser_view->IsPanel())
19 return false;
20
21 // We don't theme popup or app windows, so regardless of whether or not a
22 // theme is active for normal browser windows, we don't want to use the custom
23 // frame for popups/apps.
24 if (!browser_view->IsBrowserTypeNormal() &&
25 native_widget->ShouldUseNativeFrame()) {
26 return true;
27 }
28 // Otherwise, we use the native frame when we're told we should by the theme
29 // provider (e.g. no custom theme is active).
30 return theme_provider->ShouldUseNativeFrame();
31 }
32
33 } // namespace browser
34
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_common_win.h ('k') | chrome/browser/ui/views/frame/browser_frame_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698