| 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_BROWSER_PLUGIN_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 private: | 132 private: |
| 133 // Sends a message to the plugin process to request creation of a new channel | 133 // Sends a message to the plugin process to request creation of a new channel |
| 134 // for the given mime type. | 134 // for the given mime type. |
| 135 void RequestPluginChannel(Client* client); | 135 void RequestPluginChannel(Client* client); |
| 136 | 136 |
| 137 // Message handlers. | 137 // Message handlers. |
| 138 void OnChannelCreated(const IPC::ChannelHandle& channel_handle); | 138 void OnChannelCreated(const IPC::ChannelHandle& channel_handle); |
| 139 void OnChannelDestroyed(int renderer_id); | 139 void OnChannelDestroyed(int renderer_id); |
| 140 | 140 |
| 141 #if defined(OS_WIN) | |
| 142 void OnPluginWindowDestroyed(HWND window, HWND parent); | |
| 143 #endif | |
| 144 | |
| 145 #if defined(OS_MACOSX) | 141 #if defined(OS_MACOSX) |
| 146 void OnPluginShowWindow(uint32_t window_id, | 142 void OnPluginShowWindow(uint32_t window_id, |
| 147 gfx::Rect window_rect, | 143 gfx::Rect window_rect, |
| 148 bool modal); | 144 bool modal); |
| 149 void OnPluginHideWindow(uint32_t window_id, gfx::Rect window_rect); | 145 void OnPluginHideWindow(uint32_t window_id, gfx::Rect window_rect); |
| 150 void OnPluginSetCursorVisibility(bool visible); | 146 void OnPluginSetCursorVisibility(bool visible); |
| 151 #endif | 147 #endif |
| 152 | 148 |
| 153 bool CanShutdown() override; | 149 bool CanShutdown() override; |
| 154 void OnProcessCrashed(int exit_code) override; | 150 void OnProcessCrashed(int exit_code) override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 168 // These are the channel requests that we have already sent to | 164 // These are the channel requests that we have already sent to |
| 169 // the plugin process, but haven't heard back about yet. | 165 // the plugin process, but haven't heard back about yet. |
| 170 std::list<Client*> sent_requests_; | 166 std::list<Client*> sent_requests_; |
| 171 | 167 |
| 172 // Information about the plugin. | 168 // Information about the plugin. |
| 173 WebPluginInfo info_; | 169 WebPluginInfo info_; |
| 174 | 170 |
| 175 // The pid of the plugin process. | 171 // The pid of the plugin process. |
| 176 int pid_; | 172 int pid_; |
| 177 | 173 |
| 178 #if defined(OS_WIN) | |
| 179 // Tracks plugin parent windows created on the UI thread. | |
| 180 std::set<HWND> plugin_parent_windows_set_; | |
| 181 #endif | |
| 182 #if defined(OS_MACOSX) | 174 #if defined(OS_MACOSX) |
| 183 // Tracks plugin windows currently visible. | 175 // Tracks plugin windows currently visible. |
| 184 std::set<uint32_t> plugin_visible_windows_set_; | 176 std::set<uint32_t> plugin_visible_windows_set_; |
| 185 // Tracks full screen windows currently visible. | 177 // Tracks full screen windows currently visible. |
| 186 std::set<uint32_t> plugin_fullscreen_windows_set_; | 178 std::set<uint32_t> plugin_fullscreen_windows_set_; |
| 187 // Tracks modal windows currently visible. | 179 // Tracks modal windows currently visible. |
| 188 std::set<uint32_t> plugin_modal_windows_set_; | 180 std::set<uint32_t> plugin_modal_windows_set_; |
| 189 // Tracks the current visibility of the cursor. | 181 // Tracks the current visibility of the cursor. |
| 190 bool plugin_cursor_visible_; | 182 bool plugin_cursor_visible_; |
| 191 #endif | 183 #endif |
| (...skipping 18 matching lines...) Expand all Loading... |
| 210 : public BrowserChildProcessHostTypeIterator<PluginProcessHost> { | 202 : public BrowserChildProcessHostTypeIterator<PluginProcessHost> { |
| 211 public: | 203 public: |
| 212 PluginProcessHostIterator() | 204 PluginProcessHostIterator() |
| 213 : BrowserChildProcessHostTypeIterator<PluginProcessHost>( | 205 : BrowserChildProcessHostTypeIterator<PluginProcessHost>( |
| 214 PROCESS_TYPE_PLUGIN) {} | 206 PROCESS_TYPE_PLUGIN) {} |
| 215 }; | 207 }; |
| 216 | 208 |
| 217 } // namespace content | 209 } // namespace content |
| 218 | 210 |
| 219 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ | 211 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ |
| OLD | NEW |