summaryrefslogtreecommitdiffstats
path: root/content/plugin/webplugin_delegate_stub.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 23:36:15 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 23:36:15 +0000
commitd2ffd6ceb97c5590c01be7580bd2e38dbd7ac2c7 (patch)
treeb56aac35897a683b276ec3c861f2e9d54a66f940 /content/plugin/webplugin_delegate_stub.cc
parentc9bd2e8e19e8c5891d68e99b4c610c04a62046a0 (diff)
downloadchromium_src-d2ffd6ceb97c5590c01be7580bd2e38dbd7ac2c7.zip
chromium_src-d2ffd6ceb97c5590c01be7580bd2e38dbd7ac2c7.tar.gz
chromium_src-d2ffd6ceb97c5590c01be7580bd2e38dbd7ac2c7.tar.bz2
Delete the plugin printing code, which wasn't actually called.
Review URL: http://codereview.chromium.org/6874023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/webplugin_delegate_stub.cc')
-rw-r--r--content/plugin/webplugin_delegate_stub.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc
index 73a46ad..9555313 100644
--- a/content/plugin/webplugin_delegate_stub.cc
+++ b/content/plugin/webplugin_delegate_stub.cc
@@ -22,10 +22,6 @@
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/glue/webcursor.h"
-#if defined(OS_WIN)
-#include "printing/metafile_impl.h"
-#endif // defined(OS_WIN)
-
using WebKit::WebBindings;
using WebKit::WebCursorInfo;
using webkit::npapi::WebPlugin;
@@ -104,7 +100,6 @@ bool WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_HandleInputEvent, OnHandleInputEvent)
IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint)
IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint)
- IPC_MESSAGE_HANDLER(PluginMsg_Print, OnPrint)
IPC_MESSAGE_HANDLER(PluginMsg_GetPluginScriptableObject,
OnGetPluginScriptableObject)
IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometry, OnUpdateGeometry)
@@ -266,36 +261,6 @@ void WebPluginDelegateStub::OnDidPaint() {
webplugin_->DidPaint();
}
-void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory,
- uint32* size) {
-#if defined(OS_WIN)
- printing::NativeMetafile metafile;
- if (!metafile.Init()) {
- NOTREACHED();
- return;
- }
- HDC hdc = metafile.context();
- skia::PlatformDevice::InitializeDC(hdc);
- delegate_->Print(hdc);
- if (!metafile.FinishDocument()) {
- NOTREACHED();
- return;
- }
-
- *size = metafile.GetDataSize();
- DCHECK(*size);
- base::SharedMemory shared_buf;
- CreateSharedBuffer(*size, &shared_buf, shared_memory);
-
- // Retrieve a copy of the data.
- bool success = metafile.GetData(shared_buf.memory(), *size);
- DCHECK(success);
-#else
- // TODO(port): plugin printing.
- NOTIMPLEMENTED();
-#endif
-}
-
void WebPluginDelegateStub::OnUpdateGeometry(
const PluginMsg_UpdateGeometry_Param& param) {
webplugin_->UpdateGeometry(
@@ -398,33 +363,6 @@ void WebPluginDelegateStub::OnInstallMissingPlugin() {
delegate_->InstallMissingPlugin();
}
-void WebPluginDelegateStub::CreateSharedBuffer(
- uint32 size,
- base::SharedMemory* shared_buf,
- base::SharedMemoryHandle* remote_handle) {
- if (!shared_buf->CreateAndMapAnonymous(size)) {
- NOTREACHED();
- shared_buf->Close();
- return;
- }
-
-#if defined(OS_WIN)
- BOOL result = DuplicateHandle(GetCurrentProcess(),
- shared_buf->handle(),
- channel_->renderer_handle(),
- remote_handle, 0, FALSE,
- DUPLICATE_SAME_ACCESS);
- DCHECK_NE(result, 0);
-
- // If the calling function's shared_buf is on the stack, its destructor will
- // close the shared memory buffer handle. This is fine since we already
- // duplicated the handle to the renderer process so it will stay "alive".
-#else
- // TODO(port): this should use TransportDIB.
- NOTIMPLEMENTED();
-#endif
-}
-
void WebPluginDelegateStub::OnHandleURLRequestReply(
unsigned long resource_id, const GURL& url, int notify_id) {
WebPluginResourceClient* resource_client =