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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 protected: | 292 protected: |
293 virtual ~PlatformVideoCapture() {} | 293 virtual ~PlatformVideoCapture() {} |
294 | 294 |
295 private: | 295 private: |
296 friend class base::RefCounted<PlatformVideoCapture>; | 296 friend class base::RefCounted<PlatformVideoCapture>; |
297 }; | 297 }; |
298 | 298 |
299 // Provides access to the ppapi broker. | 299 // Provides access to the ppapi broker. |
300 class Broker { | 300 class Broker { |
301 public: | 301 public: |
302 virtual void Connect(webkit::ppapi::PPB_Broker_Impl* client) = 0; | |
303 | |
304 // Decrements the references to the broker. | 302 // Decrements the references to the broker. |
305 // When there are no more references, this renderer's dispatcher is | 303 // When there are no more references, this renderer's dispatcher is |
306 // destroyed, allowing the broker to shutdown if appropriate. | 304 // destroyed, allowing the broker to shutdown if appropriate. |
307 // Callers should not reference this object after calling Disconnect. | 305 // Callers should not reference this object after calling Disconnect(). |
308 virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0; | 306 virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0; |
309 | 307 |
310 protected: | 308 protected: |
311 virtual ~Broker() {} | 309 virtual ~Broker() {} |
312 }; | 310 }; |
313 | 311 |
314 // Notification that the given plugin is focused or unfocused. | 312 // Notification that the given plugin is focused or unfocused. |
315 virtual void PluginFocusChanged(webkit::ppapi::PluginInstance* instance, | 313 virtual void PluginFocusChanged(webkit::ppapi::PluginInstance* instance, |
316 bool focused) = 0; | 314 bool focused) = 0; |
317 // Notification that the text input status of the given plugin is changed. | 315 // Notification that the text input status of the given plugin is changed. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 // The caller is responsible for calling Shutdown() on the returned pointer | 395 // The caller is responsible for calling Shutdown() on the returned pointer |
398 // to clean up the corresponding resources allocated during this call. | 396 // to clean up the corresponding resources allocated during this call. |
399 virtual PlatformAudioInput* CreateAudioInput( | 397 virtual PlatformAudioInput* CreateAudioInput( |
400 const std::string& device_id, | 398 const std::string& device_id, |
401 uint32_t sample_rate, | 399 uint32_t sample_rate, |
402 uint32_t sample_count, | 400 uint32_t sample_count, |
403 PlatformAudioInputClient* client) = 0; | 401 PlatformAudioInputClient* client) = 0; |
404 | 402 |
405 // A pointer is returned immediately, but it is not ready to be used until | 403 // A pointer is returned immediately, but it is not ready to be used until |
406 // BrokerConnected has been called. | 404 // BrokerConnected has been called. |
407 // The caller is responsible for calling Release() on the returned pointer | 405 // The caller is responsible for calling Disconnect() on the returned pointer |
408 // to clean up the corresponding resources allocated during this call. | 406 // to clean up the corresponding resources allocated during this call. |
409 virtual Broker* ConnectToBroker(webkit::ppapi::PPB_Broker_Impl* client) = 0; | 407 virtual Broker* ConnectToBroker(webkit::ppapi::PPB_Broker_Impl* client) = 0; |
410 | 408 |
411 // Notifies that the number of find results has changed. | 409 // Notifies that the number of find results has changed. |
412 virtual void NumberOfFindResultsChanged(int identifier, | 410 virtual void NumberOfFindResultsChanged(int identifier, |
413 int total, | 411 int total, |
414 bool final_result) = 0; | 412 bool final_result) = 0; |
415 | 413 |
416 // Notifies that the index of the currently selected item has been updated. | 414 // Notifies that the index of the currently selected item has been updated. |
417 virtual void SelectedFindResultChanged(int identifier, int index) = 0; | 415 virtual void SelectedFindResultChanged(int identifier, int index) = 0; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 // Returns restrictions on local data handled by the plug-in. | 667 // Returns restrictions on local data handled by the plug-in. |
670 virtual PP_FlashLSORestrictions GetLocalDataRestrictions( | 668 virtual PP_FlashLSORestrictions GetLocalDataRestrictions( |
671 const GURL& document_url, | 669 const GURL& document_url, |
672 const GURL& plugin_url) = 0; | 670 const GURL& plugin_url) = 0; |
673 }; | 671 }; |
674 | 672 |
675 } // namespace ppapi | 673 } // namespace ppapi |
676 } // namespace webkit | 674 } // namespace webkit |
677 | 675 |
678 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 676 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |