summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 15:50:37 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 15:50:37 +0000
commit7308f63c2e468c5867a2f678b38729daaf1cb466 (patch)
tree29e17b96862d800d05d96707ab002a79958ea133 /ui
parent7c89eaaeee37e2ae6d308af0eab7141ac8e03fa7 (diff)
downloadchromium_src-7308f63c2e468c5867a2f678b38729daaf1cb466.zip
chromium_src-7308f63c2e468c5867a2f678b38729daaf1cb466.tar.gz
chromium_src-7308f63c2e468c5867a2f678b38729daaf1cb466.tar.bz2
Revert 163414 - Always start up in --desktop-aura mode now, and open ash from tools menu.
(This broke win_aura on main waterfall.) - Implement host_desktop.cc and plumb a few places that need context to determine which style of desktop it belongs to. - Remove --desktop-aura, --open-ash, --enable-ash TBR=jam@chromium.org BUG=133312 Review URL: https://chromiumcodereview.appspot.com/11146023 TBR=scottmg@chromium.org Review URL: https://codereview.chromium.org/11230058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/test/aura_test_helper.cc1
-rw-r--r--ui/gfx/screen.cc6
-rw-r--r--ui/gfx/screen.h4
-rw-r--r--ui/gfx/screen_type_delegate.h4
-rw-r--r--ui/views/test/test_views_delegate.cc6
-rw-r--r--ui/views/views.gyp2
-rw-r--r--ui/views/views_switches.cc14
-rw-r--r--ui/views/views_switches.h19
8 files changed, 40 insertions, 16 deletions
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index 8267715..04902f7 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -76,7 +76,6 @@ void AuraTestHelper::TearDown() {
focus_manager_.reset();
root_window_.reset();
test_screen_.reset();
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL);
aura::Env::DeleteInstance();
}
diff --git a/ui/gfx/screen.cc b/ui/gfx/screen.cc
index 4b5045c..6685ab6 100644
--- a/ui/gfx/screen.cc
+++ b/ui/gfx/screen.cc
@@ -39,12 +39,6 @@ void Screen::SetScreenInstance(ScreenType type, Screen* instance) {
}
// static
-Screen* Screen::GetScreenByType(ScreenType type) {
- DCHECK(g_screen_[type]);
- return g_screen_[type];
-}
-
-// static
void Screen::SetScreenTypeDelegate(ScreenTypeDelegate* delegate) {
g_screen_type_delegate_ = delegate;
}
diff --git a/ui/gfx/screen.h b/ui/gfx/screen.h
index 580fde9..7e979c4 100644
--- a/ui/gfx/screen.h
+++ b/ui/gfx/screen.h
@@ -30,10 +30,6 @@ class UI_EXPORT Screen {
// ScreenType must be provided.
static void SetScreenInstance(ScreenType type, Screen* instance);
- // Returns the global screen for a particular type. Types other than _NATIVE
- // may be NULL.
- static Screen* GetScreenByType(ScreenType type);
-
// Sets the global ScreenTypeDelegate. May be left unset if the platform
// uses only the _NATIVE ScreenType.
static void SetScreenTypeDelegate(ScreenTypeDelegate* delegate);
diff --git a/ui/gfx/screen_type_delegate.h b/ui/gfx/screen_type_delegate.h
index 12e8d90..8477b53 100644
--- a/ui/gfx/screen_type_delegate.h
+++ b/ui/gfx/screen_type_delegate.h
@@ -11,11 +11,7 @@ namespace gfx {
enum UI_EXPORT ScreenType {
SCREEN_TYPE_NATIVE = 0,
-#if defined(OS_CHROMEOS)
- SCREEN_TYPE_ALTERNATE = SCREEN_TYPE_NATIVE,
-#else
SCREEN_TYPE_ALTERNATE,
-#endif
SCREEN_TYPE_LAST = SCREEN_TYPE_ALTERNATE,
};
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
index e39258ba..29d301d 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -7,9 +7,9 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "content/public/test/web_contents_tester.h"
+#include "ui/views/views_switches.h"
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
-#include "ui/gfx/screen.h"
#include "ui/views/widget/desktop_native_widget_aura.h"
#endif
@@ -72,6 +72,10 @@ NativeWidget* TestViewsDelegate::CreateNativeWidget(
Widget::InitParams::Type type,
internal::NativeWidgetDelegate* delegate,
gfx::NativeView parent) {
+#if defined(USE_AURA) && !defined(OS_CHROMEOS)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDesktopAura))
+ return new DesktopNativeWidgetAura(delegate);
+#endif
return NULL;
}
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index dbff51b..13675dd 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -302,6 +302,8 @@
'view_model.h',
'view_model_utils.cc',
'view_model_utils.h',
+ 'views_switches.cc',
+ 'views_switches.h',
'view_text_utils.cc',
'view_text_utils.h',
'view_win.cc',
diff --git a/ui/views/views_switches.cc b/ui/views/views_switches.cc
new file mode 100644
index 0000000..d5b49df
--- /dev/null
+++ b/ui/views/views_switches.cc
@@ -0,0 +1,14 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/views/views_switches.h"
+
+namespace views {
+namespace switches {
+
+// Run in desktop mode using the aura framework.
+const char kDesktopAura[] = "desktop-aura";
+
+} // namespace switches
+} // namespace views
diff --git a/ui/views/views_switches.h b/ui/views/views_switches.h
new file mode 100644
index 0000000..2537efc
--- /dev/null
+++ b/ui/views/views_switches.h
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_VIEWS_SWITCHES_H_
+#define UI_VIEWS_VIEWS_SWITCHES_H_
+
+#include "ui/views/views_export.h"
+
+namespace views {
+namespace switches {
+
+// Please keep alphabetized.
+VIEWS_EXPORT extern const char kDesktopAura[];
+
+} // namespace switches
+} // namespace views
+
+#endif // UI_VIEWS_VIEWS_SWITCHES_H_