OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/file_path.h" | |
viettrungluu
2012/04/11 23:25:27
Nit: unneeded.
| |
13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
14 #include "base/process.h" | 16 #include "base/process.h" |
15 #include "base/scoped_native_library.h" | 17 #include "base/scoped_native_library.h" |
16 #include "build/build_config.h" | 18 #include "build/build_config.h" |
17 #include "content/common/child_thread.h" | 19 #include "content/common/child_thread.h" |
18 #include "ppapi/c/pp_module.h" | 20 #include "ppapi/c/pp_module.h" |
19 #include "ppapi/c/trusted/ppp_broker.h" | 21 #include "ppapi/c/trusted/ppp_broker.h" |
20 #include "ppapi/proxy/plugin_dispatcher.h" | 22 #include "ppapi/proxy/plugin_dispatcher.h" |
21 #include "ppapi/proxy/plugin_globals.h" | 23 #include "ppapi/proxy/plugin_globals.h" |
22 #include "ppapi/proxy/plugin_proxy_delegate.h" | 24 #include "ppapi/proxy/plugin_proxy_delegate.h" |
(...skipping 25 matching lines...) Expand all Loading... | |
48 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 50 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; |
49 | 51 |
50 // PluginProxyDelegate. | 52 // PluginProxyDelegate. |
51 virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE; | 53 virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE; |
52 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 54 virtual void PreCacheFont(const void* logfontw) OVERRIDE; |
53 | 55 |
54 // Message handlers. | 56 // Message handlers. |
55 void OnMsgLoadPlugin(const FilePath& path); | 57 void OnMsgLoadPlugin(const FilePath& path); |
56 void OnMsgCreateChannel(base::ProcessHandle host_process_handle, | 58 void OnMsgCreateChannel(base::ProcessHandle host_process_handle, |
57 int renderer_id); | 59 int renderer_id); |
60 void OnMsgClearSiteData(const FilePath& plugin_data_path, | |
61 const std::string& site, | |
62 uint64 flags, | |
63 uint64 max_age); | |
58 void OnMsgSetNetworkState(bool online); | 64 void OnMsgSetNetworkState(bool online); |
59 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); | 65 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); |
60 | 66 |
67 // Requests that the plugin clear data, returning true on success. | |
68 bool ClearSiteData(const FilePath& plugin_data_path, | |
69 const std::string& site, | |
70 uint64 flags, | |
71 uint64 max_age); | |
72 | |
61 // Sets up the channel to the given renderer. On success, returns true and | 73 // Sets up the channel to the given renderer. On success, returns true and |
62 // fills the given ChannelHandle with the information from the new channel. | 74 // fills the given ChannelHandle with the information from the new channel. |
63 bool SetupRendererChannel(base::ProcessHandle host_process_handle, | 75 bool SetupRendererChannel(base::ProcessHandle host_process_handle, |
64 int renderer_id, | 76 int renderer_id, |
65 IPC::ChannelHandle* handle); | 77 IPC::ChannelHandle* handle); |
66 | 78 |
67 // Sets up the name of the plugin for logging using the given path. | 79 // Sets up the name of the plugin for logging using the given path. |
68 void SavePluginName(const FilePath& path); | 80 void SavePluginName(const FilePath& path); |
69 | 81 |
70 // True if running in a broker process rather than a normal plugin process. | 82 // True if running in a broker process rather than a normal plugin process. |
(...skipping 25 matching lines...) Expand all Loading... | |
96 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; | 108 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; |
97 uint32 next_plugin_dispatcher_id_; | 109 uint32 next_plugin_dispatcher_id_; |
98 | 110 |
99 // The WebKitPlatformSupport implementation. | 111 // The WebKitPlatformSupport implementation. |
100 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; | 112 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; |
101 | 113 |
102 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 114 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
103 }; | 115 }; |
104 | 116 |
105 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 117 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |