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

Side by Side Diff: media/gpu/content_video_view_overlay.h

Issue 2856253004: removed AndroidOverlayFactory (Closed)
Patch Set: cl feedvback Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_ 5 #ifndef MEDIA_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_
6 #define MEDIA_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_ 6 #define MEDIA_GPU_CONTENT_VIDEO_VIEW_OVERLAY_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "media/base/android/android_overlay.h" 9 #include "media/base/android/android_overlay.h"
10 #include "media/gpu/content_video_view_overlay_allocator.h" 10 #include "media/gpu/content_video_view_overlay_allocator.h"
11 #include "ui/gl/android/scoped_java_surface.h" 11 #include "ui/gl/android/scoped_java_surface.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class ContentVideoViewOverlay 15 class ContentVideoViewOverlay
16 : public ContentVideoViewOverlayAllocator::Client { 16 : public ContentVideoViewOverlayAllocator::Client {
17 public: 17 public:
18 // |config| is ignored except for callbacks. Callbacks will not be called 18 // |config| is ignored except for callbacks. Callbacks will not be called
19 // before this returns. 19 // before this returns.
20 ContentVideoViewOverlay(int surface_id, const AndroidOverlay::Config& config); 20 ContentVideoViewOverlay(int surface_id, AndroidOverlayConfig config);
21 ~ContentVideoViewOverlay() override; 21 ~ContentVideoViewOverlay() override;
22 22
23 // AndroidOverlay (via ContentVideoViewOverlayAllocator::Client) 23 // AndroidOverlay (via ContentVideoViewOverlayAllocator::Client)
24 // ContentVideoView ignores this, unfortunately. 24 // ContentVideoView ignores this, unfortunately.
25 void ScheduleLayout(const gfx::Rect& rect) override; 25 void ScheduleLayout(const gfx::Rect& rect) override;
26 const base::android::JavaRef<jobject>& GetJavaSurface() const override; 26 const base::android::JavaRef<jobject>& GetJavaSurface() const override;
27 27
28 // ContentVideoViewOverlayAllocator::Client 28 // ContentVideoViewOverlayAllocator::Client
29 void OnSurfaceAvailable(bool success) override; 29 void OnSurfaceAvailable(bool success) override;
30 void OnSurfaceDestroyed() override; 30 void OnSurfaceDestroyed() override;
31 int32_t GetSurfaceId() override; 31 int32_t GetSurfaceId() override;
32 32
33 protected: 33 protected:
34 // For tests. 34 // For tests.
35 ContentVideoViewOverlay(); 35 ContentVideoViewOverlay();
36 36
37 private: 37 private:
38 int surface_id_; 38 int surface_id_;
39 AndroidOverlay::Config config_; 39 AndroidOverlayConfig config_;
40 gl::ScopedJavaSurface surface_; 40 gl::ScopedJavaSurface surface_;
41 41
42 base::WeakPtrFactory<ContentVideoViewOverlay> weak_factory_; 42 base::WeakPtrFactory<ContentVideoViewOverlay> weak_factory_;
43 }; 43 };
44 44
45 } // namespace media 45 } // namespace media
46 46
47 #endif // MEDIA_GPU_ANDROID_CONTENT_VIDEO_VIEW_OVERLAY_H_ 47 #endif // MEDIA_GPU_ANDROID_CONTENT_VIDEO_VIEW_OVERLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698