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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another busted command line flag Created 8 years, 2 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/accelerator_table.cc ('k') | chrome/browser/ui/views/frame/browser_frame_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 73f1b564e595168c33e77b4b72e8bcf04a91914c..b07cfe89cb34b267f41b0dc23b9be6a0016bef62 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -17,7 +17,6 @@
#include "chrome/common/pref_names.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
-#include "ui/views/views_switches.h"
#include "ui/views/widget/native_widget.h"
#include "ui/views/widget/widget.h"
@@ -146,9 +145,14 @@ views::NonClientFrameView* ChromeViewsDelegate::CreateDefaultNonClientFrameView(
bool ChromeViewsDelegate::UseTransparentWindows() const {
#if defined(USE_ASH)
- // Ash uses transparent window frames above.
- return !CommandLine::ForCurrentProcess()->HasSwitch(
- views::switches::kDesktopAura);
+ // TODO(scottmg): http://crbug.com/133312. This needs context to determine
+ // if it's desktop or ash.
+#if defined(OS_CHROMEOS)
+ return true;
+#else
+ NOTIMPLEMENTED();
+ return false;
+#endif
#else
return false;
#endif
@@ -191,8 +195,8 @@ views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
if (parent && type != views::Widget::InitParams::TYPE_MENU)
return new views::NativeWidgetAura(delegate);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- views::switches::kDesktopAura))
+ if (parent && chrome::GetHostDesktopTypeForNativeView(parent) ==
+ chrome::HOST_DESKTOP_TYPE_NATIVE)
return new views::DesktopNativeWidgetAura(delegate);
#endif
return NULL;
« no previous file with comments | « chrome/browser/ui/views/accelerator_table.cc ('k') | chrome/browser/ui/views/frame/browser_frame_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698