| 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_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Returns the singleton object or NULL. | 26 // Returns the singleton object or NULL. |
| 27 static ContentVideoView* GetInstance(); | 27 static ContentVideoView* GetInstance(); |
| 28 | 28 |
| 29 class Client { | 29 class Client { |
| 30 public: | 30 public: |
| 31 Client() {} | 31 Client() {} |
| 32 // For receiving notififcations when the SurfaceView surface is created and | 32 // For receiving notififcations when the SurfaceView surface is created and |
| 33 // destroyed. When |surface.IsEmpty()| the surface was destroyed and | 33 // destroyed. When |surface.IsEmpty()| the surface was destroyed and |
| 34 // the client should not hold any references to it once this returns. | 34 // the client should not hold any references to it once this returns. |
| 35 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) = 0; | 35 virtual void SetVideoSurface(gl::ScopedJavaSurface surface) = 0; |
| 36 | 36 |
| 37 // Called after the ContentVideoView has been hidden because we're exiting | 37 // Called after the ContentVideoView has been hidden because we're exiting |
| 38 // fullscreen. | 38 // fullscreen. |
| 39 virtual void DidExitFullscreen(bool release_media_player) = 0; | 39 virtual void DidExitFullscreen(bool release_media_player) = 0; |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 ~Client() {} | 42 ~Client() {} |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(Client); | 44 DISALLOW_COPY_AND_ASSIGN(Client); |
| 45 }; | 45 }; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // Weak pointer for posting tasks. | 98 // Weak pointer for posting tasks. |
| 99 base::WeakPtrFactory<ContentVideoView> weak_factory_; | 99 base::WeakPtrFactory<ContentVideoView> weak_factory_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); | 101 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace content | 104 } // namespace content |
| 105 | 105 |
| 106 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 106 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
| OLD | NEW |