Index: mojo/services/html_viewer/html_document_view.cc |
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc |
index 9b24350c00e5e374782401628c1198927835be54..cb94931da3bdbdfe629b49faca4eae45a193e97c 100644 |
--- a/mojo/services/html_viewer/html_document_view.cc |
+++ b/mojo/services/html_viewer/html_document_view.cc |
@@ -11,7 +11,6 @@ |
#include "base/strings/string_util.h" |
#include "base/thread_task_runner_handle.h" |
#include "mojo/public/cpp/application/connect.h" |
-#include "mojo/public/cpp/application/service_provider_impl.h" |
#include "mojo/public/cpp/system/data_pipe.h" |
#include "mojo/public/interfaces/application/shell.mojom.h" |
#include "mojo/services/html_viewer/blink_input_events_type_converters.h" |
@@ -87,20 +86,16 @@ bool CanNavigateLocally(blink::WebFrame* frame, |
HTMLDocumentView::HTMLDocumentView( |
URLResponsePtr response, |
- InterfaceRequest<ServiceProvider> service_provider_request, |
- Shell* shell, |
+ ShellPtr shell, |
scoped_refptr<base::MessageLoopProxy> compositor_thread, |
WebMediaPlayerFactory* web_media_player_factory) |
- : shell_(shell), |
+ : shell_(shell.Pass()), |
web_view_(NULL), |
root_(NULL), |
- view_manager_client_factory_(shell, this), |
+ view_manager_client_factory_(shell_.get(), this), |
compositor_thread_(compositor_thread), |
web_media_player_factory_(web_media_player_factory), |
weak_factory_(this) { |
- ServiceProviderImpl* exported_services = new ServiceProviderImpl(); |
- exported_services->AddService(&view_manager_client_factory_); |
- BindToRequest(exported_services, &service_provider_request); |
Load(response.Pass()); |
} |
@@ -111,6 +106,15 @@ HTMLDocumentView::~HTMLDocumentView() { |
root_->RemoveObserver(this); |
} |
+void HTMLDocumentView::AcceptConnection(const String& requestor_url, |
+ ServiceProviderPtr provider) { |
+ exported_services_.AddService(&view_manager_client_factory_); |
+ WeakBindToPipe(&exported_services_, provider.PassMessagePipe()); |
+} |
+ |
+void HTMLDocumentView::Initialize(Array<String> args) { |
+} |
+ |
void HTMLDocumentView::OnEmbed( |
ViewManager* view_manager, |
View* root, |
@@ -180,7 +184,7 @@ blink::WebMediaPlayer* HTMLDocumentView::createMediaPlayer( |
const blink::WebURL& url, |
blink::WebMediaPlayerClient* client) { |
return web_media_player_factory_->CreateMediaPlayer( |
- frame, url, client, shell_); |
+ frame, url, client, shell_.get()); |
} |
blink::WebMediaPlayer* HTMLDocumentView::createMediaPlayer( |