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

Side by Side Diff: ppapi/proxy/ppb_core_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 10 years 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 | « ppapi/proxy/ppb_core_proxy.h ('k') | ppapi/proxy/ppb_cursor_control_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 "ppapi/proxy/ppb_core_proxy.h" 5 #include "ppapi/proxy/ppb_core_proxy.h"
6 6
7 #include <stdlib.h> // For malloc 7 #include <stdlib.h> // For malloc
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 const void* PPB_Core_Proxy::GetSourceInterface() const { 91 const void* PPB_Core_Proxy::GetSourceInterface() const {
92 return &core_interface; 92 return &core_interface;
93 } 93 }
94 94
95 InterfaceID PPB_Core_Proxy::GetInterfaceId() const { 95 InterfaceID PPB_Core_Proxy::GetInterfaceId() const {
96 return INTERFACE_ID_PPB_CORE; 96 return INTERFACE_ID_PPB_CORE;
97 } 97 }
98 98
99 void PPB_Core_Proxy::OnMessageReceived(const IPC::Message& msg) { 99 bool PPB_Core_Proxy::OnMessageReceived(const IPC::Message& msg) {
100 bool handled = true;
100 IPC_BEGIN_MESSAGE_MAP(PPB_Core_Proxy, msg) 101 IPC_BEGIN_MESSAGE_MAP(PPB_Core_Proxy, msg)
101 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_AddRefResource, 102 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_AddRefResource,
102 OnMsgAddRefResource) 103 OnMsgAddRefResource)
103 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_ReleaseResource, 104 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_ReleaseResource,
104 OnMsgReleaseResource) 105 OnMsgReleaseResource)
106 IPC_MESSAGE_UNHANDLED(handled = false)
105 IPC_END_MESSAGE_MAP() 107 IPC_END_MESSAGE_MAP()
106 // TODO(brettw) handle bad messages! 108 // TODO(brettw) handle bad messages!
109 return handled;
107 } 110 }
108 111
109 void PPB_Core_Proxy::OnMsgAddRefResource(PP_Resource resource) { 112 void PPB_Core_Proxy::OnMsgAddRefResource(PP_Resource resource) {
110 ppb_core_target()->AddRefResource(resource); 113 ppb_core_target()->AddRefResource(resource);
111 } 114 }
112 115
113 void PPB_Core_Proxy::OnMsgReleaseResource(PP_Resource resource) { 116 void PPB_Core_Proxy::OnMsgReleaseResource(PP_Resource resource) {
114 ppb_core_target()->ReleaseResource(resource); 117 ppb_core_target()->ReleaseResource(resource);
115 } 118 }
116 119
117 } // namespace proxy 120 } // namespace proxy
118 } // namespace pp 121 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_core_proxy.h ('k') | ppapi/proxy/ppb_cursor_control_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698