| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 static PluginDispatcher* GetForResource(const Resource* resource); | 109 static PluginDispatcher* GetForResource(const Resource* resource); |
| 110 | 110 |
| 111 // Implements the GetInterface function for the plugin to call to retrieve | 111 // Implements the GetInterface function for the plugin to call to retrieve |
| 112 // a browser interface. | 112 // a browser interface. |
| 113 static const void* GetBrowserInterface(const char* interface_name); | 113 static const void* GetBrowserInterface(const char* interface_name); |
| 114 | 114 |
| 115 // Logs the given log message to the given instance, or, if the instance is | 115 // Logs the given log message to the given instance, or, if the instance is |
| 116 // invalid, to all instances associated with all dispatchers. Used for | 116 // invalid, to all instances associated with all dispatchers. Used for |
| 117 // global log messages. | 117 // global log messages. |
| 118 static void LogWithSource(PP_Instance instance, | 118 static void LogWithSource(PP_Instance instance, |
| 119 PP_LogLevel_Dev level, | 119 PP_LogLevel level, |
| 120 const std::string& source, | 120 const std::string& source, |
| 121 const std::string& value); | 121 const std::string& value); |
| 122 | 122 |
| 123 const void* GetPluginInterface(const std::string& interface_name); | 123 const void* GetPluginInterface(const std::string& interface_name); |
| 124 | 124 |
| 125 // You must call this function before anything else. Returns true on success. | 125 // You must call this function before anything else. Returns true on success. |
| 126 // The delegate pointer must outlive this class, ownership is not | 126 // The delegate pointer must outlive this class, ownership is not |
| 127 // transferred. | 127 // transferred. |
| 128 bool InitPluginWithChannel(PluginDelegate* delegate, | 128 bool InitPluginWithChannel(PluginDelegate* delegate, |
| 129 const IPC::ChannelHandle& channel_handle, | 129 const IPC::ChannelHandle& channel_handle, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // incognito mode. | 206 // incognito mode. |
| 207 bool incognito_; | 207 bool incognito_; |
| 208 | 208 |
| 209 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 209 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 } // namespace proxy | 212 } // namespace proxy |
| 213 } // namespace ppapi | 213 } // namespace ppapi |
| 214 | 214 |
| 215 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 215 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |