| OLD | NEW | 
|   1 // Copyright 2016 The Chromium Authors. All rights reserved. |   1 // Copyright 2016 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 MEDIA_BASE_MEDIA_OBSERVER_H_ |   5 #ifndef MEDIA_BASE_MEDIA_OBSERVER_H_ | 
|   6 #define MEDIA_BASE_MEDIA_OBSERVER_H_ |   6 #define MEDIA_BASE_MEDIA_OBSERVER_H_ | 
|   7  |   7  | 
|   8 #include "media/base/cdm_context.h" |   8 #include "media/base/cdm_context.h" | 
|   9 #include "media/base/pipeline_metadata.h" |   9 #include "media/base/pipeline_metadata.h" | 
|  10 #include "url/gurl.h" |  10 #include "url/gurl.h" | 
|  11  |  11  | 
|  12 namespace media { |  12 namespace media { | 
|  13  |  13  | 
|  14 class MEDIA_EXPORT MediaObserverClient { |  14 class MEDIA_EXPORT MediaObserverClient { | 
|  15  public: |  15  public: | 
|  16   virtual ~MediaObserverClient() {} |  16   virtual ~MediaObserverClient() {} | 
|  17  |  17  | 
|  18   // Requests to restart the media pipeline and create a new renderer as soon as |  18   // Requests to restart the media pipeline and create a new renderer as soon as | 
|  19   // possible. |disable_pipeline_auto_suspend| indicates whether to disable |  19   // possible. |is_rendered_remotely| indicates whether to render the media | 
|  20   // any optimizations that might suspend the media pipeline. |  20   // remotely. When it is true, all the optimizations that might suspend the | 
|  21   virtual void SwitchRenderer(bool disable_pipeline_auto_suspend) = 0; |  21   // media pipeline are disabled. | 
 |  22   virtual void SwitchRenderer(bool is_rendered_remotely) = 0; | 
|  22  |  23  | 
|  23   // Requests to activate monitoring changes on viewport intersection. |  24   // Requests to activate monitoring changes on viewport intersection. | 
|  24   virtual void ActivateViewportIntersectionMonitoring(bool activate) = 0; |  25   virtual void ActivateViewportIntersectionMonitoring(bool activate) = 0; | 
|  25 }; |  26 }; | 
|  26  |  27  | 
|  27 // This class is an observer of media player events. |  28 // This class is an observer of media player events. | 
|  28 class MEDIA_EXPORT MediaObserver { |  29 class MEDIA_EXPORT MediaObserver { | 
|  29  public: |  30  public: | 
|  30   MediaObserver(); |  31   MediaObserver(); | 
|  31   virtual ~MediaObserver(); |  32   virtual ~MediaObserver(); | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|  59   // or the poster attribute is changed. |  60   // or the poster attribute is changed. | 
|  60   virtual void OnSetPoster(const GURL& poster) = 0; |  61   virtual void OnSetPoster(const GURL& poster) = 0; | 
|  61  |  62  | 
|  62   // Set the MediaObserverClient. |  63   // Set the MediaObserverClient. | 
|  63   virtual void SetClient(MediaObserverClient* client) = 0; |  64   virtual void SetClient(MediaObserverClient* client) = 0; | 
|  64 }; |  65 }; | 
|  65  |  66  | 
|  66 }  // namespace media |  67 }  // namespace media | 
|  67  |  68  | 
|  68 #endif  // MEDIA_BASE_MEDIA_OBSERVER_H_ |  69 #endif  // MEDIA_BASE_MEDIA_OBSERVER_H_ | 
| OLD | NEW |