OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/view_manager/view_manager_app.h" | 5 #include "services/ui/view_manager/view_manager_app.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 auto command_line = base::CommandLine::ForCurrentProcess(); | 29 auto command_line = base::CommandLine::ForCurrentProcess(); |
30 command_line->InitFromArgv(app_impl_->args()); | 30 command_line->InitFromArgv(app_impl_->args()); |
31 logging::LoggingSettings settings; | 31 logging::LoggingSettings settings; |
32 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 32 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
33 logging::InitLogging(settings); | 33 logging::InitLogging(settings); |
34 | 34 |
35 tracing_.Initialize(app_impl_); | 35 tracing_.Initialize(app_impl_); |
36 | 36 |
37 // Connect to compositor. | 37 // Connect to compositor. |
38 mojo::gfx::composition::CompositorPtr compositor; | 38 mojo::gfx::composition::CompositorPtr compositor; |
39 app_impl_->ConnectToService("mojo:compositor_service", &compositor); | 39 app_impl_->ConnectToServiceDeprecated("mojo:compositor_service", &compositor); |
40 compositor.set_connection_error_handler(base::Bind( | 40 compositor.set_connection_error_handler(base::Bind( |
41 &ViewManagerApp::OnCompositorConnectionError, base::Unretained(this))); | 41 &ViewManagerApp::OnCompositorConnectionError, base::Unretained(this))); |
42 | 42 |
43 // Create the registry. | 43 // Create the registry. |
44 registry_.reset(new ViewRegistry(compositor.Pass())); | 44 registry_.reset(new ViewRegistry(compositor.Pass())); |
45 | 45 |
46 // Connect to associates. | 46 // Connect to associates. |
47 // TODO(jeffbrown): Consider making the launcher register associates | 47 // TODO(jeffbrown): Consider making the launcher register associates |
48 // with the view manager or perhaps per view tree. | 48 // with the view manager or perhaps per view tree. |
49 std::vector<std::string> associate_urls = command_line->GetArgs(); | 49 std::vector<std::string> associate_urls = command_line->GetArgs(); |
(...skipping 29 matching lines...) Expand all Loading... |
79 void ViewManagerApp::OnAssociateConnectionError(const std::string& url) { | 79 void ViewManagerApp::OnAssociateConnectionError(const std::string& url) { |
80 LOG(ERROR) << "Exiting due to view associate connection error: url=" << url; | 80 LOG(ERROR) << "Exiting due to view associate connection error: url=" << url; |
81 Shutdown(); | 81 Shutdown(); |
82 } | 82 } |
83 | 83 |
84 void ViewManagerApp::Shutdown() { | 84 void ViewManagerApp::Shutdown() { |
85 app_impl_->Terminate(); | 85 app_impl_->Terminate(); |
86 } | 86 } |
87 | 87 |
88 } // namespace view_manager | 88 } // namespace view_manager |
OLD | NEW |