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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_common_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) 2013 The Chromium Authors. All rights reserved. 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 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_common_win.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_common_win.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_view.h" 7 #include "chrome/browser/ui/views/frame/browser_view.h"
8 #include "ui/base/theme_provider.h" 8 #include "ui/base/theme_provider.h"
9 9
10 namespace chrome { 10 namespace chrome {
11 11
12 bool ShouldUseNativeFrame(const BrowserView* browser_view, 12 bool ShouldUseNativeFrame(const BrowserView* browser_view,
13 const ui::ThemeProvider* theme_provider) { 13 const ui::ThemeProvider* theme_provider) {
14 // App panel windows draw their own frame.
15 if (browser_view->IsPanel())
16 return false;
17
18 // We don't theme popup or app windows, so regardless of whether or not a 14 // We don't theme popup or app windows, so regardless of whether or not a
19 // theme is active for normal browser windows, we don't want to use the custom 15 // theme is active for normal browser windows, we don't want to use the custom
20 // frame for popups/apps. 16 // frame for popups/apps.
21 if (!browser_view->IsBrowserTypeNormal()) { 17 if (!browser_view->IsBrowserTypeNormal()) {
22 return true; 18 return true;
23 } 19 }
24 // Otherwise, we use the native frame when we're told we should by the theme 20 // Otherwise, we use the native frame when we're told we should by the theme
25 // provider (e.g. no custom theme is active). 21 // provider (e.g. no custom theme is active).
26 return theme_provider->ShouldUseNativeFrame(); 22 return theme_provider->ShouldUseNativeFrame();
27 } 23 }
28 24
29 } // namespace browser 25 } // namespace browser
30
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698