summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/extensions/event_bindings.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 05:46:45 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 05:46:45 +0000
commitdd7daa80d25deb78ab365e28df4d93437357793b (patch)
treefb4dd2331820f5e32ddeb7e2bfb731f0604fbc0d /chrome/renderer/extensions/event_bindings.cc
parent64c40aa34646a198a04029ee6b78dd9559595dc5 (diff)
downloadchromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.zip
chromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.tar.gz
chromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.tar.bz2
Switch to WebFrame from the WebKit API.
I tried to avoid unnecessary changes in this CL to help make it easier to review. As part of this CL, glue/webtextinput* are folded into WebFrame / WebFrameImpl. R=dglazkov BUG=10034 TEST=none Review URL: http://codereview.chromium.org/164225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/event_bindings.cc')
-rw-r--r--chrome/renderer/extensions/event_bindings.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc
index d771580..fcc0bcf 100644
--- a/chrome/renderer/extensions/event_bindings.cc
+++ b/chrome/renderer/extensions/event_bindings.cc
@@ -15,8 +15,8 @@
#include "chrome/renderer/render_view.h"
#include "grit/renderer_resources.h"
#include "webkit/api/public/WebDataSource.h"
+#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebURLRequest.h"
-#include "webkit/glue/webframe.h"
using bindings_utils::CallFunctionInContext;
using bindings_utils::ContextInfo;
@@ -26,6 +26,7 @@ using bindings_utils::GetStringResource;
using bindings_utils::ExtensionBase;
using bindings_utils::GetPendingRequestMap;
using bindings_utils::PendingRequestMap;
+using WebKit::WebFrame;
namespace {
@@ -199,17 +200,17 @@ void EventBindings::HandleContextCreated(WebFrame* frame, bool content_script) {
v8::HandleScope handle_scope;
ContextList& contexts = GetContexts();
- v8::Local<v8::Context> frame_context = frame->GetMainWorldScriptContext();
+ v8::Local<v8::Context> frame_context = frame->mainWorldScriptContext();
v8::Local<v8::Context> context = v8::Context::GetCurrent();
DCHECK(!context.IsEmpty());
DCHECK(bindings_utils::FindContext(context) == contexts.end());
// Figure out the URL for the toplevel frame. If the top frame is loading,
// use its provisional URL, since we get this notification before commit.
- WebFrame* main_frame = frame->GetView()->GetMainFrame();
- WebKit::WebDataSource* ds = main_frame->GetProvisionalDataSource();
+ WebFrame* main_frame = frame->view()->GetMainFrame();
+ WebKit::WebDataSource* ds = main_frame->provisionalDataSource();
if (!ds)
- ds = main_frame->GetDataSource();
+ ds = main_frame->dataSource();
GURL url = ds->request().url();
std::string extension_id;
if (url.SchemeIs(chrome::kExtensionScheme)) {
@@ -238,8 +239,8 @@ void EventBindings::HandleContextCreated(WebFrame* frame, bool content_script) {
}
RenderView* render_view = NULL;
- if (frame->GetView() && frame->GetView()->GetDelegate())
- render_view = static_cast<RenderView*>(frame->GetView()->GetDelegate());
+ if (frame->view() && frame->view()->GetDelegate())
+ render_view = static_cast<RenderView*>(frame->view()->GetDelegate());
contexts.push_back(linked_ptr<ContextInfo>(
new ContextInfo(persistent_context, extension_id, parent_context,
@@ -256,7 +257,7 @@ void EventBindings::HandleContextDestroyed(WebFrame* frame) {
return;
v8::HandleScope handle_scope;
- v8::Local<v8::Context> context = frame->GetMainWorldScriptContext();
+ v8::Local<v8::Context> context = frame->mainWorldScriptContext();
DCHECK(!context.IsEmpty());
ContextList::iterator context_iter = bindings_utils::FindContext(context);