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

Side by Side Diff: ppapi/proxy/ppb_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 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 | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/ppb_pdf_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_instance_proxy.h" 5 #include "ppapi/proxy/ppb_instance_proxy.h"
6 6
7 #include "ppapi/c/pp_var.h" 7 #include "ppapi/c/pp_var.h"
8 #include "ppapi/c/ppb_instance.h" 8 #include "ppapi/c/ppb_instance.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 const void* PPB_Instance_Proxy::GetSourceInterface() const { 79 const void* PPB_Instance_Proxy::GetSourceInterface() const {
80 return &instance_interface; 80 return &instance_interface;
81 } 81 }
82 82
83 InterfaceID PPB_Instance_Proxy::GetInterfaceId() const { 83 InterfaceID PPB_Instance_Proxy::GetInterfaceId() const {
84 return INTERFACE_ID_PPB_INSTANCE; 84 return INTERFACE_ID_PPB_INSTANCE;
85 } 85 }
86 86
87 void PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { 87 bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
88 bool handled = true;
88 IPC_BEGIN_MESSAGE_MAP(PPB_Instance_Proxy, msg) 89 IPC_BEGIN_MESSAGE_MAP(PPB_Instance_Proxy, msg)
89 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetWindowObject, 90 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetWindowObject,
90 OnMsgGetWindowObject) 91 OnMsgGetWindowObject)
91 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetOwnerElementObject, 92 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetOwnerElementObject,
92 OnMsgGetOwnerElementObject) 93 OnMsgGetOwnerElementObject)
93 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_BindGraphics, 94 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_BindGraphics,
94 OnMsgBindGraphics) 95 OnMsgBindGraphics)
95 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame, 96 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame,
96 OnMsgIsFullFrame) 97 OnMsgIsFullFrame)
97 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript, 98 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript,
98 OnMsgExecuteScript) 99 OnMsgExecuteScript)
100 IPC_MESSAGE_UNHANDLED(handled = false)
99 IPC_END_MESSAGE_MAP() 101 IPC_END_MESSAGE_MAP()
102 return handled;
100 } 103 }
101 104
102 void PPB_Instance_Proxy::OnMsgGetWindowObject( 105 void PPB_Instance_Proxy::OnMsgGetWindowObject(
103 PP_Instance instance, 106 PP_Instance instance,
104 SerializedVarReturnValue result) { 107 SerializedVarReturnValue result) {
105 result.Return(dispatcher(), 108 result.Return(dispatcher(),
106 ppb_instance_target()->GetWindowObject(instance)); 109 ppb_instance_target()->GetWindowObject(instance));
107 } 110 }
108 111
109 void PPB_Instance_Proxy::OnMsgGetOwnerElementObject( 112 void PPB_Instance_Proxy::OnMsgGetOwnerElementObject(
(...skipping 20 matching lines...) Expand all
130 SerializedVarOutParam out_exception, 133 SerializedVarOutParam out_exception,
131 SerializedVarReturnValue result) { 134 SerializedVarReturnValue result) {
132 result.Return(dispatcher(), ppb_instance_target()->ExecuteScript( 135 result.Return(dispatcher(), ppb_instance_target()->ExecuteScript(
133 instance, 136 instance,
134 script.Get(dispatcher()), 137 script.Get(dispatcher()),
135 out_exception.OutParam(dispatcher()))); 138 out_exception.OutParam(dispatcher())));
136 } 139 }
137 140
138 } // namespace proxy 141 } // namespace proxy
139 } // namespace pp 142 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/ppb_pdf_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698