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

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

Issue 2014043002: Make TracingImpl take a Shell* and args, instead of an ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « services/ui/launcher/launcher_app.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 26
27 void ViewManagerApp::Initialize(mojo::ApplicationImpl* app_impl) { 27 void ViewManagerApp::Initialize(mojo::ApplicationImpl* app_impl) {
28 app_impl_ = app_impl; 28 app_impl_ = app_impl;
29 29
30 auto command_line = base::CommandLine::ForCurrentProcess(); 30 auto command_line = base::CommandLine::ForCurrentProcess();
31 command_line->InitFromArgv(app_impl_->args()); 31 command_line->InitFromArgv(app_impl_->args());
32 logging::LoggingSettings settings; 32 logging::LoggingSettings settings;
33 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 33 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
34 logging::InitLogging(settings); 34 logging::InitLogging(settings);
35 35
36 tracing_.Initialize(app_impl_); 36 tracing_.Initialize(app_impl_->shell(), &app_impl_->args());
37 37
38 // Connect to compositor. 38 // Connect to compositor.
39 mojo::gfx::composition::CompositorPtr compositor; 39 mojo::gfx::composition::CompositorPtr compositor;
40 mojo::ConnectToService(app_impl_->shell(), "mojo:compositor_service", 40 mojo::ConnectToService(app_impl_->shell(), "mojo:compositor_service",
41 GetProxy(&compositor)); 41 GetProxy(&compositor));
42 compositor.set_connection_error_handler(base::Bind( 42 compositor.set_connection_error_handler(base::Bind(
43 &ViewManagerApp::OnCompositorConnectionError, base::Unretained(this))); 43 &ViewManagerApp::OnCompositorConnectionError, base::Unretained(this)));
44 44
45 // Create the registry. 45 // Create the registry.
46 registry_.reset(new ViewRegistry(compositor.Pass())); 46 registry_.reset(new ViewRegistry(compositor.Pass()));
(...skipping 14 matching lines...) Expand all
61 void ViewManagerApp::OnCompositorConnectionError() { 61 void ViewManagerApp::OnCompositorConnectionError() {
62 LOG(ERROR) << "Exiting due to compositor connection error."; 62 LOG(ERROR) << "Exiting due to compositor connection error.";
63 Shutdown(); 63 Shutdown();
64 } 64 }
65 65
66 void ViewManagerApp::Shutdown() { 66 void ViewManagerApp::Shutdown() {
67 app_impl_->Terminate(); 67 app_impl_->Terminate();
68 } 68 }
69 69
70 } // namespace view_manager 70 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/ui/launcher/launcher_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698