Chromium Code Reviews| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 public: | 44 public: |
| 45 HTMLViewerApplication(InterfaceRequest<Application> request, | 45 HTMLViewerApplication(InterfaceRequest<Application> request, |
| 46 URLResponsePtr response, | 46 URLResponsePtr response, |
| 47 Setup* setup) | 47 Setup* setup) |
| 48 : url_(response->url), | 48 : url_(response->url), |
| 49 binding_(this, request.Pass()), | 49 binding_(this, request.Pass()), |
| 50 initial_response_(response.Pass()), | 50 initial_response_(response.Pass()), |
| 51 setup_(setup) {} | 51 setup_(setup) {} |
| 52 | 52 |
| 53 void Initialize(ShellPtr shell, | 53 void Initialize(ShellPtr shell, |
| 54 Array<String> args, | |
| 55 const String& url) override { | 54 const String& url) override { |
|
msw
2015/05/19 17:45:26
nit: fits on line above.
jam
2015/05/19 20:56:36
Done.
| |
| 56 ServiceProviderPtr service_provider; | 55 ServiceProviderPtr service_provider; |
| 57 shell_ = shell.Pass(); | 56 shell_ = shell.Pass(); |
| 58 shell_->ConnectToApplication("mojo:network_service", | 57 shell_->ConnectToApplication("mojo:network_service", |
| 59 GetProxy(&service_provider), nullptr); | 58 GetProxy(&service_provider), nullptr); |
| 60 ConnectToService(service_provider.get(), &network_service_); | 59 ConnectToService(service_provider.get(), &network_service_); |
| 61 } | 60 } |
| 62 | 61 |
| 63 void AcceptConnection(const String& requestor_url, | 62 void AcceptConnection(const String& requestor_url, |
| 64 InterfaceRequest<ServiceProvider> services, | 63 InterfaceRequest<ServiceProvider> services, |
| 65 ServiceProviderPtr exposed_services, | 64 ServiceProviderPtr exposed_services, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 | 158 |
| 160 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); | 159 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); |
| 161 }; | 160 }; |
| 162 | 161 |
| 163 } // namespace html_viewer | 162 } // namespace html_viewer |
| 164 | 163 |
| 165 MojoResult MojoMain(MojoHandle shell_handle) { | 164 MojoResult MojoMain(MojoHandle shell_handle) { |
| 166 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer); | 165 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer); |
| 167 return runner.Run(shell_handle); | 166 return runner.Run(shell_handle); |
| 168 } | 167 } |
| OLD | NEW |