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

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

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "content/renderer/pepper/mock_renderer_ppapi_host.h"
6
7
8 namespace content {
9
10 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view,
11 PP_Instance instance)
12 : sink_(),
13 ppapi_host_(&sink_, NULL, ppapi::PpapiPermissions()),
14 render_view_(render_view),
15 pp_instance_(instance) {
16 }
17
18 MockRendererPpapiHost::~MockRendererPpapiHost() {
19 }
20
21 ppapi::host::PpapiHost* MockRendererPpapiHost::GetPpapiHost() {
22 return &ppapi_host_;
23 }
24
25 bool MockRendererPpapiHost::IsValidInstance(PP_Instance instance) const {
26 return instance == pp_instance_;
27 }
28
29 RenderView* MockRendererPpapiHost::GetRenderViewForInstance(
30 PP_Instance instance) const {
31 if (instance == pp_instance_)
32 return render_view_;
33 return NULL;
34 }
35
36 bool MockRendererPpapiHost::HasUserGesture(PP_Instance instance) const {
37 return has_user_gesture_;
38 }
39
40 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/mock_renderer_ppapi_host.h ('k') | content/renderer/pepper/pepper_file_chooser_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698