Code: PepperMediaDeviceManager* PepperMediaDeviceManager::GetForRenderFrame(
     RenderFrame* render_frame) {
   PepperMediaDeviceManager* handler =
       PepperMediaDeviceManager::Get(render_frame);
   if (!handler)
     handler = new PepperMediaDeviceManager(render_frame);
  return handler;
 }

Commit Message: Pepper: Access PepperMediaDeviceManager through a WeakPtr

Its lifetime is scoped to the RenderFrame, and it might go away before the
hosts that refer to it.

BUG=423030

Review URL: https://codereview.chromium.org/653243003

Cr-Commit-Position: refs/heads/master@{#299897}
CWE ID: CWE-399
PepperMediaDeviceManager* PepperMediaDeviceManager::GetForRenderFrame(
base::WeakPtr<PepperMediaDeviceManager>
PepperMediaDeviceManager::GetForRenderFrame(
     RenderFrame* render_frame) {
   PepperMediaDeviceManager* handler =
       PepperMediaDeviceManager::Get(render_frame);
   if (!handler)
     handler = new PepperMediaDeviceManager(render_frame);
  return handler->AsWeakPtr();
 }
