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

Side by Side Diff: ppapi/proxy/host_dispatcher.cc

Issue 4985001: Initial audio implementation. (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/host_dispatcher.h ('k') | ppapi/proxy/interface_id.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/host_dispatcher.h" 5 #include "ppapi/proxy/host_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ppapi/proxy/host_var_serialization_rules.h" 10 #include "ppapi/proxy/host_var_serialization_rules.h"
11 11
12 namespace pp { 12 namespace pp {
13 namespace proxy { 13 namespace proxy {
14 14
15 namespace { 15 namespace {
16 16
17 typedef std::map<PP_Instance, HostDispatcher*> InstanceToDispatcherMap; 17 typedef std::map<PP_Instance, HostDispatcher*> InstanceToDispatcherMap;
18 InstanceToDispatcherMap* g_instance_to_dispatcher = NULL; 18 InstanceToDispatcherMap* g_instance_to_dispatcher = NULL;
19 19
20 } // namespace 20 } // namespace
21 21
22 HostDispatcher::HostDispatcher(const PPB_Var_Deprecated* var_interface, 22 HostDispatcher::HostDispatcher(base::ProcessHandle remote_process_handle,
23 const PPB_Var_Deprecated* var_interface,
23 PP_Module module, 24 PP_Module module,
24 GetInterfaceFunc local_get_interface) 25 GetInterfaceFunc local_get_interface)
25 : Dispatcher(local_get_interface) { 26 : Dispatcher(remote_process_handle, local_get_interface) {
26 SetSerializationRules(new HostVarSerializationRules(var_interface, module)); 27 SetSerializationRules(new HostVarSerializationRules(var_interface, module));
27 } 28 }
28 29
29 HostDispatcher::~HostDispatcher() { 30 HostDispatcher::~HostDispatcher() {
30 } 31 }
31 32
32 // static 33 // static
33 HostDispatcher* HostDispatcher::GetForInstance(PP_Instance instance) { 34 HostDispatcher* HostDispatcher::GetForInstance(PP_Instance instance) {
34 if (!g_instance_to_dispatcher) 35 if (!g_instance_to_dispatcher)
35 return NULL; 36 return NULL;
(...skipping 18 matching lines...) Expand all
54 return; 55 return;
55 InstanceToDispatcherMap::iterator found = g_instance_to_dispatcher->find( 56 InstanceToDispatcherMap::iterator found = g_instance_to_dispatcher->find(
56 instance); 57 instance);
57 if (found != g_instance_to_dispatcher->end()) 58 if (found != g_instance_to_dispatcher->end())
58 g_instance_to_dispatcher->erase(found); 59 g_instance_to_dispatcher->erase(found);
59 } 60 }
60 61
61 } // namespace proxy 62 } // namespace proxy
62 } // namespace pp 63 } // namespace pp
63 64
OLDNEW
« no previous file with comments | « ppapi/proxy/host_dispatcher.h ('k') | ppapi/proxy/interface_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698