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

Side by Side Diff: ui/views/examples/examples_main.cc

Issue 2688593002: WIP: Towards merging OffscreenCanvas and Mus code
Patch Set: Fix reflector unit test Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ui/views/examples/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/power_monitor/power_monitor.h" 14 #include "base/power_monitor/power_monitor.h"
15 #include "base/power_monitor/power_monitor_device_source.h" 15 #include "base/power_monitor/power_monitor_device_source.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/test/test_discardable_memory_allocator.h" 17 #include "base/test/test_discardable_memory_allocator.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 #include "cc/surfaces/surface_manager.h" 19 #include "components/display_compositor/display_compositor.h"
20 #include "ui/base/ime/input_method_initializer.h" 20 #include "ui/base/ime/input_method_initializer.h"
21 #include "ui/base/material_design/material_design_controller.h" 21 #include "ui/base/material_design/material_design_controller.h"
22 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/base/ui_base_paths.h" 23 #include "ui/base/ui_base_paths.h"
24 #include "ui/compositor/test/in_process_context_factory.h" 24 #include "ui/compositor/test/in_process_context_factory.h"
25 #include "ui/display/screen.h" 25 #include "ui/display/screen.h"
26 #include "ui/gl/init/gl_factory.h" 26 #include "ui/gl/init/gl_factory.h"
27 #include "ui/views/examples/example_base.h" 27 #include "ui/views/examples/example_base.h"
28 #include "ui/views/examples/examples_window.h" 28 #include "ui/views/examples/examples_window.h"
29 #include "ui/views/test/desktop_test_views_delegate.h" 29 #include "ui/views/test/desktop_test_views_delegate.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #if defined(USE_X11) 61 #if defined(USE_X11)
62 // This demo uses InProcessContextFactory which uses X on a separate Gpu 62 // This demo uses InProcessContextFactory which uses X on a separate Gpu
63 // thread. 63 // thread.
64 gfx::InitializeThreadedX11(); 64 gfx::InitializeThreadedX11();
65 #endif 65 #endif
66 66
67 gl::init::InitializeGLOneOff(); 67 gl::init::InitializeGLOneOff();
68 68
69 // The ContextFactory must exist before any Compositors are created. 69 // The ContextFactory must exist before any Compositors are created.
70 bool context_factory_for_test = false; 70 bool context_factory_for_test = false;
71 cc::SurfaceManager surface_manager; 71 display_compositor::DisplayCompositor display_compositor;
72 std::unique_ptr<ui::InProcessContextFactory> context_factory( 72 std::unique_ptr<ui::InProcessContextFactory> context_factory(
73 new ui::InProcessContextFactory(context_factory_for_test, 73 new ui::InProcessContextFactory(context_factory_for_test,
74 &surface_manager)); 74 &display_compositor));
75 context_factory->set_use_test_surface(false); 75 context_factory->set_use_test_surface(false);
76 76
77 base::MessageLoopForUI message_loop; 77 base::MessageLoopForUI message_loop;
78 78
79 base::i18n::InitializeICU(); 79 base::i18n::InitializeICU();
80 80
81 ui::RegisterPathProvider(); 81 ui::RegisterPathProvider();
82 82
83 base::FilePath ui_test_pak_path; 83 base::FilePath ui_test_pak_path;
84 CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 84 CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 ui::ShutdownInputMethod(); 123 ui::ShutdownInputMethod();
124 124
125 #if defined(USE_AURA) 125 #if defined(USE_AURA)
126 env.reset(); 126 env.reset();
127 #endif 127 #endif
128 128
129 return 0; 129 return 0;
130 } 130 }
OLDNEW
« no previous file with comments | « ui/views/examples/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698