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 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual bool Send(IPC::Message* msg) OVERRIDE; | 66 virtual bool Send(IPC::Message* msg) OVERRIDE; |
67 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 67 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
68 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 68 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
69 | 69 |
70 // PluginDispatcher::PluginDelegate implementation. | 70 // PluginDispatcher::PluginDelegate implementation. |
71 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 71 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; |
72 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; | 72 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; |
73 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 73 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; |
74 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 74 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
75 base::PlatformFile handle, | 75 base::PlatformFile handle, |
76 const IPC::SyncChannel& channel, | 76 base::ProcessId peer_pid, |
77 bool should_close_source) OVERRIDE; | 77 bool should_close_source) OVERRIDE; |
78 virtual uint32 Register( | 78 virtual uint32 Register( |
79 ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; | 79 ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; |
80 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 80 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; |
81 | 81 |
82 // PluginProxyDelegate. | 82 // PluginProxyDelegate. |
83 // SendToBrowser() is intended to be safe to use on another thread so | 83 // SendToBrowser() is intended to be safe to use on another thread so |
84 // long as the main PpapiThread outlives it. | 84 // long as the main PpapiThread outlives it. |
85 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 85 virtual IPC::Sender* GetBrowserSender() OVERRIDE; |
86 virtual std::string GetUILanguage() OVERRIDE; | 86 virtual std::string GetUILanguage() OVERRIDE; |
87 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 87 virtual void PreCacheFont(const void* logfontw) OVERRIDE; |
88 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 88 virtual void SetActiveURL(const std::string& url) OVERRIDE; |
89 | 89 |
90 // Message handlers. | 90 // Message handlers. |
91 void OnLoadPlugin(const FilePath& path, | 91 void OnLoadPlugin(const FilePath& path, |
92 const ppapi::PpapiPermissions& permissions); | 92 const ppapi::PpapiPermissions& permissions); |
93 void OnCreateChannel(int renderer_id, bool incognito); | 93 void OnCreateChannel(base::ProcessId renderer_pid, |
| 94 int renderer_child_id, |
| 95 bool incognito); |
94 void OnResourceReply( | 96 void OnResourceReply( |
95 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 97 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
96 const IPC::Message& nested_msg); | 98 const IPC::Message& nested_msg); |
97 void OnSetNetworkState(bool online); | 99 void OnSetNetworkState(bool online); |
98 | 100 |
99 // Sets up the channel to the given renderer. On success, returns true and | 101 // Sets up the channel to the given renderer. On success, returns true and |
100 // fills the given ChannelHandle with the information from the new channel. | 102 // fills the given ChannelHandle with the information from the new channel. |
101 bool SetupRendererChannel(int renderer_id, | 103 bool SetupRendererChannel(base::ProcessId renderer_pid, |
| 104 int renderer_child_id, |
102 bool incognito, | 105 bool incognito, |
103 IPC::ChannelHandle* handle); | 106 IPC::ChannelHandle* handle); |
104 | 107 |
105 // Sets up the name of the plugin for logging using the given path. | 108 // Sets up the name of the plugin for logging using the given path. |
106 void SavePluginName(const FilePath& path); | 109 void SavePluginName(const FilePath& path); |
107 | 110 |
108 // True if running in a broker process rather than a normal plugin process. | 111 // True if running in a broker process rather than a normal plugin process. |
109 bool is_broker_; | 112 bool is_broker_; |
110 | 113 |
111 base::ScopedNativeLibrary library_; | 114 base::ScopedNativeLibrary library_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 #endif | 149 #endif |
147 | 150 |
148 DispatcherMessageListener dispatcher_message_listener_; | 151 DispatcherMessageListener dispatcher_message_listener_; |
149 | 152 |
150 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 153 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
151 }; | 154 }; |
152 | 155 |
153 } // namespace content | 156 } // namespace content |
154 | 157 |
155 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 158 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |