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

Side by Side Diff: content/renderer/pepper/mock_renderer_ppapi_host.cc

Issue 11366038: Rewrite PPB_AudioInput_Dev to use the new-style host/resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "content/renderer/pepper/mock_renderer_ppapi_host.h" 5 #include "content/renderer/pepper/mock_renderer_ppapi_host.h"
6 6
7 7
8 namespace content { 8 namespace content {
9 9
10 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view, 10 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view,
11 PP_Instance instance) 11 PP_Instance instance)
12 : sink_(), 12 : sink_(),
13 ppapi_host_(&sink_, ppapi::PpapiPermissions()), 13 ppapi_host_(&sink_, ppapi::PpapiPermissions()),
14 render_view_(render_view), 14 render_view_(render_view),
15 pp_instance_(instance), 15 pp_instance_(instance),
16 has_user_gesture_(false) { 16 has_user_gesture_(false) {
17 } 17 }
18 18
19 MockRendererPpapiHost::~MockRendererPpapiHost() { 19 MockRendererPpapiHost::~MockRendererPpapiHost() {
20 } 20 }
21 21
22 ppapi::host::PpapiHost* MockRendererPpapiHost::GetPpapiHost() { 22 ppapi::host::PpapiHost* MockRendererPpapiHost::GetPpapiHost() {
23 return &ppapi_host_; 23 return &ppapi_host_;
24 } 24 }
25 25
26 bool MockRendererPpapiHost::IsValidInstance(PP_Instance instance) const { 26 bool MockRendererPpapiHost::IsValidInstance(PP_Instance instance) const {
27 return instance == pp_instance_; 27 return instance == pp_instance_;
28 } 28 }
29 29
30 webkit::ppapi::PluginInstance* MockRendererPpapiHost::GetPluginInstance(
31 PP_Instance instance) const {
32 NOTIMPLEMENTED();
33 return NULL;
34 }
35
30 RenderView* MockRendererPpapiHost::GetRenderViewForInstance( 36 RenderView* MockRendererPpapiHost::GetRenderViewForInstance(
31 PP_Instance instance) const { 37 PP_Instance instance) const {
32 if (instance == pp_instance_) 38 if (instance == pp_instance_)
33 return render_view_; 39 return render_view_;
34 return NULL; 40 return NULL;
35 } 41 }
36 42
37 WebKit::WebPluginContainer* MockRendererPpapiHost::GetContainerForInstance( 43 WebKit::WebPluginContainer* MockRendererPpapiHost::GetContainerForInstance(
38 PP_Instance instance) const { 44 PP_Instance instance) const {
39 NOTIMPLEMENTED(); 45 NOTIMPLEMENTED();
40 return NULL; 46 return NULL;
41 } 47 }
42 48
43 bool MockRendererPpapiHost::HasUserGesture(PP_Instance instance) const { 49 bool MockRendererPpapiHost::HasUserGesture(PP_Instance instance) const {
44 return has_user_gesture_; 50 return has_user_gesture_;
45 } 51 }
46 52
53 IPC::PlatformFileForTransit MockRendererPpapiHost::ShareHandleWithRemote(
54 base::PlatformFile handle,
55 bool should_close_source) {
56 NOTIMPLEMENTED();
57 return IPC::InvalidPlatformFileForTransit();
58 }
59
47 } // namespace content 60 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/mock_renderer_ppapi_host.h ('k') | content/renderer/pepper/pepper_audio_input_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698