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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome/renderer/websharedworker_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 void WebPluginDelegateProxy::DidManualLoadFail() { 419 void WebPluginDelegateProxy::DidManualLoadFail() {
420 Send(new PluginMsg_DidManualLoadFail(instance_id_)); 420 Send(new PluginMsg_DidManualLoadFail(instance_id_));
421 } 421 }
422 422
423 void WebPluginDelegateProxy::InstallMissingPlugin() { 423 void WebPluginDelegateProxy::InstallMissingPlugin() {
424 Send(new PluginMsg_InstallMissingPlugin(instance_id_)); 424 Send(new PluginMsg_InstallMissingPlugin(instance_id_));
425 } 425 }
426 426
427 void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { 427 bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
428 child_process_logging::SetActiveURL(page_url_); 428 child_process_logging::SetActiveURL(page_url_);
429 429
430 bool handled = true;
430 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg) 431 IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg)
431 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow) 432 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow)
432 #if defined(OS_WIN) 433 #if defined(OS_WIN)
433 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, 434 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent,
434 OnSetWindowlessPumpEvent) 435 OnSetWindowlessPumpEvent)
435 #endif 436 #endif
436 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) 437 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource)
437 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) 438 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect)
438 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject, 439 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject,
439 OnGetWindowScriptNPObject) 440 OnGetWindowScriptNPObject)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 OnAcceleratedSurfaceSetTransportDIB) 472 OnAcceleratedSurfaceSetTransportDIB)
472 IPC_MESSAGE_HANDLER(PluginHostMsg_AllocTransportDIB, 473 IPC_MESSAGE_HANDLER(PluginHostMsg_AllocTransportDIB,
473 OnAcceleratedSurfaceAllocTransportDIB) 474 OnAcceleratedSurfaceAllocTransportDIB)
474 IPC_MESSAGE_HANDLER(PluginHostMsg_FreeTransportDIB, 475 IPC_MESSAGE_HANDLER(PluginHostMsg_FreeTransportDIB,
475 OnAcceleratedSurfaceFreeTransportDIB) 476 OnAcceleratedSurfaceFreeTransportDIB)
476 IPC_MESSAGE_HANDLER(PluginHostMsg_AcceleratedSurfaceBuffersSwapped, 477 IPC_MESSAGE_HANDLER(PluginHostMsg_AcceleratedSurfaceBuffersSwapped,
477 OnAcceleratedSurfaceBuffersSwapped) 478 OnAcceleratedSurfaceBuffersSwapped)
478 #endif 479 #endif
479 IPC_MESSAGE_HANDLER(PluginHostMsg_URLRedirectResponse, 480 IPC_MESSAGE_HANDLER(PluginHostMsg_URLRedirectResponse,
480 OnURLRedirectResponse) 481 OnURLRedirectResponse)
481 482 IPC_MESSAGE_UNHANDLED(handled = false)
482 IPC_MESSAGE_UNHANDLED_ERROR()
483 IPC_END_MESSAGE_MAP() 483 IPC_END_MESSAGE_MAP()
484 DCHECK(handled);
485 return handled;
484 } 486 }
485 487
486 void WebPluginDelegateProxy::OnChannelError() { 488 void WebPluginDelegateProxy::OnChannelError() {
487 if (plugin_) { 489 if (plugin_) {
488 if (window_) { 490 if (window_) {
489 // The actual WebPluginDelegate never got a chance to tell the WebPlugin 491 // The actual WebPluginDelegate never got a chance to tell the WebPlugin
490 // its window was going away. Do it on its behalf. 492 // its window was going away. Do it on its behalf.
491 WillDestroyWindow(); 493 WillDestroyWindow();
492 } 494 }
493 plugin_->Invalidate(); 495 plugin_->Invalidate();
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 #endif 1561 #endif
1560 1562
1561 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, 1563 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
1562 int resource_id) { 1564 int resource_id) {
1563 if (!plugin_) 1565 if (!plugin_)
1564 return; 1566 return;
1565 1567
1566 plugin_->URLRedirectResponse(allow, resource_id); 1568 plugin_->URLRedirectResponse(allow, resource_id);
1567 } 1569 }
1568 1570
OLDNEW
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome/renderer/websharedworker_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698