Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / views / examples / examples_main.cc
index 9e028f0..d1be4b6 100644 (file)
@@ -2,10 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-#endif
-
 #include "base/at_exit.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #if !defined(OS_CHROMEOS)
 #include "ui/views/widget/desktop_aura/desktop_screen.h"
 #endif
+
 #if defined(OS_WIN)
 #include "ui/base/win/scoped_ole_initializer.h"
 #endif
 
+#if defined(USE_X11)
+#include "ui/gfx/x/x11_connection.h"
+#endif
+
 int main(int argc, char** argv) {
 #if defined(OS_WIN)
   ui::ScopedOleInitializer ole_initializer_;
@@ -43,7 +44,7 @@ int main(int argc, char** argv) {
 #if defined(USE_X11)
   // This demo uses InProcessContextFactory which uses X on a separate Gpu
   // thread.
-  XInitThreads();
+  gfx::InitializeThreadedX11();
 #endif
 
   gfx::GLSurface::InitializeOneOff();
@@ -65,7 +66,7 @@ int main(int argc, char** argv) {
 
   ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
 
-  aura::Env::CreateInstance();
+  aura::Env::CreateInstance(true);
 
   ui::InitializeInputMethodForTesting();