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

Side by Side Diff: ppapi/proxy/ppp_instance_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/ppp_instance_proxy.h ('k') | no next file » | 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/ppp_instance_proxy.h" 5 #include "ppapi/proxy/ppp_instance_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/ppp_instance.h" 10 #include "ppapi/c/ppp_instance.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 const void* PPP_Instance_Proxy::GetSourceInterface() const { 104 const void* PPP_Instance_Proxy::GetSourceInterface() const {
105 return &instance_interface; 105 return &instance_interface;
106 } 106 }
107 107
108 InterfaceID PPP_Instance_Proxy::GetInterfaceId() const { 108 InterfaceID PPP_Instance_Proxy::GetInterfaceId() const {
109 return INTERFACE_ID_PPP_INSTANCE; 109 return INTERFACE_ID_PPP_INSTANCE;
110 } 110 }
111 111
112 void PPP_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { 112 bool PPP_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
113 bool handled = true;
113 IPC_BEGIN_MESSAGE_MAP(PPP_Instance_Proxy, msg) 114 IPC_BEGIN_MESSAGE_MAP(PPP_Instance_Proxy, msg)
114 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidCreate, 115 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidCreate,
115 OnMsgDidCreate) 116 OnMsgDidCreate)
116 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidDestroy, 117 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidDestroy,
117 OnMsgDidDestroy) 118 OnMsgDidDestroy)
118 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidChangeView, 119 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidChangeView,
119 OnMsgDidChangeView) 120 OnMsgDidChangeView)
120 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidChangeFocus, 121 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_DidChangeFocus,
121 OnMsgDidChangeFocus) 122 OnMsgDidChangeFocus)
122 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_HandleInputEvent, 123 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_HandleInputEvent,
123 OnMsgHandleInputEvent) 124 OnMsgHandleInputEvent)
124 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_HandleDocumentLoad, 125 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_HandleDocumentLoad,
125 OnMsgHandleDocumentLoad) 126 OnMsgHandleDocumentLoad)
126 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_GetInstanceObject, 127 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInstance_GetInstanceObject,
127 OnMsgGetInstanceObject) 128 OnMsgGetInstanceObject)
129 IPC_MESSAGE_UNHANDLED(handled = false)
128 IPC_END_MESSAGE_MAP() 130 IPC_END_MESSAGE_MAP()
131 return handled;
129 } 132 }
130 133
131 void PPP_Instance_Proxy::OnMsgDidCreate( 134 void PPP_Instance_Proxy::OnMsgDidCreate(
132 PP_Instance instance, 135 PP_Instance instance,
133 const std::vector<std::string>& argn, 136 const std::vector<std::string>& argn,
134 const std::vector<std::string>& argv, 137 const std::vector<std::string>& argv,
135 PP_Bool* result) { 138 PP_Bool* result) {
136 *result = PP_FALSE; 139 *result = PP_FALSE;
137 if (argn.size() != argv.size()) 140 if (argn.size() != argv.size())
138 return; 141 return;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 189
187 void PPP_Instance_Proxy::OnMsgGetInstanceObject( 190 void PPP_Instance_Proxy::OnMsgGetInstanceObject(
188 PP_Instance instance, 191 PP_Instance instance,
189 SerializedVarReturnValue result) { 192 SerializedVarReturnValue result) {
190 result.Return(dispatcher(), 193 result.Return(dispatcher(),
191 ppp_instance_target()->GetInstanceObject(instance)); 194 ppp_instance_target()->GetInstanceObject(instance));
192 } 195 }
193 196
194 } // namespace proxy 197 } // namespace proxy
195 } // namespace pp 198 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_instance_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698