summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorjaphet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 15:31:53 +0000
committerjaphet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 15:31:53 +0000
commit162daa054276523dcbab30cb6c227f16abfd9c3b (patch)
treefee6a2aef24156a90f3918d36e052a525321dde1 /webkit/glue
parentd5d7ebfc24f9a90183cc8bfd16243d604b35730f (diff)
downloadchromium_src-162daa054276523dcbab30cb6c227f16abfd9c3b.zip
chromium_src-162daa054276523dcbab30cb6c227f16abfd9c3b.tar.gz
chromium_src-162daa054276523dcbab30cb6c227f16abfd9c3b.tar.bz2
Use upstream V8Proxy and V8Utilities
BUG=15459 TEST=none Review URL: http://codereview.chromium.org/149086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/chrome_client_impl.cc4
-rw-r--r--webkit/glue/devtools/bound_object.cc6
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.cc19
-rw-r--r--webkit/glue/devtools/debugger_agent_manager.cc6
-rw-r--r--webkit/glue/npruntime_util.cc8
-rw-r--r--webkit/glue/webdevtoolsagent_impl.cc6
-rw-r--r--webkit/glue/webdevtoolsclient_impl.cc14
7 files changed, 31 insertions, 32 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index ff8aeb5..6341f55 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -25,7 +25,7 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "ScriptController.h"
#include "WindowFeatures.h"
#if USE(V8)
-#include "v8_proxy.h"
+#include "V8Proxy.h"
#endif
MSVC_POP_WARNING();
@@ -361,7 +361,7 @@ void ChromeClientImpl::runJavaScriptAlert(WebCore::Frame* frame,
#if USE(V8)
// Before showing the JavaScript dialog, we give the proxy implementation
// a chance to process any pending console messages.
- WebCore::V8Proxy::ProcessConsoleMessages();
+ WebCore::V8Proxy::processConsoleMessages();
#endif
std::wstring wstr = webkit_glue::StringToStdWString(message);
diff --git a/webkit/glue/devtools/bound_object.cc b/webkit/glue/devtools/bound_object.cc
index c9993c4..bc8310c 100644
--- a/webkit/glue/devtools/bound_object.cc
+++ b/webkit/glue/devtools/bound_object.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "v8_proxy.h"
+#include "V8Proxy.h"
#include "webkit/glue/devtools/bound_object.h"
using namespace WebCore;
@@ -22,7 +22,7 @@ BoundObject::BoundObject(
v8_this_ = v8::Persistent<v8::External>::New(v8::External::New(v8_this));
v8::Local<v8::FunctionTemplate> local_template =
- v8::FunctionTemplate::New(V8Proxy::CheckNewLegal);
+ v8::FunctionTemplate::New(V8Proxy::checkNewLegal);
host_template_ = v8::Persistent<v8::FunctionTemplate>::New(local_template);
host_template_->SetClassName(v8::String::New(object_name));
}
@@ -54,7 +54,7 @@ void BoundObject::Build() {
v8::Local<v8::Function> constructor = host_template_->GetFunction();
bound_object_ = v8::Persistent<v8::Object>::New(
- SafeAllocation::NewInstance(constructor));
+ SafeAllocation::newInstance(constructor));
v8::Handle<v8::Object> global = context_->Global();
global->Set(v8::String::New(object_name_), bound_object_);
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 4312cbe..dfbe7bc 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -10,15 +10,14 @@
#include "Document.h"
#include "Page.h"
+#include "V8Binding.h"
+#include "V8DOMWindow.h"
+#include "V8Index.h"
+#include "V8Proxy.h"
#undef LOG
#include "base/string_piece.h"
#include "grit/webkit_resources.h"
-#include "V8Binding.h"
-#include "V8DOMWindow.h"
-#include "V8Index.h"
-#include "v8_binding.h"
-#include "v8_proxy.h"
#include "webkit/glue/devtools/debugger_agent_impl.h"
#include "webkit/glue/devtools/debugger_agent_manager.h"
#include "webkit/glue/glue_util.h"
@@ -62,8 +61,8 @@ void DebuggerAgentImpl::GetContextId() {
void DebuggerAgentImpl::StartProfiling() {
v8::HandleScope scope;
WebCore::V8Proxy* proxy = V8Proxy::retrieve(GetPage()->mainFrame());
- DCHECK(proxy && proxy->ContextInitialized());
- v8::Context::Scope context_scope(proxy->GetContext());
+ DCHECK(proxy && proxy->isContextInitialized());
+ v8::Context::Scope context_scope(proxy->context());
v8::V8::ResumeProfiler();
}
@@ -105,12 +104,12 @@ void DebuggerAgentImpl::ResetUtilityContext(
// TODO(pfeldman): Validate against Soeren.
// Set up the DOM window as the prototype of the new global object.
v8::Handle<v8::Context> window_context =
- V8Proxy::GetContext(document->frame());
+ V8Proxy::context(document->frame());
v8::Handle<v8::Object> window_global = window_context->Global();
v8::Handle<v8::Value> window_wrapper =
- V8Proxy::LookupDOMWrapper(V8ClassIndex::DOMWINDOW, window_global);
+ V8Proxy::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, window_global);
- ASSERT(V8Proxy::DOMWrapperToNative<DOMWindow>(window_wrapper) ==
+ ASSERT(V8Proxy::convertDOMWrapperToNative<DOMWindow>(window_wrapper) ==
document->frame()->domWindow());
// Create a new environment using an empty template for the shadow
diff --git a/webkit/glue/devtools/debugger_agent_manager.cc b/webkit/glue/devtools/debugger_agent_manager.cc
index 102224f..d2f41d3 100644
--- a/webkit/glue/devtools/debugger_agent_manager.cc
+++ b/webkit/glue/devtools/debugger_agent_manager.cc
@@ -6,7 +6,7 @@
#include "Frame.h"
#include "PageGroupLoadDeferrer.h"
-#include "v8_proxy.h"
+#include "V8Proxy.h"
#include <wtf/HashSet.h>
#undef LOG
@@ -188,7 +188,7 @@ void DebuggerAgentManager::OnV8DebugMessage(const v8::Debug::Message& message) {
// If the context is from one of the inpected tabs or injected extension
// scripts it must have host_id in the data field.
- int host_id = WebCore::V8Proxy::GetContextDebugId(context);
+ int host_id = WebCore::V8Proxy::contextDebugId(context);
if (host_id != -1) {
DebuggerAgentImpl* agent = DebuggerAgentForHostId(host_id);
if (agent) {
@@ -222,7 +222,7 @@ void DebuggerAgentManager::SetHostId(WebFrameImpl* webframe, int host_id) {
DCHECK(host_id > 0);
WebCore::V8Proxy* proxy = WebCore::V8Proxy::retrieve(webframe->frame());
if (proxy) {
- proxy->SetContextDebugId(host_id);
+ proxy->setContextDebugId(host_id);
}
}
diff --git a/webkit/glue/npruntime_util.cc b/webkit/glue/npruntime_util.cc
index f1c23eb..687afb1 100644
--- a/webkit/glue/npruntime_util.cc
+++ b/webkit/glue/npruntime_util.cc
@@ -13,7 +13,7 @@
#include "MouseEvent.h"
#include "NPV8Object.h" // for PrivateIdentifier
#include "V8Helpers.h"
-#include "v8_proxy.h"
+#include "V8Proxy.h"
#elif USE(JAVASCRIPTCORE_BINDINGS)
#include "bridge/c/c_utility.h"
#endif
@@ -102,20 +102,20 @@ static bool DragEventData(NPObject* npobj, int* event_id, WebDragData* data) {
// Get the current WebCore event.
v8::Handle<v8::Value> current_event(GetEvent(context));
- WebCore::Event* event = V8Proxy::ToNativeEvent(current_event);
+ WebCore::Event* event = V8Proxy::convertToNativeEvent(current_event);
if (event == NULL)
return false;
// Check that the given npobj is that event.
V8NPObject* object = reinterpret_cast<V8NPObject*>(npobj);
- WebCore::Event* given = V8Proxy::ToNativeEvent(object->v8Object);
+ WebCore::Event* given = V8Proxy::convertToNativeEvent(object->v8Object);
if (given != event)
return false;
// Check the execution frames are same origin.
V8Proxy* current = V8Proxy::retrieve(V8Proxy::retrieveFrame());
WebCore::Frame* frame = V8Proxy::retrieveFrame(context);
- if (!current || !current->CanAccessFrame(frame, false))
+ if (!current || !current->canAccessFrame(frame, false))
return false;
const WebCore::EventNames& event_names(WebCore::eventNames());
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc
index ac50d37..7f62701 100644
--- a/webkit/glue/webdevtoolsagent_impl.cc
+++ b/webkit/glue/webdevtoolsagent_impl.cc
@@ -17,11 +17,11 @@
#include "ScriptObject.h"
#include "ScriptState.h"
#include "ScriptValue.h"
-#include "v8_proxy.h"
+#include "V8Binding.h"
+#include "V8Proxy.h"
#include <wtf/OwnPtr.h>
#undef LOG
-#include "V8Binding.h"
#include "base/values.h"
#include "webkit/api/public/WebDataSource.h"
#include "webkit/api/public/WebURL.h"
@@ -317,7 +317,7 @@ v8::Handle<v8::Value> WebDevToolsAgentImpl::JsGetNodeForId(
WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(
v8::External::Cast(*args.Data())->Value());
Node* node = agent->dom_agent_impl_->GetNodeForId(node_id);
- return V8Proxy::ToV8Object(V8ClassIndex::NODE, node);
+ return V8Proxy::convertToV8Object(V8ClassIndex::NODE, node);
}
// static
diff --git a/webkit/glue/webdevtoolsclient_impl.cc b/webkit/glue/webdevtoolsclient_impl.cc
index 085a0b8..16d19c5 100644
--- a/webkit/glue/webdevtoolsclient_impl.cc
+++ b/webkit/glue/webdevtoolsclient_impl.cc
@@ -14,14 +14,14 @@
#include "Page.h"
#include "PlatformString.h"
#include "SecurityOrigin.h"
+#include "V8Binding.h"
+#include "V8CustomBinding.h"
+#include "V8Proxy.h"
+#include "V8Utilities.h"
#include <wtf/OwnPtr.h>
#include <wtf/Vector.h>
#undef LOG
-#include "V8Binding.h"
-#include "V8CustomBinding.h"
-#include "v8_proxy.h"
-#include "v8_utility.h"
#include "base/string_util.h"
#include "base/values.h"
#include "webkit/api/public/WebScriptSource.h"
@@ -149,7 +149,7 @@ WebDevToolsClientImpl::WebDevToolsClientImpl(
new JsToolsAgentBoundObj(this, frame, L"RemoteToolsAgent"));
v8::HandleScope scope;
- v8::Handle<v8::Context> frame_context = V8Proxy::GetContext(frame->frame());
+ v8::Handle<v8::Context> frame_context = V8Proxy::context(frame->frame());
dev_tools_host_.set(new BoundObject(frame_context, this, "DevToolsHost"));
dev_tools_host_->AddProtoFunction(
"reset",
@@ -253,7 +253,7 @@ v8::Handle<v8::Value> WebDevToolsClientImpl::JsAddSourceToFrame(
if (source_string.isEmpty() || exception_catcher.HasCaught()) {
return v8::Undefined();
}
- Node* node = V8Proxy::DOMWrapperToNode<Node>(args[2]);
+ Node* node = V8Proxy::convertDOMWrapperToNode<Node>(args[2]);
if (!node || !node->attached()) {
return v8::Undefined();
}
@@ -272,7 +272,7 @@ v8::Handle<v8::Value> WebDevToolsClientImpl::JsAddResourceSourceToFrame(
if (mime_type.isEmpty()) {
return v8::Undefined();
}
- Node* node = V8Proxy::DOMWrapperToNode<Node>(args[2]);
+ Node* node = V8Proxy::convertDOMWrapperToNode<Node>(args[2]);
WebDevToolsClientImpl* client = static_cast<WebDevToolsClientImpl*>(
v8::External::Cast(*args.Data())->Value());
client->AddResourceSourceToFrame(resource_id, mime_type, node);