summaryrefslogtreecommitdiffstats
path: root/chromium/content/public/renderer/render_frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/public/renderer/render_frame.h')
-rw-r--r--chromium/content/public/renderer/render_frame.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/chromium/content/public/renderer/render_frame.h b/chromium/content/public/renderer/render_frame.h
index eef36c686ff..c48acd80123 100644
--- a/chromium/content/public/renderer/render_frame.h
+++ b/chromium/content/public/renderer/render_frame.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
#define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
+#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -14,6 +15,8 @@ struct WebPreferences;
namespace blink {
class WebFrame;
+class WebLocalFrame;
+class WebNode;
class WebPlugin;
class WebURLRequest;
struct WebPluginParams;
@@ -31,12 +34,18 @@ struct WebPluginInfo;
class CONTENT_EXPORT RenderFrame : public IPC::Listener,
public IPC::Sender {
public:
+ // Returns the RenderFrame given a WebFrame.
+ static RenderFrame* FromWebFrame(blink::WebFrame* web_frame);
+
// Returns the RenderView associated with this frame.
virtual RenderView* GetRenderView() = 0;
// Get the routing ID of the frame.
virtual int GetRoutingID() = 0;
+ // Returns the associated WebFrame.
+ virtual blink::WebFrame* GetWebFrame() = 0;
+
// Gets WebKit related preferences associated with this frame.
virtual WebPreferences& GetWebkitPreferences() = 0;
@@ -58,6 +67,9 @@ class CONTENT_EXPORT RenderFrame : public IPC::Listener,
// menu is closed.
virtual void CancelContextMenu(int request_id) = 0;
+ // Gets the node that the context menu was pressed over.
+ virtual blink::WebNode GetContextMenuNode() const = 0;
+
// Create a new NPAPI/Pepper plugin depending on |info|. Returns NULL if no
// plugin was found.
virtual blink::WebPlugin* CreatePlugin(
@@ -66,10 +78,15 @@ class CONTENT_EXPORT RenderFrame : public IPC::Listener,
const blink::WebPluginParams& params) = 0;
// The client should handle the navigation externally.
- virtual void LoadURLExternally(
- blink::WebFrame* frame,
- const blink::WebURLRequest& request,
- blink::WebNavigationPolicy policy) = 0;
+ virtual void LoadURLExternally(blink::WebLocalFrame* frame,
+ const blink::WebURLRequest& request,
+ blink::WebNavigationPolicy policy) = 0;
+
+ // Execute a string of JavaScript in this frame's context.
+ virtual void ExecuteJavaScript(const base::string16& javascript) = 0;
+
+ // Return true if this frame is hidden.
+ virtual bool IsHidden() = 0;
protected:
virtual ~RenderFrame() {}