OLD | NEW |
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_PLUGIN_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/hash_tables.h" | 12 #include "base/hash_tables.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/process.h" | 15 #include "base/process.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "ppapi/c/dev/ppb_console_dev.h" | |
18 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
19 #include "ppapi/c/pp_instance.h" | 18 #include "ppapi/c/pp_instance.h" |
| 19 #include "ppapi/c/ppb_console.h" |
20 #include "ppapi/proxy/dispatcher.h" | 20 #include "ppapi/proxy/dispatcher.h" |
21 #include "ppapi/shared_impl/ppapi_preferences.h" | 21 #include "ppapi/shared_impl/ppapi_preferences.h" |
22 #include "ppapi/shared_impl/ppb_view_shared.h" | 22 #include "ppapi/shared_impl/ppb_view_shared.h" |
23 #include "ppapi/shared_impl/singleton_resource_id.h" | 23 #include "ppapi/shared_impl/singleton_resource_id.h" |
24 #include "ppapi/shared_impl/tracked_callback.h" | 24 #include "ppapi/shared_impl/tracked_callback.h" |
25 | 25 |
26 namespace ppapi { | 26 namespace ppapi { |
27 | 27 |
28 struct Preferences; | 28 struct Preferences; |
29 class Resource; | 29 class Resource; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 static PluginDispatcher* GetForResource(const Resource* resource); | 112 static PluginDispatcher* GetForResource(const Resource* resource); |
113 | 113 |
114 // Implements the GetInterface function for the plugin to call to retrieve | 114 // Implements the GetInterface function for the plugin to call to retrieve |
115 // a browser interface. | 115 // a browser interface. |
116 static const void* GetBrowserInterface(const char* interface_name); | 116 static const void* GetBrowserInterface(const char* interface_name); |
117 | 117 |
118 // Logs the given log message to the given instance, or, if the instance is | 118 // Logs the given log message to the given instance, or, if the instance is |
119 // invalid, to all instances associated with all dispatchers. Used for | 119 // invalid, to all instances associated with all dispatchers. Used for |
120 // global log messages. | 120 // global log messages. |
121 static void LogWithSource(PP_Instance instance, | 121 static void LogWithSource(PP_Instance instance, |
122 PP_LogLevel_Dev level, | 122 PP_LogLevel level, |
123 const std::string& source, | 123 const std::string& source, |
124 const std::string& value); | 124 const std::string& value); |
125 | 125 |
126 const void* GetPluginInterface(const std::string& interface_name); | 126 const void* GetPluginInterface(const std::string& interface_name); |
127 | 127 |
128 // You must call this function before anything else. Returns true on success. | 128 // You must call this function before anything else. Returns true on success. |
129 // The delegate pointer must outlive this class, ownership is not | 129 // The delegate pointer must outlive this class, ownership is not |
130 // transferred. | 130 // transferred. |
131 bool InitPluginWithChannel(PluginDelegate* delegate, | 131 bool InitPluginWithChannel(PluginDelegate* delegate, |
132 const IPC::ChannelHandle& channel_handle, | 132 const IPC::ChannelHandle& channel_handle, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // incognito mode. | 209 // incognito mode. |
210 bool incognito_; | 210 bool incognito_; |
211 | 211 |
212 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 212 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
213 }; | 213 }; |
214 | 214 |
215 } // namespace proxy | 215 } // namespace proxy |
216 } // namespace ppapi | 216 } // namespace ppapi |
217 | 217 |
218 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 218 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |