OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <map> | 10 #include <map> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 base::ProcessHandle broker_process_handle, | 154 base::ProcessHandle broker_process_handle, |
155 const IPC::ChannelHandle& handle); | 155 const IPC::ChannelHandle& handle); |
156 | 156 |
157 // Removes broker from pending_connect_broker_ if present. Returns true if so. | 157 // Removes broker from pending_connect_broker_ if present. Returns true if so. |
158 bool StopWaitingForPpapiBrokerConnection(PpapiBrokerImpl* broker); | 158 bool StopWaitingForPpapiBrokerConnection(PpapiBrokerImpl* broker); |
159 | 159 |
160 // Notification that the render view has been focused or defocused. This | 160 // Notification that the render view has been focused or defocused. This |
161 // notifies all of the plugins. | 161 // notifies all of the plugins. |
162 void OnSetFocus(bool has_focus); | 162 void OnSetFocus(bool has_focus); |
163 | 163 |
| 164 // Returns whether or not a Pepper plugin is focused. |
| 165 bool IsPluginFocused() const; |
| 166 |
164 // PluginDelegate implementation. | 167 // PluginDelegate implementation. |
| 168 virtual void PluginFocusChanged(bool focused) OVERRIDE; |
165 virtual void PluginCrashed(webkit::ppapi::PluginInstance* instance); | 169 virtual void PluginCrashed(webkit::ppapi::PluginInstance* instance); |
166 virtual void InstanceCreated( | 170 virtual void InstanceCreated( |
167 webkit::ppapi::PluginInstance* instance); | 171 webkit::ppapi::PluginInstance* instance); |
168 virtual void InstanceDeleted( | 172 virtual void InstanceDeleted( |
169 webkit::ppapi::PluginInstance* instance); | 173 webkit::ppapi::PluginInstance* instance); |
170 virtual SkBitmap* GetSadPluginBitmap(); | 174 virtual SkBitmap* GetSadPluginBitmap(); |
171 virtual PlatformAudio* CreateAudio( | 175 virtual PlatformAudio* CreateAudio( |
172 uint32_t sample_rate, | 176 uint32_t sample_rate, |
173 uint32_t sample_count, | 177 uint32_t sample_count, |
174 PlatformAudio::Client* client); | 178 PlatformAudio::Client* client); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 299 |
296 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, | 300 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, |
297 IDMapOwnPointer> pending_connect_tcps_; | 301 IDMapOwnPointer> pending_connect_tcps_; |
298 | 302 |
299 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 303 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
300 IDMapOwnPointer> pending_context_menus_; | 304 IDMapOwnPointer> pending_context_menus_; |
301 | 305 |
302 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; | 306 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; |
303 BrokerMap pending_connect_broker_; | 307 BrokerMap pending_connect_broker_; |
304 | 308 |
| 309 // Whether or not the focus is on a PPAPI plugin |
| 310 bool is_pepper_plugin_focused_; |
| 311 |
305 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 312 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
306 }; | 313 }; |
307 | 314 |
308 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 315 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |