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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.h

Issue 493253002: [Android] Stop all media on undoable close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 6 years, 3 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 | Annotate | Revision Log
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_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void ExitFullscreen(bool release_media_player); 63 virtual void ExitFullscreen(bool release_media_player);
64 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface); 64 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface);
65 65
66 // Called when browser player wants the renderer media element to seek. 66 // Called when browser player wants the renderer media element to seek.
67 // Any actual seek started by renderer will be handled by browser in OnSeek(). 67 // Any actual seek started by renderer will be handled by browser in OnSeek().
68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); 68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek);
69 69
70 // Pauses all video players manages by this class. 70 // Pauses all video players manages by this class.
71 void PauseVideo(); 71 void PauseVideo();
72 72
73 // Stops and releases every media managed by this class.
74 void ReleaseAllMediaPlayers();
75
73 // media::MediaPlayerManager overrides. 76 // media::MediaPlayerManager overrides.
74 virtual void OnTimeUpdate( 77 virtual void OnTimeUpdate(
75 int player_id, base::TimeDelta current_time) OVERRIDE; 78 int player_id, base::TimeDelta current_time) OVERRIDE;
76 virtual void OnMediaMetadataChanged( 79 virtual void OnMediaMetadataChanged(
77 int player_id, 80 int player_id,
78 base::TimeDelta duration, 81 base::TimeDelta duration,
79 int width, 82 int width,
80 int height, 83 int height,
81 bool success) OVERRIDE; 84 bool success) OVERRIDE;
82 virtual void OnPlaybackComplete(int player_id) OVERRIDE; 85 virtual void OnPlaybackComplete(int player_id) OVERRIDE;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 195
193 // NOTE: Weak pointers must be invalidated before all other member variables. 196 // NOTE: Weak pointers must be invalidated before all other member variables.
194 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; 197 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_;
195 198
196 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); 199 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager);
197 }; 200 };
198 201
199 } // namespace content 202 } // namespace content
200 203
201 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 204 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698