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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 1133033003: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed compile error in webmediaplayer_impl Created 5 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 39
40 namespace base { 40 namespace base {
41 class SingleThreadTaskRunner; 41 class SingleThreadTaskRunner;
42 } 42 }
43 43
44 namespace blink { 44 namespace blink {
45 class WebContentDecryptionModule; 45 class WebContentDecryptionModule;
46 class WebContentDecryptionModuleResult; 46 class WebContentDecryptionModuleResult;
47 class WebFrame; 47 class WebFrame;
48 class WebMediaPlayerClient; 48 class WebMediaPlayerClient;
49 class WebMediaPlayerEncryptedMediaClient;
49 class WebURL; 50 class WebURL;
50 } 51 }
51 52
52 namespace cc_blink { 53 namespace cc_blink {
53 class WebLayerImpl; 54 class WebLayerImpl;
54 } 55 }
55 56
56 namespace gpu { 57 namespace gpu {
57 struct MailboxHolder; 58 struct MailboxHolder;
58 } 59 }
(...skipping 23 matching lines...) Expand all
82 public: 83 public:
83 // Construct a WebMediaPlayerAndroid object. This class communicates with the 84 // Construct a WebMediaPlayerAndroid object. This class communicates with the
84 // MediaPlayerAndroid object in the browser process through |proxy|. 85 // MediaPlayerAndroid object in the browser process through |proxy|.
85 // TODO(qinmin): |frame| argument is used to determine whether the current 86 // TODO(qinmin): |frame| argument is used to determine whether the current
86 // player can enter fullscreen. This logic should probably be moved into 87 // player can enter fullscreen. This logic should probably be moved into
87 // blink, so that enterFullscreen() will not be called if another video is 88 // blink, so that enterFullscreen() will not be called if another video is
88 // already in fullscreen. 89 // already in fullscreen.
89 WebMediaPlayerAndroid( 90 WebMediaPlayerAndroid(
90 blink::WebFrame* frame, 91 blink::WebFrame* frame,
91 blink::WebMediaPlayerClient* client, 92 blink::WebMediaPlayerClient* client,
93 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
92 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, 94 base::WeakPtr<media::WebMediaPlayerDelegate> delegate,
93 RendererMediaPlayerManager* player_manager, 95 RendererMediaPlayerManager* player_manager,
94 media::CdmFactory* cdm_factory, 96 media::CdmFactory* cdm_factory,
95 media::MediaPermission* media_permission, 97 media::MediaPermission* media_permission,
96 blink::WebContentDecryptionModule* initial_cdm, 98 blink::WebContentDecryptionModule* initial_cdm,
97 scoped_refptr<StreamTextureFactory> factory, 99 scoped_refptr<StreamTextureFactory> factory,
98 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 100 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
99 media::MediaLog* media_log); 101 media::MediaLog* media_log);
100 virtual ~WebMediaPlayerAndroid(); 102 virtual ~WebMediaPlayerAndroid();
101 103
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // pipeline/decoders. 334 // pipeline/decoders.
333 void ContentDecryptionModuleAttached( 335 void ContentDecryptionModuleAttached(
334 blink::WebContentDecryptionModuleResult result, 336 blink::WebContentDecryptionModuleResult result,
335 bool success); 337 bool success);
336 338
337 bool IsHLSStream() const; 339 bool IsHLSStream() const;
338 340
339 blink::WebFrame* const frame_; 341 blink::WebFrame* const frame_;
340 342
341 blink::WebMediaPlayerClient* const client_; 343 blink::WebMediaPlayerClient* const client_;
344 blink::WebMediaPlayerEncryptedMediaClient* const encrypted_client_;
342 345
343 // |delegate_| is used to notify the browser process of the player status, so 346 // |delegate_| is used to notify the browser process of the player status, so
344 // that the browser process can control screen locks. 347 // that the browser process can control screen locks.
345 // TODO(qinmin): Currently android mediaplayer takes care of the screen 348 // TODO(qinmin): Currently android mediaplayer takes care of the screen
346 // lock. So this is only used for media source. Will apply this to regular 349 // lock. So this is only used for media source. Will apply this to regular
347 // media tag once http://crbug.com/247892 is fixed. 350 // media tag once http://crbug.com/247892 is fixed.
348 base::WeakPtr<media::WebMediaPlayerDelegate> delegate_; 351 base::WeakPtr<media::WebMediaPlayerDelegate> delegate_;
349 352
350 // Save the list of buffered time ranges. 353 // Save the list of buffered time ranges.
351 blink::WebTimeRanges buffered_; 354 blink::WebTimeRanges buffered_;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 519
517 // NOTE: Weak pointers must be invalidated before all other member variables. 520 // NOTE: Weak pointers must be invalidated before all other member variables.
518 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 521 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
519 522
520 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 523 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
521 }; 524 };
522 525
523 } // namespace content 526 } // namespace content
524 527
525 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 528 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698