Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2629)

Unified Diff: sky/viewer/document_view.h

Issue 741453002: Make sure that Content Handled application can be connected multiple times. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/viewer/document_view.h
diff --git a/sky/viewer/document_view.h b/sky/viewer/document_view.h
index d52ce7913a3764e483e7c75801eb0aeb2442bd28..4f77e6b5c1971a82d0c76797b81d22a82109fb73 100644
--- a/sky/viewer/document_view.h
+++ b/sky/viewer/document_view.h
@@ -5,6 +5,7 @@
#ifndef SKY_VIEWER_DOCUMENT_VIEW_H_
#define SKY_VIEWER_DOCUMENT_VIEW_H_
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/application/lazy_interface_ptr.h"
@@ -35,8 +36,7 @@ namespace sky {
class ScriptRunner;
class WebLayerTreeViewImpl;
-class DocumentView : public mojo::InterfaceImpl<mojo::Application>,
- public blink::ServiceProvider,
+class DocumentView : public blink::ServiceProvider,
public blink::WebViewClient,
public blink::WebFrameClient,
public mojo::ViewManagerDelegate,
@@ -45,8 +45,10 @@ class DocumentView : public mojo::InterfaceImpl<mojo::Application>,
// Load a new HTMLDocument with |response|.
//
// |shell| is the Shell connection for this mojo::Application.
- DocumentView(mojo::URLResponsePtr response,
- mojo::ShellPtr shell,
+ DocumentView(const base::Closure& destruction_callback,
+ mojo::ServiceProviderPtr provider,
+ mojo::URLResponsePtr response,
+ mojo::Shell* shell,
scoped_refptr<base::MessageLoopProxy> compositor_thread);
virtual ~DocumentView();
@@ -57,14 +59,9 @@ class DocumentView : public mojo::InterfaceImpl<mojo::Application>,
return imported_services_.get();
}
- mojo::Shell* shell() const { return shell_.get(); }
+ mojo::Shell* shell() const { return shell_; }
private:
- // Application methods:
- void AcceptConnection(const mojo::String& requestor_url,
- mojo::ServiceProviderPtr provider) override;
- void Initialize(mojo::Array<mojo::String> args) override;
-
// WebWidgetClient methods:
virtual blink::WebLayerTreeView* initializeLayerTreeView();
@@ -109,10 +106,11 @@ class DocumentView : public mojo::InterfaceImpl<mojo::Application>,
void Load(mojo::URLResponsePtr response);
+ base::Closure destruction_callback_;
mojo::URLResponsePtr response_;
mojo::ServiceProviderImpl exported_services_;
scoped_ptr<mojo::ServiceProvider> imported_services_;
- mojo::ShellPtr shell_;
+ mojo::Shell* shell_;
mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_;
blink::WebView* web_view_;
mojo::View* root_;

Powered by Google App Engine
This is Rietveld 408576698