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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 11416363: Implementation of URLLoader using PluginResource/ResourceHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: webkit/plugins/ppapi/ppapi_plugin_instance.h
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index 07f588dbe06adb300ace2c0d9dbc90f680c35d31..6acfd0134948d25e780047735b6e35248f55e421 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -120,6 +120,10 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// nonzero.
PP_Instance pp_instance() const { return pp_instance_; }
+ ::ppapi::PPP_Instance_Combined* instance_interface() const {
+ return instance_interface_.get();
+ }
+
::ppapi::thunk::ResourceCreationAPI& resource_creation() {
return *resource_creation_.get();
}
@@ -162,13 +166,13 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
bool full_frame() const { return full_frame_; }
const ::ppapi::ViewData& view_data() const { return view_data_; }
- // PPP_Instance and PPP_Instance_Private pass-through.
+ // PPP_Instance and PPP_Instance_Private.
bool Initialize(WebKit::WebPluginContainer* container,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
const GURL& plugin_url,
bool full_frame);
- bool HandleDocumentLoad(PPB_URLLoader_Impl* loader);
+ bool HandleDocumentLoad(const WebKit::WebURLResponse& response);
bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor_info);
PP_Var GetInstanceObject();
@@ -336,6 +340,17 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
void SimulateImeSetCompositionEvent(
const ::ppapi::InputEventData& input_event);
+ // The document loader is valid when the plugin is "full-frame" and in this
+ // case is non-NULL as long as the corresponding loader resource is alive.
+ // This pointer is non-owning, so the loader must use set_document_loader to
+ // clear itself when it is destroyed.
+ WebKit::WebURLLoaderClient* document_loader() const {
+ return document_loader_;
+ }
+ void set_document_loader(WebKit::WebURLLoaderClient* loader) {
+ document_loader_ = loader;
+ }
+
ContentDecryptorDelegate* GetContentDecryptorDelegate();
// PPB_Instance_API implementation.
@@ -751,9 +766,8 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
std::vector<std::string> argn_;
std::vector<std::string> argv_;
- // This is NULL unless HandleDocumentLoad has called. In that case, we store
- // the pointer so we can re-send it later if we are reset to talk to NaCl.
- scoped_refptr<PPB_URLLoader_Impl> document_loader_;
+ // Non-owning pointer to the document loader, if any.
+ WebKit::WebURLLoaderClient* document_loader_;
// The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private
// calls and handles PPB_ContentDecryptor_Private calls.

Powered by Google App Engine
This is Rietveld 408576698