#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "cc/layers/texture_layer_client.h"
#include "content/common/content_export.h"
#include "content/public/renderer/pepper_plugin_instance.h"
+#include "content/public/renderer/render_frame_observer.h"
#include "content/renderer/mouse_lock_dispatcher.h"
-#include "content/renderer/pepper/ppp_pdf.h"
#include "ppapi/c/dev/pp_cursor_type_dev.h"
#include "ppapi/c/dev/ppp_find_dev.h"
#include "ppapi/c/dev/ppp_printing_dev.h"
#include "ppapi/c/ppp_mouse_lock.h"
#include "ppapi/c/private/ppb_content_decryptor_private.h"
#include "ppapi/c/private/ppp_instance_private.h"
+#include "ppapi/c/private/ppp_pdf.h"
#include "ppapi/shared_impl/ppb_instance_shared.h"
#include "ppapi/shared_impl/ppb_view_shared.h"
#include "ppapi/shared_impl/singleton_resource_id.h"
: public base::RefCounted<PepperPluginInstanceImpl>,
public NON_EXPORTED_BASE(PepperPluginInstance),
public ppapi::PPB_Instance_Shared,
- public NON_EXPORTED_BASE(cc::TextureLayerClient) {
+ public NON_EXPORTED_BASE(cc::TextureLayerClient),
+ public RenderFrameObserver {
public:
// Create and return a PepperPluginInstanceImpl object which supports the most
// recent version of PPP_Instance possible by querying the given
const base::FilePath& path) OVERRIDE;
virtual void SetEmbedProperty(PP_Var key, PP_Var value) OVERRIDE;
virtual void SetSelectedText(const base::string16& selected_text) OVERRIDE;
+ virtual void SetLinkUnderCursor(const std::string& url) OVERRIDE;
// PPB_Instance_API implementation.
virtual PP_Bool BindGraphics(PP_Instance instance,
scoped_ptr<cc::SingleReleaseCallback>* release_callback,
bool use_shared_memory) OVERRIDE;
+ // RenderFrameObserver
+ virtual void OnDestruct() OVERRIDE;
+
// Update any transforms that should be applied to the texture layer.
void UpdateLayerTransform();
int data_length,
int encoded_data_length);
virtual void didFinishLoading(blink::WebURLLoader* loader,
- double finish_time);
+ double finish_time,
+ int64_t total_encoded_data_length);
virtual void didFail(blink::WebURLLoader* loader,
const blink::WebURLError& error);
const ppapi::URLResponseInfoData& data);
RenderFrameImpl* render_frame_;
+ base::Closure instance_deleted_callback_;
scoped_refptr<PluginModule> module_;
scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_;
// If this is the NaCl plugin, we create a new module when we switch to the
// calls and handles PPB_ContentDecryptor_Private calls.
scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_;
+ // The link currently under the cursor.
+ base::string16 link_under_cursor_;
+
// Dummy NPP value used when calling in to WebBindings, to allow the bindings
// to correctly track NPObjects belonging to this plugin instance.
scoped_ptr<struct _NPP> npp_;