| OLD | NEW |
| 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 "sky/viewer/content_handler_impl.h" | 5 #include "sky/viewer/content_handler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "mojo/public/cpp/application/connect.h" | 8 #include "mojo/public/cpp/application/connect.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 #include "mojo/public/cpp/utility/run_loop.h" | 10 #include "mojo/public/cpp/utility/run_loop.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 shell_.get()); | 70 shell_.get()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 mojo::String url_; | 73 mojo::String url_; |
| 74 mojo::StrongBinding<mojo::Application> binding_; | 74 mojo::StrongBinding<mojo::Application> binding_; |
| 75 mojo::ShellPtr shell_; | 75 mojo::ShellPtr shell_; |
| 76 mojo::NetworkServicePtr network_service_; | 76 mojo::NetworkServicePtr network_service_; |
| 77 mojo::URLResponsePtr initial_response_; | 77 mojo::URLResponsePtr initial_response_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 ContentHandlerImpl::ContentHandlerImpl() { | 80 ContentHandlerImpl::ContentHandlerImpl( |
| 81 mojo::InterfaceRequest<mojo::ContentHandler> request) |
| 82 : binding_(this, request.Pass()) { |
| 81 } | 83 } |
| 82 | 84 |
| 83 ContentHandlerImpl::~ContentHandlerImpl() { | 85 ContentHandlerImpl::~ContentHandlerImpl() { |
| 84 } | 86 } |
| 85 | 87 |
| 86 void ContentHandlerImpl::StartApplication( | 88 void ContentHandlerImpl::StartApplication( |
| 87 mojo::InterfaceRequest<mojo::Application> application, | 89 mojo::InterfaceRequest<mojo::Application> application, |
| 88 mojo::URLResponsePtr response) { | 90 mojo::URLResponsePtr response) { |
| 89 new SkyApplication(application.Pass(), response.Pass()); | 91 new SkyApplication(application.Pass(), response.Pass()); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace sky | 94 } // namespace sky |
| OLD | NEW |