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

Side by Side Diff: mojo/ui/content_viewer_app.cc

Issue 1979723002: ApplicationConnection devolution, part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « mojo/ui/content_viewer_app.h ('k') | mojo/ui/view_provider_app.h » ('j') | 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 "mojo/ui/content_viewer_app.h" 5 #include "mojo/ui/content_viewer_app.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 30 matching lines...) Expand all
41 app_impl_ = app_impl; 41 app_impl_ = app_impl;
42 42
43 auto command_line = base::CommandLine::ForCurrentProcess(); 43 auto command_line = base::CommandLine::ForCurrentProcess();
44 command_line->InitFromArgv(app_impl_->args()); 44 command_line->InitFromArgv(app_impl_->args());
45 logging::LoggingSettings settings; 45 logging::LoggingSettings settings;
46 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 46 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
47 logging::InitLogging(settings); 47 logging::InitLogging(settings);
48 } 48 }
49 49
50 bool ContentViewerApp::ConfigureIncomingConnection( 50 bool ContentViewerApp::ConfigureIncomingConnection(
51 mojo::ApplicationConnection* connection) { 51 ServiceProviderImpl* service_provider_impl) {
52 connection->GetServiceProviderImpl().AddService<ContentHandler>([this]( 52 service_provider_impl->AddService<ContentHandler>([this](
53 const ConnectionContext& connection_context, 53 const ConnectionContext& connection_context,
54 InterfaceRequest<ContentHandler> content_handler_request) { 54 InterfaceRequest<ContentHandler> content_handler_request) {
55 bindings_.AddBinding( 55 bindings_.AddBinding(
56 new DelegatingContentHandler(this, connection_context.connection_url), 56 new DelegatingContentHandler(this, connection_context.connection_url),
57 content_handler_request.Pass()); 57 content_handler_request.Pass());
58 }); 58 });
59 return true; 59 return true;
60 } 60 }
61 61
62 void ContentViewerApp::StartViewer( 62 void ContentViewerApp::StartViewer(
63 const std::string& content_handler_url, 63 const std::string& content_handler_url,
64 mojo::InterfaceRequest<mojo::Application> application_request, 64 mojo::InterfaceRequest<mojo::Application> application_request,
65 mojo::URLResponsePtr response) { 65 mojo::URLResponsePtr response) {
66 ViewProviderApp* app = LoadContent(content_handler_url, response.Pass()); 66 ViewProviderApp* app = LoadContent(content_handler_url, response.Pass());
67 if (app) 67 if (app)
68 new mojo::ApplicationImpl(app, application_request.Pass()); 68 new mojo::ApplicationImpl(app, application_request.Pass());
69 } 69 }
70 70
71 } // namespace ui 71 } // namespace ui
72 } // namespace mojo 72 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/ui/content_viewer_app.h ('k') | mojo/ui/view_provider_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698