Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / renderer / pepper / pepper_helper.cc
bloba610a30dfff5f331db1aa8d9779bb77cc1d1d73d
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/renderer/pepper/pepper_helper.h"
7 #include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h"
8 #include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
9 #include "content/public/renderer/renderer_ppapi_host.h"
10 #include "ppapi/host/ppapi_host.h"
12 PepperHelper::PepperHelper(content::RenderFrame* render_frame)
13 : RenderFrameObserver(render_frame) {}
15 PepperHelper::~PepperHelper() {}
17 void PepperHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
18 // TODO(brettw) figure out how to hook up the host factory. It needs some
19 // kind of filter-like system to allow dynamic additions.
20 host->GetPpapiHost()->AddHostFactoryFilter(
21 scoped_ptr<ppapi::host::HostFactory>(
22 new ChromeRendererPepperHostFactory(host)));
23 host->GetPpapiHost()->AddInstanceMessageFilter(
24 scoped_ptr<ppapi::host::InstanceMessageFilter>(
25 new PepperSharedMemoryMessageFilter(host)));