summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc2
-rw-r--r--chrome/common/render_messages.h16
-rw-r--r--chrome/renderer/chrome_ppb_pdf_impl.cc9
-rw-r--r--content/common/view_messages.h3
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.cc9
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.h3
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc3
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h1
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h3
9 files changed, 25 insertions, 24 deletions
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index f5519ea..a8d396d 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -433,7 +433,7 @@ bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewHostMsg_WebIntentDispatch,
OnWebIntentDispatch)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Snapshot, OnSnapshot)
- IPC_MESSAGE_HANDLER(ViewHostMsg_PDFHasUnsupportedFeature,
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFHasUnsupportedFeature,
OnPDFHasUnsupportedFeature)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidBlockDisplayingInsecureContent,
OnDidBlockDisplayingInsecureContent)
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 63a8e7e..79ea807 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -288,6 +288,14 @@ IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
bool /* enable_phishing_detection */)
+// JavaScript related messages -----------------------------------------------
+
+// Notify the JavaScript engine in the render to change its parameters
+// while performing stress testing.
+IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
+ int /* cmd */,
+ int /* param */)
+
//-----------------------------------------------------------------------------
// TabContents messages
// These are messages sent from the renderer to the browser process.
@@ -520,10 +528,6 @@ IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
int32 /* page_id */,
bool /* result */)
-// JavaScript related messages -----------------------------------------------
+// The currently displayed PDF has an unsupported feature.
+IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
-// Notify the JavaScript engine in the render to change its parameters
-// while performing stress testing.
-IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
- int /* cmd */,
- int /* param */)
diff --git a/chrome/renderer/chrome_ppb_pdf_impl.cc b/chrome/renderer/chrome_ppb_pdf_impl.cc
index 8f4f31a..053bfa8 100644
--- a/chrome/renderer/chrome_ppb_pdf_impl.cc
+++ b/chrome/renderer/chrome_ppb_pdf_impl.cc
@@ -7,7 +7,9 @@
#include "base/metrics/histogram.h"
#include "base/utf_string_conversions.h"
#include "build/build_config.h"
+#include "chrome/common/render_messages.h"
#include "content/common/view_messages.h"
+#include "content/renderer/pepper_plugin_delegate_impl.h"
#include "content/renderer/render_thread.h"
#include "grit/webkit_resources.h"
#include "grit/webkit_strings.h"
@@ -320,7 +322,12 @@ void HasUnsupportedFeature(PP_Instance instance_id) {
if (!instance->IsFullPagePlugin())
return;
- instance->delegate()->HasUnsupportedFeature();
+ PepperPluginDelegateImpl* pepper_delegate =
+ static_cast<PepperPluginDelegateImpl*>(instance->delegate());
+
+ RenderThread::current()->Send(
+ new ChromeViewHostMsg_PDFHasUnsupportedFeature(
+ pepper_delegate->GetRoutingId()));
}
void SaveAs(PP_Instance instance_id) {
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index c49dcab..ec0b328 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -2010,9 +2010,6 @@ IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions,
int /* restrictions */)
-// The currently displayed PDF has an unsupported feature.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature)
-
// Brings up SaveAs... dialog to save specified URL.
IPC_MESSAGE_ROUTED1(ViewHostMsg_SaveURLAs,
GURL /* url */)
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 0476e53..b8d3777 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -1422,11 +1422,6 @@ void PepperPluginDelegateImpl::SetContentRestriction(int restrictions) {
render_view_->routing_id(), restrictions));
}
-void PepperPluginDelegateImpl::HasUnsupportedFeature() {
- render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature(
- render_view_->routing_id()));
-}
-
void PepperPluginDelegateImpl::SaveURLAs(const GURL& url) {
render_view_->Send(new ViewHostMsg_SaveURLAs(
render_view_->routing_id(), url));
@@ -1477,6 +1472,10 @@ ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() {
return ppapi::Preferences(render_view_->webkit_preferences());
}
+int PepperPluginDelegateImpl::GetRoutingId() const {
+ return render_view_->routing_id();
+}
+
void PepperPluginDelegateImpl::PublishInitialPolicy(
scoped_refptr<webkit::ppapi::PluginInstance> instance,
const std::string& policy) {
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index 74c4019..df97cf8 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -294,7 +294,6 @@ class PepperPluginDelegateImpl
virtual void DidStartLoading() OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
virtual void SetContentRestriction(int restrictions) OVERRIDE;
- virtual void HasUnsupportedFeature() OVERRIDE;
virtual void SaveURLAs(const GURL& url) OVERRIDE;
virtual P2PSocketDispatcher* GetP2PSocketDispatcher() OVERRIDE;
virtual webkit_glue::P2PTransport* CreateP2PTransport() OVERRIDE;
@@ -304,6 +303,8 @@ class PepperPluginDelegateImpl
OVERRIDE;
virtual ::ppapi::Preferences GetPreferences() OVERRIDE;
+ int GetRoutingId() const;
+
private:
void PublishInitialPolicy(
scoped_refptr<webkit::ppapi::PluginInstance> instance,
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index 543c21e..dab69dc 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -256,9 +256,6 @@ void MockPluginDelegate::DidStopLoading() {
void MockPluginDelegate::SetContentRestriction(int restrictions) {
}
-void MockPluginDelegate::HasUnsupportedFeature() {
-}
-
void MockPluginDelegate::SaveURLAs(const GURL& url) {
}
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index 3d4a034..8a4be75 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -111,7 +111,6 @@ class MockPluginDelegate : public PluginDelegate {
virtual void DidStartLoading();
virtual void DidStopLoading();
virtual void SetContentRestriction(int restrictions);
- virtual void HasUnsupportedFeature();
virtual void SaveURLAs(const GURL& url);
virtual P2PSocketDispatcher* GetP2PSocketDispatcher();
virtual webkit_glue::P2PTransport* CreateP2PTransport();
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index fcbf296..c0bb662 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -418,9 +418,6 @@ class PluginDelegate {
// Sets restrictions on how the content can be used (i.e. no print/copy).
virtual void SetContentRestriction(int restrictions) = 0;
- // Tells the browser that the PDF has an unsupported feature.
- virtual void HasUnsupportedFeature() = 0;
-
// Tells the browser to bring up SaveAs dialog to save specified URL.
virtual void SaveURLAs(const GURL& url) = 0;