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

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

Issue 107413006: Dismiss EME infobar when WebMediaPlayer is destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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_PROXY_MEDIA_KEYS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/containers/hash_tables.h"
9 #include "media/base/media_keys.h" 10 #include "media/base/media_keys.h"
10 11
11 class GURL; 12 class GURL;
12 13
13 namespace content { 14 namespace content {
14 15
15 class RendererMediaPlayerManager; 16 class RendererMediaPlayerManager;
16 17
17 // A MediaKeys proxy that wraps the EME part of RendererMediaPlayerManager. 18 // A MediaKeys proxy that wraps the EME part of RendererMediaPlayerManager.
18 // TODO(xhwang): Instead of accessing RendererMediaPlayerManager directly, let 19 // TODO(xhwang): Instead of accessing RendererMediaPlayerManager directly, let
(...skipping 22 matching lines...) Expand all
41 int response_length) OVERRIDE; 42 int response_length) OVERRIDE;
42 virtual void ReleaseSession(uint32 session_id) OVERRIDE; 43 virtual void ReleaseSession(uint32 session_id) OVERRIDE;
43 44
44 // Callbacks. 45 // Callbacks.
45 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); 46 void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
46 void OnSessionMessage(uint32 session_id, 47 void OnSessionMessage(uint32 session_id,
47 const std::vector<uint8>& message, 48 const std::vector<uint8>& message,
48 const std::string& destination_url); 49 const std::string& destination_url);
49 void OnSessionReady(uint32 session_id); 50 void OnSessionReady(uint32 session_id);
50 void OnSessionClosed(uint32 session_id); 51 void OnSessionClosed(uint32 session_id);
52 void OnSessionApproved(uint32 session_id, bool success);
51 void OnSessionError(uint32 session_id, 53 void OnSessionError(uint32 session_id,
52 media::MediaKeys::KeyError error_code, 54 media::MediaKeys::KeyError error_code,
53 int system_code); 55 int system_code);
54 56
55 private: 57 private:
56 RendererMediaPlayerManager* manager_; 58 RendererMediaPlayerManager* manager_;
57 int media_keys_id_; 59 int media_keys_id_;
58 media::SessionCreatedCB session_created_cb_; 60 media::SessionCreatedCB session_created_cb_;
59 media::SessionMessageCB session_message_cb_; 61 media::SessionMessageCB session_message_cb_;
60 media::SessionReadyCB session_ready_cb_; 62 media::SessionReadyCB session_ready_cb_;
61 media::SessionClosedCB session_closed_cb_; 63 media::SessionClosedCB session_closed_cb_;
62 media::SessionErrorCB session_error_cb_; 64 media::SessionErrorCB session_error_cb_;
65 base::hash_set<uint32> requested_session_id_;
ddorwin 2013/12/20 23:59:52 maybe session_ids_pending_create_ per later discus
xhwang 2013/12/21 00:40:48 Typically how big is this set? I wonder if using h
63 66
64 DISALLOW_COPY_AND_ASSIGN(ProxyMediaKeys); 67 DISALLOW_COPY_AND_ASSIGN(ProxyMediaKeys);
65 }; 68 };
66 69
67 } // namespace content 70 } // namespace content
68 71
69 #endif // CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_ 72 #endif // CONTENT_RENDERER_MEDIA_ANDROID_PROXY_MEDIA_KEYS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698