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

Unified Diff: content/renderer/pepper/pepper_platform_audio_input.h

Issue 364123002: [Cross-Site Isolation] Migrate entire MediaStream verticals to be per-RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TabCaptureRegistry: Keep track of original target RenderFrameHost, for OnRequestUpdate(). Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_platform_audio_input.h
diff --git a/content/renderer/pepper/pepper_platform_audio_input.h b/content/renderer/pepper/pepper_platform_audio_input.h
index 56a701aeeb7341fdf7f182a7e6c1f353ff1857fb..e443577919c7d046e5c349397f6a84fbc6b18ab0 100644
--- a/content/renderer/pepper/pepper_platform_audio_input.h
+++ b/content/renderer/pepper/pepper_platform_audio_input.h
@@ -29,7 +29,6 @@ namespace content {
class PepperAudioInputHost;
class PepperMediaDeviceManager;
-class RenderViewImpl;
// PepperPlatformAudioInput is operated on two threads: the main thread (the
// thread on which objects are created) and the I/O thread. All public methods,
@@ -45,7 +44,7 @@ class PepperPlatformAudioInput
// Factory function, returns NULL on failure. StreamCreated() will be called
// when the stream is created.
static PepperPlatformAudioInput* Create(
- const base::WeakPtr<RenderViewImpl>& render_view,
+ int render_frame_id,
const std::string& device_id,
const GURL& document_url,
int sample_rate,
@@ -76,7 +75,7 @@ class PepperPlatformAudioInput
PepperPlatformAudioInput();
- bool Initialize(const base::WeakPtr<RenderViewImpl>& render_view,
+ bool Initialize(int render_frame_id,
const std::string& device_id,
const GURL& document_url,
int sample_rate,
@@ -93,6 +92,8 @@ class PepperPlatformAudioInput
void CloseDevice();
void NotifyStreamCreationFailed();
+ // Can return NULL if the RenderFrame referenced by |render_frame_id_| has
+ // gone away.
PepperMediaDeviceManager* GetMediaDeviceManager();
// The client to notify when the stream is created. THIS MUST ONLY BE
@@ -106,8 +107,8 @@ class PepperPlatformAudioInput
scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_;
scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
- // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD.
- base::WeakPtr<RenderViewImpl> render_view_;
+ // The frame containing the Pepper widget.
+ int render_frame_id_;
// The unique ID to identify the opened device. THIS MUST ONLY BE ACCESSED ON
// THE MAIN THREAD.

Powered by Google App Engine
This is Rietveld 408576698