Disable ContentSettingBubbleModelTest.RPHAllow which is flaky.
[chromium-blink-merge.git] / content / renderer / pepper / mock_renderer_ppapi_host.cc
blob68aa8c8f3b17254f698ece7a757d6830bf2cdd2a
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 "content/renderer/pepper/mock_renderer_ppapi_host.h"
7 #include "ui/gfx/point.h"
9 namespace content {
11 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view,
12 PP_Instance instance)
13 : sink_(),
14 ppapi_host_(&sink_, ppapi::PpapiPermissions()),
15 render_view_(render_view),
16 pp_instance_(instance),
17 has_user_gesture_(false) {
20 MockRendererPpapiHost::~MockRendererPpapiHost() {
23 ppapi::host::PpapiHost* MockRendererPpapiHost::GetPpapiHost() {
24 return &ppapi_host_;
27 bool MockRendererPpapiHost::IsValidInstance(PP_Instance instance) const {
28 return instance == pp_instance_;
31 webkit::ppapi::PluginInstance* MockRendererPpapiHost::GetPluginInstance(
32 PP_Instance instance) const {
33 NOTIMPLEMENTED();
34 return NULL;
37 RenderView* MockRendererPpapiHost::GetRenderViewForInstance(
38 PP_Instance instance) const {
39 if (instance == pp_instance_)
40 return render_view_;
41 return NULL;
44 WebKit::WebPluginContainer* MockRendererPpapiHost::GetContainerForInstance(
45 PP_Instance instance) const {
46 NOTIMPLEMENTED();
47 return NULL;
50 webkit::ppapi::PluginDelegate::PlatformGraphics2D*
51 MockRendererPpapiHost::GetPlatformGraphics2D(PP_Resource resource) {
52 NOTIMPLEMENTED();
53 return NULL;
56 bool MockRendererPpapiHost::HasUserGesture(PP_Instance instance) const {
57 return has_user_gesture_;
60 int MockRendererPpapiHost::GetRoutingIDForWidget(PP_Instance instance) const {
61 return 0;
64 gfx::Point MockRendererPpapiHost::PluginPointToRenderView(
65 PP_Instance instance,
66 const gfx::Point& pt) const {
67 return gfx::Point();
70 IPC::PlatformFileForTransit MockRendererPpapiHost::ShareHandleWithRemote(
71 base::PlatformFile handle,
72 bool should_close_source) {
73 NOTIMPLEMENTED();
74 return IPC::InvalidPlatformFileForTransit();
77 bool MockRendererPpapiHost::IsRunningInProcess() const {
78 NOTIMPLEMENTED();
79 return false;
82 } // namespace content