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

Side by Side Diff: media/blink/webmediaplayer_cast_android.h

Issue 2619593002: Avoid overriding methods from both blink and non-blink at once. (Closed)
Patch Set: Created 3 years, 11 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 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 // Delete this file when WMPI_CAST is no longer needed. 5 // Delete this file when WMPI_CAST is no longer needed.
6 6
7 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_ 7 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_
8 #define MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_ 8 #define MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 27 matching lines...) Expand all
38 blink::WebLocalFrame* frame, 38 blink::WebLocalFrame* frame,
39 int delegate_id); 39 int delegate_id);
40 40
41 void requestRemotePlayback(); 41 void requestRemotePlayback();
42 void requestRemotePlaybackControl(); 42 void requestRemotePlaybackControl();
43 void requestRemotePlaybackStop(); 43 void requestRemotePlaybackStop();
44 44
45 void SetMediaPlayerManager( 45 void SetMediaPlayerManager(
46 RendererMediaPlayerManagerInterface* media_player_manager); 46 RendererMediaPlayerManagerInterface* media_player_manager);
47 bool isRemote() const { return is_remote_; } 47 bool isRemote() const { return is_remote_; }
48 bool IsPaused() const { return paused_; }
48 49
49 double currentTime() const; 50 double currentTime() const;
50 void play(); 51 void play();
51 void pause(); 52 void pause();
52 void seek(base::TimeDelta t); 53 void seek(base::TimeDelta t);
53 54
54 // RendererMediaPlayerInterface implementation 55 // RendererMediaPlayerInterface implementation
55 void OnMediaMetadataChanged(base::TimeDelta duration, 56 void OnMediaMetadataChanged(base::TimeDelta duration,
56 int width, 57 int width,
57 int height, 58 int height,
(...skipping 17 matching lines...) Expand all
75 const std::string& remote_playback_message) override; 76 const std::string& remote_playback_message) override;
76 void OnDisconnectedFromRemoteDevice() override; 77 void OnDisconnectedFromRemoteDevice() override;
77 void OnCancelledRemotePlaybackRequest() override; 78 void OnCancelledRemotePlaybackRequest() override;
78 void OnRemotePlaybackStarted() override; 79 void OnRemotePlaybackStarted() override;
79 void OnDidExitFullscreen() override; 80 void OnDidExitFullscreen() override;
80 void OnMediaPlayerPlay() override; 81 void OnMediaPlayerPlay() override;
81 void OnMediaPlayerPause() override; 82 void OnMediaPlayerPause() override;
82 void OnRemoteRouteAvailabilityChanged( 83 void OnRemoteRouteAvailabilityChanged(
83 blink::WebRemotePlaybackAvailability availability) override; 84 blink::WebRemotePlaybackAvailability availability) override;
84 85
85 // Getters of playback state.
86 // bool paused() const override;
87
88 // True if the loaded media has a playable video track.
89 // bool hasVideo() const override;
90
91 // This function is called by the RendererMediaPlayerManager to pause the 86 // This function is called by the RendererMediaPlayerManager to pause the
92 // video and release the media player and surface texture when we switch tabs. 87 // video and release the media player and surface texture when we switch tabs.
93 // However, the actual GlTexture is not released to keep the video screenshot. 88 // However, the actual GlTexture is not released to keep the video screenshot.
94 void SuspendAndReleaseResources() override; 89 void SuspendAndReleaseResources() override;
95 90
96 bool paused() const override;
97 bool hasVideo() const override;
98
99 void SetDeviceScaleFactor(float scale_factor); 91 void SetDeviceScaleFactor(float scale_factor);
100 scoped_refptr<VideoFrame> GetCastingBanner(); 92 scoped_refptr<VideoFrame> GetCastingBanner();
101 void setPoster(const blink::WebURL& poster); 93 void setPoster(const blink::WebURL& poster);
102 94
103 private: 95 private:
104 WebMediaPlayerImpl* webmediaplayer_; 96 WebMediaPlayerImpl* webmediaplayer_;
105 blink::WebMediaPlayerClient* client_; 97 blink::WebMediaPlayerClient* client_;
106 WebMediaPlayerParams::Context3DCB context_3d_cb_; 98 WebMediaPlayerParams::Context3DCB context_3d_cb_;
107 99
108 // Manages this object and delegates player calls to the browser process. 100 // Manages this object and delegates player calls to the browser process.
(...skipping 28 matching lines...) Expand all
137 // Make a texture-backed video of the given size containing the given message. 129 // Make a texture-backed video of the given size containing the given message.
138 MEDIA_BLINK_EXPORT scoped_refptr<VideoFrame> MakeTextFrameForCast( 130 MEDIA_BLINK_EXPORT scoped_refptr<VideoFrame> MakeTextFrameForCast(
139 const std::string& remote_playback_message, 131 const std::string& remote_playback_message,
140 gfx::Size canvas_size, 132 gfx::Size canvas_size,
141 gfx::Size natural_size, 133 gfx::Size natural_size,
142 const base::Callback<gpu::gles2::GLES2Interface*()>& context_3d_cb); 134 const base::Callback<gpu::gles2::GLES2Interface*()>& context_3d_cb);
143 135
144 } // namespace media 136 } // namespace media
145 137
146 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_ 138 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_CAST_ANDROID_H_
OLDNEW
« no previous file with comments | « media/blink/renderer_media_player_interface.h ('k') | media/blink/webmediaplayer_cast_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698