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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 scoped_refptr<base::MessageLoopProxy> compositor_thread, | 68 scoped_refptr<base::MessageLoopProxy> compositor_thread, |
69 WebMediaPlayerFactory* web_media_player_factory, | 69 WebMediaPlayerFactory* web_media_player_factory, |
70 bool is_headless) | 70 bool is_headless) |
71 : url_(response->url), | 71 : url_(response->url), |
72 binding_(this, request.Pass()), | 72 binding_(this, request.Pass()), |
73 initial_response_(response.Pass()), | 73 initial_response_(response.Pass()), |
74 compositor_thread_(compositor_thread), | 74 compositor_thread_(compositor_thread), |
75 web_media_player_factory_(web_media_player_factory), | 75 web_media_player_factory_(web_media_player_factory), |
76 is_headless_(is_headless) {} | 76 is_headless_(is_headless) {} |
77 | 77 |
78 void Initialize(ShellPtr shell, Array<String> args) override { | 78 void Initialize(ShellPtr shell, |
| 79 Array<String> args, |
| 80 const String& url) override { |
79 ServiceProviderPtr service_provider; | 81 ServiceProviderPtr service_provider; |
80 shell_ = shell.Pass(); | 82 shell_ = shell.Pass(); |
81 shell_->ConnectToApplication("mojo:network_service", | 83 shell_->ConnectToApplication("mojo:network_service", |
82 GetProxy(&service_provider), nullptr); | 84 GetProxy(&service_provider), nullptr); |
83 ConnectToService(service_provider.get(), &network_service_); | 85 ConnectToService(service_provider.get(), &network_service_); |
84 } | 86 } |
85 | 87 |
86 void AcceptConnection(const String& requestor_url, | 88 void AcceptConnection(const String& requestor_url, |
87 InterfaceRequest<ServiceProvider> services, | 89 InterfaceRequest<ServiceProvider> services, |
88 ServiceProviderPtr exposed_services) override { | 90 ServiceProviderPtr exposed_services) override { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 233 |
232 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); | 234 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); |
233 }; | 235 }; |
234 | 236 |
235 } // namespace html_viewer | 237 } // namespace html_viewer |
236 | 238 |
237 MojoResult MojoMain(MojoHandle shell_handle) { | 239 MojoResult MojoMain(MojoHandle shell_handle) { |
238 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer); | 240 mojo::ApplicationRunnerChromium runner(new html_viewer::HTMLViewer); |
239 return runner.Run(shell_handle); | 241 return runner.Run(shell_handle); |
240 } | 242 } |
OLD | NEW |