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

Side by Side Diff: services/ui/view_manager/view_manager_app.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « services/ui/view_manager/view_associate_table.cc ('k') | services/url_response_disk_cache/url_response_disk_cache_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698