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

Unified Diff: ui/views/examples/examples_main.cc

Issue 418223002: Get views_examples_exe compiling with use_aura=0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/examples_main.cc
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc
index 4dc9fbec15391319ac8850b345fb94f73aab5f35..a751a0d29e78fa0c87f3551ca16ff4dc4a1b0279 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698