| 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/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 resource_loader.ReleaseFile(kResourceFileStrings), | 87 resource_loader.ReleaseFile(kResourceFileStrings), |
| 88 base::MemoryMappedFile::Region::kWholeFile); | 88 base::MemoryMappedFile::Region::kWholeFile); |
| 89 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 89 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
| 90 resource_loader.ReleaseFile(kResourceFile100), ui::SCALE_FACTOR_100P); | 90 resource_loader.ReleaseFile(kResourceFile100), ui::SCALE_FACTOR_100P); |
| 91 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 91 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
| 92 resource_loader.ReleaseFile(kResourceFile200), ui::SCALE_FACTOR_200P); | 92 resource_loader.ReleaseFile(kResourceFile200), ui::SCALE_FACTOR_200P); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void MandolineUIServicesApp::Initialize(mojo::Shell* shell, | 95 void MandolineUIServicesApp::Initialize(mojo::Shell* shell, |
| 96 const std::string& url, | 96 const std::string& url, |
| 97 uint32_t id) { | 97 uint32_t id, |
| 98 uint32_t user_id) { |
| 98 shell_ = shell; | 99 shell_ = shell; |
| 99 surfaces_state_ = new SurfacesState; | 100 surfaces_state_ = new SurfacesState; |
| 100 | 101 |
| 101 base::PlatformThread::SetName("mus"); | 102 base::PlatformThread::SetName("mus"); |
| 102 | 103 |
| 103 #if defined(USE_X11) | 104 #if defined(USE_X11) |
| 104 XInitThreads(); | 105 XInitThreads(); |
| 105 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 106 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 106 if (command_line->HasSwitch(kUseX11TestConfig)) { | 107 if (command_line->HasSwitch(kUseX11TestConfig)) { |
| 107 ui::test::SetUseOverrideRedirectWindowByDefault(true); | 108 ui::test::SetUseOverrideRedirectWindowByDefault(true); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( | 232 ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( |
| 232 connection_manager_.get(), shell_, gpu_state_, surfaces_state_); | 233 connection_manager_.get(), shell_, gpu_state_, surfaces_state_); |
| 233 | 234 |
| 234 // WindowTreeHostConnection manages its own lifetime. | 235 // WindowTreeHostConnection manages its own lifetime. |
| 235 host_impl->Init(new ws::WindowTreeHostConnectionImpl( | 236 host_impl->Init(new ws::WindowTreeHostConnectionImpl( |
| 236 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), | 237 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), |
| 237 connection_manager_.get())); | 238 connection_manager_.get())); |
| 238 } | 239 } |
| 239 | 240 |
| 240 } // namespace mus | 241 } // namespace mus |
| OLD | NEW |