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

Side by Side Diff: ppapi/proxy/dispatcher.h

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/broker_dispatcher.cc ('k') | ppapi/proxy/dispatcher.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef PPAPI_PROXY_DISPATCHER_H_ 5 #ifndef PPAPI_PROXY_DISPATCHER_H_
6 #define PPAPI_PROXY_DISPATCHER_H_ 6 #define PPAPI_PROXY_DISPATCHER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // each of the given interfaces. 74 // each of the given interfaces.
75 75
76 // IPC::Channel::Listener implementation. 76 // IPC::Channel::Listener implementation.
77 virtual bool OnMessageReceived(const IPC::Message& msg); 77 virtual bool OnMessageReceived(const IPC::Message& msg);
78 78
79 PP_GetInterface_Func local_get_interface() const { 79 PP_GetInterface_Func local_get_interface() const {
80 return local_get_interface_; 80 return local_get_interface_;
81 } 81 }
82 82
83 protected: 83 protected:
84 Dispatcher(base::ProcessHandle remote_process_handle, 84 explicit Dispatcher(PP_GetInterface_Func local_get_interface);
85 PP_GetInterface_Func local_get_interface);
86 85
87 // Setter for the derived classes to set the appropriate var serialization. 86 // Setter for the derived classes to set the appropriate var serialization.
88 // Takes one reference of the given pointer, which must be on the heap. 87 // Takes one reference of the given pointer, which must be on the heap.
89 void SetSerializationRules(VarSerializationRules* var_serialization_rules); 88 void SetSerializationRules(VarSerializationRules* var_serialization_rules);
90 89
91 // Called when an invalid message is received from the remote site. The 90 // Called when an invalid message is received from the remote site. The
92 // default implementation does nothing, derived classes can override. 91 // default implementation does nothing, derived classes can override.
93 virtual void OnInvalidMessageReceived(); 92 virtual void OnInvalidMessageReceived();
94 93
95 bool disallow_trusted_interfaces() const { 94 bool disallow_trusted_interfaces() const {
(...skipping 13 matching lines...) Expand all
109 108
110 scoped_refptr<VarSerializationRules> serialization_rules_; 109 scoped_refptr<VarSerializationRules> serialization_rules_;
111 110
112 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 111 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
113 }; 112 };
114 113
115 } // namespace proxy 114 } // namespace proxy
116 } // namespace ppapi 115 } // namespace ppapi
117 116
118 #endif // PPAPI_PROXY_DISPATCHER_H_ 117 #endif // PPAPI_PROXY_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/broker_dispatcher.cc ('k') | ppapi/proxy/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698