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