summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/plugin_messages_internal.h15
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc16
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h10
-rw-r--r--chrome/renderer/render_view_unittest.cc5
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc17
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h11
6 files changed, 29 insertions, 45 deletions
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index ab2ec6f..3bc169b 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -159,8 +159,10 @@ IPC_BEGIN_MESSAGES(Plugin)
int /* route_id */,
intptr_t /* npobject_ptr */)
- IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_DidFinishLoadWithReason,
- int /* reason */)
+ IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_DidFinishLoadWithReason,
+ GURL /* url */,
+ int /* reason */,
+ intptr_t /* notify_data */)
// Updates the plugin location. For windowless plugins, windowless_buffer
// contains a buffer that the plugin draws into. background_buffer is used
@@ -198,8 +200,8 @@ IPC_BEGIN_MESSAGES(Plugin)
int /* id */)
IPC_MESSAGE_ROUTED5(PluginMsg_SendJavaScriptStream,
- std::string /* url */,
- std::wstring /* result */,
+ GURL /* url */,
+ std::string /* result */,
bool /* success */,
bool /* notify required */,
intptr_t /* notify data */)
@@ -219,11 +221,6 @@ IPC_BEGIN_MESSAGES(Plugin)
IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_HandleURLRequestReply,
PluginMsg_URLRequestReply_Params)
-
- IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_URLRequestRouted,
- std::string /* url */,
- bool /* notify_needed */,
- intptr_t /* notify data */)
IPC_END_MESSAGES(Plugin)
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index a8a652f..9b33329 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -107,7 +107,6 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_InstallMissingPlugin, OnInstallMissingPlugin)
IPC_MESSAGE_HANDLER(PluginMsg_HandleURLRequestReply,
OnHandleURLRequestReply)
- IPC_MESSAGE_HANDLER(PluginMsg_URLRequestRouted, OnURLRequestRouted)
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -214,8 +213,9 @@ void WebPluginDelegateStub::OnDidFail(int id) {
client->DidFail();
}
-void WebPluginDelegateStub::OnDidFinishLoadWithReason(int reason) {
- delegate_->DidFinishLoadWithReason(reason);
+void WebPluginDelegateStub::OnDidFinishLoadWithReason(
+ const GURL& url, int reason, intptr_t notify_data) {
+ delegate_->DidFinishLoadWithReason(url, reason, notify_data);
}
void WebPluginDelegateStub::OnSetFocus() {
@@ -299,8 +299,8 @@ void WebPluginDelegateStub::OnGetPluginScriptableObject(int* route_id,
WebBindings::releaseObject(object);
}
-void WebPluginDelegateStub::OnSendJavaScriptStream(const std::string& url,
- const std::wstring& result,
+void WebPluginDelegateStub::OnSendJavaScriptStream(const GURL& url,
+ const std::string& result,
bool success,
bool notify_needed,
intptr_t notify_data) {
@@ -374,9 +374,3 @@ void WebPluginDelegateStub::OnHandleURLRequestReply(
params.stream);
webplugin_->OnResourceCreated(params.resource_id, resource_client);
}
-
-void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url,
- bool notify_needed,
- intptr_t notify_data) {
- delegate_->URLRequestRouted(url, notify_needed, notify_data);
-}
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index e385156..d0c6542 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -58,7 +58,8 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
void OnDidFinishLoading(int id);
void OnDidFail(int id);
- void OnDidFinishLoadWithReason(int reason);
+ void OnDidFinishLoadWithReason(const GURL& url, int reason,
+ intptr_t notify_data);
void OnSetFocus();
void OnHandleInputEvent(const WebKit::WebInputEvent* event,
bool* handled, WebCursor* cursor);
@@ -73,8 +74,8 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
const TransportDIB::Handle& windowless_buffer,
const TransportDIB::Handle& background_buffer);
void OnGetPluginScriptableObject(int* route_id, intptr_t* npobject_ptr);
- void OnSendJavaScriptStream(const std::string& url,
- const std::wstring& result,
+ void OnSendJavaScriptStream(const GURL& url,
+ const std::string& result,
bool success, bool notify_needed,
intptr_t notify_data);
@@ -89,9 +90,6 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
void OnHandleURLRequestReply(
const PluginMsg_URLRequestReply_Params& params);
- void OnURLRequestRouted(const std::string& url, bool notify_needed,
- intptr_t notify_data);
-
void CreateSharedBuffer(size_t size,
base::SharedMemory* shared_buf,
base::SharedMemoryHandle* remote_handle);
diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc
index f09b361..96bcc8f 100644
--- a/chrome/renderer/render_view_unittest.cc
+++ b/chrome/renderer/render_view_unittest.cc
@@ -11,10 +11,12 @@
#include "printing/image.h"
#include "printing/native_metafile.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURLError.h"
using WebKit::WebCompositionCommand;
using WebKit::WebFrame;
+using WebKit::WebString;
using WebKit::WebTextDirection;
using WebKit::WebURLError;
@@ -382,7 +384,8 @@ TEST_F(RenderViewTest, PrintWithIframe) {
// Find the frame and set it as the focused one. This should mean that that
// the printout should only contain the contents of that frame.
- WebFrame* sub1_frame = view_->webview()->GetFrameWithName(L"sub1");
+ WebFrame* sub1_frame =
+ view_->webview()->GetFrameWithName(WebString::fromUTF8("sub1"));
ASSERT_TRUE(sub1_frame);
view_->webview()->SetFocusedFrame(sub1_frame);
ASSERT_NE(view_->webview()->GetFocusedFrame(),
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 56da66c..c72c654 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -306,8 +306,8 @@ bool WebPluginDelegateProxy::Send(IPC::Message* msg) {
return channel_host_->Send(msg);
}
-void WebPluginDelegateProxy::SendJavaScriptStream(const std::string& url,
- const std::wstring& result,
+void WebPluginDelegateProxy::SendJavaScriptStream(const GURL& url,
+ const std::string& result,
bool success,
bool notify_needed,
intptr_t notify_data) {
@@ -756,8 +756,10 @@ NPObject* WebPluginDelegateProxy::GetPluginScriptableObject() {
return WebBindings::retainObject(npobject_);
}
-void WebPluginDelegateProxy::DidFinishLoadWithReason(NPReason reason) {
- Send(new PluginMsg_DidFinishLoadWithReason(instance_id_, reason));
+void WebPluginDelegateProxy::DidFinishLoadWithReason(
+ const GURL& url, NPReason reason, intptr_t notify_data) {
+ Send(new PluginMsg_DidFinishLoadWithReason(
+ instance_id_, url, reason, notify_data));
}
void WebPluginDelegateProxy::SetFocus() {
@@ -1056,13 +1058,6 @@ WebPluginResourceClient* WebPluginDelegateProxy::CreateResourceClient(
return proxy;
}
-void WebPluginDelegateProxy::URLRequestRouted(const std::string& url,
- bool notify_needed,
- intptr_t notify_data) {
- Send(new PluginMsg_URLRequestRouted(instance_id_, url, notify_needed,
- notify_data));
-}
-
void WebPluginDelegateProxy::OnCancelDocumentLoad() {
plugin_->CancelDocumentLoad();
}
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 5680d9e..61dfa8b 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -58,7 +58,8 @@ class WebPluginDelegateProxy : public WebPluginDelegate,
virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect);
virtual void Print(gfx::NativeDrawingContext context);
virtual NPObject* GetPluginScriptableObject();
- virtual void DidFinishLoadWithReason(NPReason reason);
+ virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason,
+ intptr_t notify_data);
virtual void SetFocus();
virtual bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor);
@@ -71,8 +72,8 @@ class WebPluginDelegateProxy : public WebPluginDelegate,
// IPC::Message::Sender implementation:
virtual bool Send(IPC::Message* msg);
- virtual void SendJavaScriptStream(const std::string& url,
- const std::wstring& result,
+ virtual void SendJavaScriptStream(const GURL& url,
+ const std::string& result,
bool success, bool notify_needed,
intptr_t notify_data);
@@ -92,10 +93,6 @@ class WebPluginDelegateProxy : public WebPluginDelegate,
intptr_t notify_data,
intptr_t existing_stream);
- // Notifies the delegate about a Get/Post URL request getting routed
- virtual void URLRequestRouted(const std::string&url, bool notify_needed,
- intptr_t notify_data);
-
protected:
template<class WebPluginDelegateProxy> friend class DeleteTask;
~WebPluginDelegateProxy();