summaryrefslogtreecommitdiffstats
path: root/ui/views/examples
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 07:09:11 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 07:09:11 +0000
commit51289b1dd9f03158bb5631edba8c86da4ec0d70f (patch)
tree2a583a81ea1b5e708c7c22a0ed01d02d82fff0d6 /ui/views/examples
parent9cfa1257745fbec6e258aba6399fa86be4684674 (diff)
downloadchromium_src-51289b1dd9f03158bb5631edba8c86da4ec0d70f.zip
chromium_src-51289b1dd9f03158bb5631edba8c86da4ec0d70f.tar.gz
chromium_src-51289b1dd9f03158bb5631edba8c86da4ec0d70f.tar.bz2
Get views_examples_exe compiling with use_aura=0.
Exclude USE_AURA specific code with preprocessor blocks. Related to https://codereview.chromium.org/413303003/ (both are needed for a clean build on ToT@285384) BUG=395507 TEST=NONE R=sky@chromium.org Review URL: https://codereview.chromium.org/418223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/examples')
-rw-r--r--ui/views/examples/examples_main.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc
index 4dc9fbe..a751a0d 100644
--- a/ui/views/examples/examples_main.cc
+++ b/ui/views/examples/examples_main.cc
@@ -9,7 +9,6 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
-#include "ui/aura/env.h"
#include "ui/base/ime/input_method_initializer.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
@@ -19,9 +18,13 @@
#include "ui/views/examples/example_base.h"
#include "ui/views/examples/examples_window.h"
#include "ui/views/test/desktop_test_views_delegate.h"
+
+#if defined(USE_AURA)
+#include "ui/aura/env.h"
#include "ui/wm/core/wm_state.h"
+#endif
-#if !defined(OS_CHROMEOS)
+#if !defined(OS_CHROMEOS) && defined(USE_AURA)
#include "ui/views/widget/desktop_aura/desktop_screen.h"
#endif
@@ -64,16 +67,18 @@ int main(int argc, char** argv) {
DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+#if defined(USE_AURA)
aura::Env::CreateInstance(true);
aura::Env::GetInstance()->set_context_factory(context_factory.get());
-
+#endif
ui::InitializeInputMethodForTesting();
{
views::DesktopTestViewsDelegate views_delegate;
+#if defined(USE_AURA)
wm::WMState wm_state;
-
-#if !defined(OS_CHROMEOS)
+#endif
+#if !defined(OS_CHROMEOS) && defined(USE_AURA)
scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen());
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
desktop_screen.get());
@@ -91,7 +96,9 @@ int main(int argc, char** argv) {
ui::ShutdownInputMethod();
+#if defined(USE_AURA)
aura::Env::DeleteInstance();
+#endif
return 0;
}