summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webframe.h2
-rw-r--r--webkit/glue/webframe_impl.cc7
-rw-r--r--webkit/glue/webframe_impl.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 4a0cf01..d35376e 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -47,6 +47,8 @@ class WebFrame {
// TODO(fqian): Remove this method when V8 supports NP runtime.
virtual void* GetFrameImplementation() = 0;
+ virtual NPObject* GetWindowNPObject() = 0;
+
// Loads the given WebRequest.
virtual void LoadRequest(WebRequest* request) = 0;
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 28ba59c..bf4fb03 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -741,6 +741,13 @@ void WebFrameImpl::GetContentAsPlainText(int max_chars,
FrameContentAsPlainText(max_chars, frame_, text);
}
+NPObject* WebFrameImpl::GetWindowNPObject() {
+ if (!frame_)
+ return NULL;
+
+ return frame_->script()->windowScriptNPObject();
+}
+
void WebFrameImpl::InvalidateArea(AreaToInvalidate area) {
ASSERT(frame() && frame()->view());
#if defined(OS_WIN)
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index 63950aa..ed7ee15 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -116,6 +116,8 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
virtual void* GetFrameImplementation() { return frame(); }
+ virtual NPObject* GetWindowNPObject();
+
virtual void GetContentAsPlainText(int max_chars, std::wstring* text) const;
virtual bool Find(const FindInPageRequest& request,
bool wrap_within_frame,