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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 resource_loader.ReleaseFile(kResourceFileStrings), | 88 resource_loader.ReleaseFile(kResourceFileStrings), |
89 base::MemoryMappedFile::Region::kWholeFile); | 89 base::MemoryMappedFile::Region::kWholeFile); |
90 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 90 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
91 resource_loader.ReleaseFile(kResourceFile100), ui::SCALE_FACTOR_100P); | 91 resource_loader.ReleaseFile(kResourceFile100), ui::SCALE_FACTOR_100P); |
92 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 92 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
93 resource_loader.ReleaseFile(kResourceFile200), ui::SCALE_FACTOR_200P); | 93 resource_loader.ReleaseFile(kResourceFile200), ui::SCALE_FACTOR_200P); |
94 } | 94 } |
95 | 95 |
96 void MandolineUIServicesApp::Initialize(mojo::Connector* connector, | 96 void MandolineUIServicesApp::Initialize(mojo::Connector* connector, |
97 const std::string& url, | 97 const std::string& url, |
98 uint32_t id, | 98 const std::string& user_id, |
99 uint32_t user_id) { | 99 uint32_t id) { |
100 connector_ = connector; | 100 connector_ = connector; |
101 surfaces_state_ = new SurfacesState; | 101 surfaces_state_ = new SurfacesState; |
102 | 102 |
103 base::PlatformThread::SetName("mus"); | 103 base::PlatformThread::SetName("mus"); |
104 | 104 |
105 #if defined(USE_X11) | 105 #if defined(USE_X11) |
106 XInitThreads(); | 106 XInitThreads(); |
107 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 107 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
108 if (command_line->HasSwitch(kUseX11TestConfig)) { | 108 if (command_line->HasSwitch(kUseX11TestConfig)) { |
109 ui::test::SetUseOverrideRedirectWindowByDefault(true); | 109 ui::test::SetUseOverrideRedirectWindowByDefault(true); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 ws::Display* host_impl = new ws::Display( | 236 ws::Display* host_impl = new ws::Display( |
237 connection_manager_.get(), connector_, gpu_state_, surfaces_state_); | 237 connection_manager_.get(), connector_, gpu_state_, surfaces_state_); |
238 | 238 |
239 scoped_ptr<ws::DisplayBindingImpl> display_binding(new ws::DisplayBindingImpl( | 239 scoped_ptr<ws::DisplayBindingImpl> display_binding(new ws::DisplayBindingImpl( |
240 std::move(host), host_impl, std::move(tree_client), | 240 std::move(host), host_impl, std::move(tree_client), |
241 connection_manager_.get())); | 241 connection_manager_.get())); |
242 host_impl->Init(std::move(display_binding)); | 242 host_impl->Init(std::move(display_binding)); |
243 } | 243 } |
244 | 244 |
245 } // namespace mus | 245 } // namespace mus |
OLD | NEW |