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

Unified Diff: chrome/browser/ui/views/frame/browser_frame_win.cc

Issue 12257014: Revert 182281 - Broke Chome Frame tests. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_common_win.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_frame_win.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_frame_win.cc (revision 182293)
+++ chrome/browser/ui/views/frame/browser_frame_win.cc (working copy)
@@ -20,7 +20,6 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/views/frame/browser_frame_common_win.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/system_menu_insertion_delegate_win.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
@@ -277,9 +276,21 @@
}
bool BrowserFrameWin::ShouldUseNativeFrame() const {
- return chrome::ShouldUseNativeFrame(this,
- browser_view_,
- GetWidget()->GetThemeProvider());
+ // App panel windows draw their own frame.
+ if (browser_view_->IsPanel())
+ return false;
+
+ // We don't theme popup or app windows, so regardless of whether or not a
+ // theme is active for normal browser windows, we don't want to use the custom
+ // frame for popups/apps.
+ if (!browser_view_->IsBrowserTypeNormal() &&
+ NativeWidgetWin::ShouldUseNativeFrame()) {
+ return true;
+ }
+
+ // Otherwise, we use the native frame when we're told we should by the theme
+ // provider (e.g. no custom theme is active).
+ return GetWidget()->GetThemeProvider()->ShouldUseNativeFrame();
}
void BrowserFrameWin::Show() {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_common_win.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698