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

Side by Side Diff: content/public/renderer/renderer_ppapi_host.h

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
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 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ipc/ipc_platform_file.h" 11 #include "ipc/ipc_platform_file.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "webkit/plugins/ppapi/plugin_delegate.h"
13 14
14 class FilePath; 15 class FilePath;
15 16
16 namespace IPC { 17 namespace IPC {
17 struct ChannelHandle; 18 struct ChannelHandle;
18 } 19 }
19 20
20 namespace ppapi { 21 namespace ppapi {
21 class PpapiPermissions; 22 class PpapiPermissions;
22 namespace host { 23 namespace host {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Returns the RenderView for the given plugin instance, or NULL if the 80 // Returns the RenderView for the given plugin instance, or NULL if the
80 // instance is invalid. 81 // instance is invalid.
81 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0; 82 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0;
82 83
83 // Returns the WebPluginContainer for the given plugin instance, or NULL if 84 // Returns the WebPluginContainer for the given plugin instance, or NULL if
84 // the instance is invalid. 85 // the instance is invalid.
85 virtual WebKit::WebPluginContainer* GetContainerForInstance( 86 virtual WebKit::WebPluginContainer* GetContainerForInstance(
86 PP_Instance instance) const = 0; 87 PP_Instance instance) const = 0;
87 88
89 // Returns the PlatformGraphics2D for the given plugin resource, or NULL if
90 // the resource is invalid.
91 virtual webkit::ppapi::PluginDelegate::PlatformGraphics2D*
92 GetPlatformGraphics2D(PP_Resource resource) = 0;
93
88 // Returns true if the given instance is considered to be currently 94 // Returns true if the given instance is considered to be currently
89 // processing a user gesture or the plugin module has the "override user 95 // processing a user gesture or the plugin module has the "override user
90 // gesture" flag set (in which case it can always do things normally 96 // gesture" flag set (in which case it can always do things normally
91 // restricted by user gestures). Returns false if the instance is invalid or 97 // restricted by user gestures). Returns false if the instance is invalid or
92 // if there is no current user gesture. 98 // if there is no current user gesture.
93 virtual bool HasUserGesture(PP_Instance instance) const = 0; 99 virtual bool HasUserGesture(PP_Instance instance) const = 0;
94 100
95 // Shares a file handle (HANDLE / file descriptor) with the remote side. It 101 // Shares a file handle (HANDLE / file descriptor) with the remote side. It
96 // returns a handle that should be sent in exactly one IPC message. Upon 102 // returns a handle that should be sent in exactly one IPC message. Upon
97 // receipt, the remote side then owns that handle. Note: if sending the 103 // receipt, the remote side then owns that handle. Note: if sending the
98 // message fails, the returned handle is properly closed by the IPC system. If 104 // message fails, the returned handle is properly closed by the IPC system. If
99 // |should_close_source| is set to true, the original handle is closed by this 105 // |should_close_source| is set to true, the original handle is closed by this
100 // operation and should not be used again. 106 // operation and should not be used again.
101 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 107 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
102 base::PlatformFile handle, 108 base::PlatformFile handle,
103 bool should_close_source) = 0; 109 bool should_close_source) = 0;
104 110
111 // Returns true if the plugin is running in process.
112 virtual bool IsRunningInProcess() const = 0;
113
105 protected: 114 protected:
106 virtual ~RendererPpapiHost() {} 115 virtual ~RendererPpapiHost() {}
107 }; 116 };
108 117
109 } // namespace content 118 } // namespace content
110 119
111 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ 120 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
112
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698