Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.h

Issue 10854040: Add hooks to content to request permission to connect to the PPAPI broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; 495 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_;
492 496
493 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; 497 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_;
494 498
495 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, 499 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
496 IDMapOwnPointer> pending_context_menus_; 500 IDMapOwnPointer> pending_context_menus_;
497 501
498 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; 502 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap;
499 BrokerMap pending_connect_broker_; 503 BrokerMap pending_connect_broker_;
500 504
505 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl>, IDMapOwnPointer>
506 PermissionRequestMap;
507 PermissionRequestMap pending_permission_requests_;
508
501 // Whether or not the focus is on a PPAPI plugin 509 // Whether or not the focus is on a PPAPI plugin
502 webkit::ppapi::PluginInstance* focused_plugin_; 510 webkit::ppapi::PluginInstance* focused_plugin_;
503 511
504 // Current text input composition text. Empty if no composition is in 512 // Current text input composition text. Empty if no composition is in
505 // progress. 513 // progress.
506 string16 composition_text_; 514 string16 composition_text_;
507 515
508 // The plugin instance that received the last mouse event. It is set to NULL 516 // The plugin instance that received the last mouse event. It is set to NULL
509 // if the last mouse event went to elements other than Pepper plugins. 517 // if the last mouse event went to elements other than Pepper plugins.
510 // |last_mouse_event_target_| is not owned by this class. We can know about 518 // |last_mouse_event_target_| is not owned by this class. We can know about
511 // when it is destroyed via InstanceDeleted(). 519 // when it is destroyed via InstanceDeleted().
512 webkit::ppapi::PluginInstance* last_mouse_event_target_; 520 webkit::ppapi::PluginInstance* last_mouse_event_target_;
513 521
514 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 522 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
515 523
516 scoped_ptr<PepperDeviceEnumerationEventHandler> 524 scoped_ptr<PepperDeviceEnumerationEventHandler>
517 device_enumeration_event_handler_; 525 device_enumeration_event_handler_;
518 526
519 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 527 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
520 }; 528 };
521 529
522 } // namespace content 530 } // namespace content
523 531
524 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 532 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698