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

Side by Side Diff: services/dart/content_handler_main.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: Created 5 years, 10 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 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 "mojo/application/application_runner_chromium.h" 5 #include "mojo/application/application_runner_chromium.h"
6 #include "mojo/application/content_handler_factory.h" 6 #include "mojo/application/content_handler_factory.h"
7 #include "mojo/dart/embedder/dart_controller.h" 7 #include "mojo/dart/embedder/dart_controller.h"
8 #include "mojo/icu/icu.h" 8 #include "mojo/icu/icu.h"
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Overridden from ApplicationDelegate: 36 // Overridden from ApplicationDelegate:
37 bool ConfigureIncomingConnection( 37 bool ConfigureIncomingConnection(
38 mojo::ApplicationConnection* connection) override { 38 mojo::ApplicationConnection* connection) override {
39 connection->AddService(&content_handler_factory_); 39 connection->AddService(&content_handler_factory_);
40 return true; 40 return true;
41 } 41 }
42 42
43 // Overridden from ContentHandlerFactory::ManagedDelegate: 43 // Overridden from ContentHandlerFactory::ManagedDelegate:
44 scoped_ptr<mojo::ContentHandlerFactory::HandledApplicationHolder> 44 scoped_ptr<mojo::ContentHandlerFactory::HandledApplicationHolder>
45 CreateApplication(mojo::ShellPtr shell, 45 CreateApplication(
46 mojo::URLResponsePtr response) override { 46 mojo::InterfaceRequest<mojo::Application> application_request,
47 return make_scoped_ptr(new DartApp(shell.Pass(), response.Pass())); 47 mojo::URLResponsePtr response) override {
48 return make_scoped_ptr(
49 new DartApp(application_request.Pass(), response.Pass()));
48 } 50 }
49 51
50 mojo::ContentHandlerFactory content_handler_factory_; 52 mojo::ContentHandlerFactory content_handler_factory_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(DartContentHandler); 54 DISALLOW_COPY_AND_ASSIGN(DartContentHandler);
53 }; 55 };
54 56
55 } // namespace dart 57 } // namespace dart
56 58
57 MojoResult MojoMain(MojoHandle shell_handle) { 59 MojoResult MojoMain(MojoHandle shell_handle) {
58 mojo::ApplicationRunnerChromium runner(new dart::DartContentHandler); 60 mojo::ApplicationRunnerChromium runner(new dart::DartContentHandler);
59 return runner.Run(shell_handle); 61 return runner.Run(shell_handle);
60 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698