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

Unified Diff: chrome/renderer/extensions/event_bindings.cc

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months 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: chrome/renderer/extensions/event_bindings.cc
===================================================================
--- chrome/renderer/extensions/event_bindings.cc (revision 22886)
+++ chrome/renderer/extensions/event_bindings.cc (working copy)
@@ -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::ExtensionBase;
using bindings_utils::GetPendingRequestMap;
using bindings_utils::PendingRequestMap;
+using WebKit::WebFrame;
namespace {
@@ -199,17 +200,17 @@
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 @@
}
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 @@
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);
« no previous file with comments | « chrome/renderer/extensions/event_bindings.h ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698