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

Side by Side Diff: ppapi/host/resource_message_filter.h

Issue 563073002: Pepper UDP socket: buffer received packets in the plugin process to improve performance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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_HOST_RESOURCE_MESSAGE_FILTER_H_ 5 #ifndef PPAPI_HOST_RESOURCE_MESSAGE_FILTER_H_
6 #define PPAPI_HOST_RESOURCE_MESSAGE_FILTER_H_ 6 #define PPAPI_HOST_RESOURCE_MESSAGE_FILTER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ppapi/c/pp_stdint.h" 9 #include "ppapi/c/pp_stdint.h"
10 #include "ppapi/host/host_message_context.h" 10 #include "ppapi/host/host_message_context.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual bool HandleMessage(const IPC::Message& msg, 99 virtual bool HandleMessage(const IPC::Message& msg,
100 HostMessageContext* context) OVERRIDE; 100 HostMessageContext* context) OVERRIDE;
101 101
102 // This can be called from any thread. 102 // This can be called from any thread.
103 virtual void SendReply(const ReplyMessageContext& context, 103 virtual void SendReply(const ReplyMessageContext& context,
104 const IPC::Message& msg) OVERRIDE; 104 const IPC::Message& msg) OVERRIDE;
105 105
106 protected: 106 protected:
107 virtual ~ResourceMessageFilter(); 107 virtual ~ResourceMessageFilter();
108 108
109 // Please see the comments of |resource_host_| for on which thread it can be
110 // used and when it is NULL.
111 ResourceHost* resource_host() const { return resource_host_; }
112
109 // If you want the message to be handled on another thread, return a non-null 113 // If you want the message to be handled on another thread, return a non-null
110 // task runner which will target tasks accordingly. 114 // task runner which will target tasks accordingly.
111 virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( 115 virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(
112 const IPC::Message& message); 116 const IPC::Message& message);
113 117
114 private: 118 private:
115 friend class base::DeleteHelper<ResourceMessageFilter>; 119 friend class base::DeleteHelper<ResourceMessageFilter>;
116 friend class base::RefCountedThreadSafe< 120 friend class base::RefCountedThreadSafe<
117 ResourceMessageFilter, internal::ResourceMessageFilterDeleteTraits>; 121 ResourceMessageFilter, internal::ResourceMessageFilterDeleteTraits>;
118 friend struct internal::ResourceMessageFilterDeleteTraits; 122 friend struct internal::ResourceMessageFilterDeleteTraits;
(...skipping 17 matching lines...) Expand all
136 // is destroyed, |OnFilterDestroyed| is called and this will be set to NULL. 140 // is destroyed, |OnFilterDestroyed| is called and this will be set to NULL.
137 ResourceHost* resource_host_; 141 ResourceHost* resource_host_;
138 142
139 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); 143 DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter);
140 }; 144 };
141 145
142 } // namespace host 146 } // namespace host
143 } // namespace ppapi 147 } // namespace ppapi
144 148
145 #endif // PPAPI_HOST_RESOURCE_MESSAGE_FILTER_H_ 149 #endif // PPAPI_HOST_RESOURCE_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc ('k') | ppapi/proxy/plugin_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698