Index: mojo/services/html_viewer/html_viewer.cc |
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc |
index 014f2381c4d8c4642dcd10f6c882cc6817cafade..bb8ea922f18c9f06bde2a7ca09820b8c3f7f5eb1 100644 |
--- a/mojo/services/html_viewer/html_viewer.cc |
+++ b/mojo/services/html_viewer/html_viewer.cc |
@@ -14,28 +14,27 @@ |
#include "mojo/services/public/cpp/view_manager/view_manager.h" |
#include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" |
#include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" |
-#include "mojo/services/public/interfaces/navigation/navigation.mojom.h" |
+#include "mojo/services/public/interfaces/content_handler/content_handler.mojom.h" |
#include "third_party/WebKit/public/web/WebKit.h" |
namespace mojo { |
class HTMLViewer; |
-class NavigatorImpl : public InterfaceImpl<Navigator> { |
+class ContentHandlerImpl : public InterfaceImpl<ContentHandler> { |
public: |
- explicit NavigatorImpl(HTMLViewer* viewer) : viewer_(viewer) {} |
- virtual ~NavigatorImpl() {} |
+ explicit ContentHandlerImpl(HTMLViewer* viewer) : viewer_(viewer) {} |
+ virtual ~ContentHandlerImpl() {} |
private: |
- // Overridden from Navigator: |
- virtual void Navigate( |
- uint32_t view_id, |
- NavigationDetailsPtr navigation_details, |
- ResponseDetailsPtr response_details) OVERRIDE; |
+ // Overridden from ContentHandler: |
+ virtual void OnConnect(mojo::String url, |
+ ResponseDetailsPtr response_details, |
+ ServiceProviderPtr service_provider) OVERRIDE; |
HTMLViewer* viewer_; |
- DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
+ DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl); |
}; |
class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate { |
@@ -43,7 +42,7 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate { |
HTMLViewer() |
: application_impl_(NULL), |
document_view_(NULL), |
- navigator_factory_(this), |
+ content_handler_factory_(this), |
view_manager_client_factory_(this) {} |
virtual ~HTMLViewer() { |
blink::shutdown(); |
@@ -65,7 +64,7 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate { |
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
OVERRIDE { |
- connection->AddService(&navigator_factory_); |
+ connection->AddService(&content_handler_factory_); |
connection->AddService(&view_manager_client_factory_); |
return true; |
} |
@@ -97,17 +96,17 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate { |
// TODO(darin): Figure out proper ownership of this instance. |
HTMLDocumentView* document_view_; |
ResponseDetailsPtr response_details_; |
- InterfaceFactoryImplWithContext<NavigatorImpl, HTMLViewer> navigator_factory_; |
+ InterfaceFactoryImplWithContext<ContentHandlerImpl, HTMLViewer> |
+ content_handler_factory_; |
ViewManagerClientFactory view_manager_client_factory_; |
DISALLOW_COPY_AND_ASSIGN(HTMLViewer); |
}; |
-void NavigatorImpl::Navigate( |
- uint32_t view_id, |
- NavigationDetailsPtr navigation_details, |
- ResponseDetailsPtr response_details) { |
- viewer_->Load(response_details.Pass()); |
+void ContentHandlerImpl::OnConnect(const mojo::String& url, |
+ URLResponsePtr url_response, |
+ ServiceProviderPtr service_provider) { |
+ viewer_->Load(url_response.Pass()); |
} |
// static |