OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/mus_app.h" | 5 #include "components/mus/mus_app.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "components/mus/gles2/gpu_impl.h" | 8 #include "components/mus/gles2/gpu_impl.h" |
9 #include "components/mus/public/cpp/args.h" | 9 #include "components/mus/public/cpp/args.h" |
10 #include "components/mus/surfaces/surfaces_scheduler.h" | 10 #include "components/mus/surfaces/surfaces_scheduler.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 MandolineUIServicesApp::~MandolineUIServicesApp() { | 42 MandolineUIServicesApp::~MandolineUIServicesApp() { |
43 if (gpu_state_) | 43 if (gpu_state_) |
44 gpu_state_->StopControlThread(); | 44 gpu_state_->StopControlThread(); |
45 // Destroy |connection_manager_| first, since it depends on |event_source_|. | 45 // Destroy |connection_manager_| first, since it depends on |event_source_|. |
46 connection_manager_.reset(); | 46 connection_manager_.reset(); |
47 } | 47 } |
48 | 48 |
49 void MandolineUIServicesApp::Initialize(ApplicationImpl* app) { | 49 void MandolineUIServicesApp::Initialize(ApplicationImpl* app) { |
50 app_impl_ = app; | 50 app_impl_ = app; |
51 tracing_.Initialize(app); | |
52 surfaces_state_ = new SurfacesState; | 51 surfaces_state_ = new SurfacesState; |
53 | 52 |
54 #if defined(USE_X11) | 53 #if defined(USE_X11) |
55 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 54 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
56 if (command_line->HasSwitch(kUseX11TestConfig)) { | 55 if (command_line->HasSwitch(kUseX11TestConfig)) { |
57 XInitThreads(); | 56 XInitThreads(); |
58 ui::test::SetUseOverrideRedirectWindowByDefault(true); | 57 ui::test::SetUseOverrideRedirectWindowByDefault(true); |
59 } | 58 } |
60 #endif | 59 #endif |
61 | 60 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 new ws::WindowTreeHostImpl(host_client.Pass(), connection_manager_.get(), | 137 new ws::WindowTreeHostImpl(host_client.Pass(), connection_manager_.get(), |
139 app_impl_, gpu_state_, surfaces_state_); | 138 app_impl_, gpu_state_, surfaces_state_); |
140 | 139 |
141 // WindowTreeHostConnection manages its own lifetime. | 140 // WindowTreeHostConnection manages its own lifetime. |
142 host_impl->Init(new ws::WindowTreeHostConnectionImpl( | 141 host_impl->Init(new ws::WindowTreeHostConnectionImpl( |
143 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), | 142 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), |
144 connection_manager_.get())); | 143 connection_manager_.get())); |
145 } | 144 } |
146 | 145 |
147 } // namespace mus | 146 } // namespace mus |
OLD | NEW |