| 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_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 base::PlatformFile file, | 123 base::PlatformFile file, |
| 124 int message_id); | 124 int message_id); |
| 125 | 125 |
| 126 // Called by RenderView when ViewMsg_PpapiBrokerChannelCreated. | 126 // Called by RenderView when ViewMsg_PpapiBrokerChannelCreated. |
| 127 void OnPpapiBrokerChannelCreated(int request_id, | 127 void OnPpapiBrokerChannelCreated(int request_id, |
| 128 const IPC::ChannelHandle& handle); | 128 const IPC::ChannelHandle& handle); |
| 129 | 129 |
| 130 // Removes broker from pending_connect_broker_ if present. Returns true if so. | 130 // Removes broker from pending_connect_broker_ if present. Returns true if so. |
| 131 bool StopWaitingForBrokerConnection(PepperBrokerImpl* broker); | 131 bool StopWaitingForBrokerConnection(PepperBrokerImpl* broker); |
| 132 | 132 |
| 133 // Called when we know whether permission to access the PPAPI broker was |
| 134 // granted. |
| 135 void OnPpapiBrokerPermissionResult(int request_id, bool result); |
| 136 |
| 133 // Notification that the render view has been focused or defocused. This | 137 // Notification that the render view has been focused or defocused. This |
| 134 // notifies all of the plugins. | 138 // notifies all of the plugins. |
| 135 void OnSetFocus(bool has_focus); | 139 void OnSetFocus(bool has_focus); |
| 136 | 140 |
| 137 // Notification that the page visibility has changed. The default is visible. | 141 // Notification that the page visibility has changed. The default is visible. |
| 138 void PageVisibilityChanged(bool is_visible); | 142 void PageVisibilityChanged(bool is_visible); |
| 139 | 143 |
| 140 // IME status. | 144 // IME status. |
| 141 bool IsPluginFocused() const; | 145 bool IsPluginFocused() const; |
| 142 gfx::Rect GetCaretBounds() const; | 146 gfx::Rect GetCaretBounds() const; |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; | 494 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; |
| 491 | 495 |
| 492 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; | 496 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; |
| 493 | 497 |
| 494 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 498 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
| 495 IDMapOwnPointer> pending_context_menus_; | 499 IDMapOwnPointer> pending_context_menus_; |
| 496 | 500 |
| 497 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; | 501 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 498 BrokerMap pending_connect_broker_; | 502 BrokerMap pending_connect_broker_; |
| 499 | 503 |
| 504 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl> > |
| 505 PermissionRequestMap; |
| 506 PermissionRequestMap pending_permission_requests_; |
| 507 |
| 500 // Whether or not the focus is on a PPAPI plugin | 508 // Whether or not the focus is on a PPAPI plugin |
| 501 webkit::ppapi::PluginInstance* focused_plugin_; | 509 webkit::ppapi::PluginInstance* focused_plugin_; |
| 502 | 510 |
| 503 // Current text input composition text. Empty if no composition is in | 511 // Current text input composition text. Empty if no composition is in |
| 504 // progress. | 512 // progress. |
| 505 string16 composition_text_; | 513 string16 composition_text_; |
| 506 | 514 |
| 507 // The plugin instance that received the last mouse event. It is set to NULL | 515 // The plugin instance that received the last mouse event. It is set to NULL |
| 508 // if the last mouse event went to elements other than Pepper plugins. | 516 // if the last mouse event went to elements other than Pepper plugins. |
| 509 // |last_mouse_event_target_| is not owned by this class. We can know about | 517 // |last_mouse_event_target_| is not owned by this class. We can know about |
| 510 // when it is destroyed via InstanceDeleted(). | 518 // when it is destroyed via InstanceDeleted(). |
| 511 webkit::ppapi::PluginInstance* last_mouse_event_target_; | 519 webkit::ppapi::PluginInstance* last_mouse_event_target_; |
| 512 | 520 |
| 513 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 521 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 514 | 522 |
| 515 scoped_ptr<PepperDeviceEnumerationEventHandler> | 523 scoped_ptr<PepperDeviceEnumerationEventHandler> |
| 516 device_enumeration_event_handler_; | 524 device_enumeration_event_handler_; |
| 517 | 525 |
| 518 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 526 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 519 }; | 527 }; |
| 520 | 528 |
| 521 } // namespace content | 529 } // namespace content |
| 522 | 530 |
| 523 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 531 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |