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

Unified Diff: content/public/renderer/renderer_ppapi_host.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | content/renderer/gamepad_shared_memory_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/renderer_ppapi_host.h
diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..8fda76982f07f6c5106275496178ab10286253f6
--- /dev/null
+++ b/content/public/renderer/renderer_ppapi_host.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
+#define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
+
+#include "ppapi/c/pp_instance.h"
+
+namespace ppapi {
+namespace host {
+class PpapiHost;
+}
+}
+
+namespace content {
+
+class RenderView;
+
+// Interface that allows components in the embedder app to talk to the
+// PpapiHost in the renderer process.
+//
+// There will be one of these objects in the renderer per plugin module.
+class RendererPpapiHost {
+ public:
+ // Returns the PpapiHost object.
+ virtual ppapi::host::PpapiHost* GetPpapiHost() = 0;
+
+ // Returns true if the given PP_Instance is valid and belongs to the
+ // plugin associated with this host.
+ virtual bool IsValidInstance(PP_Instance instance) const = 0;
+
+ // Returns the RenderView for the given plugin instance, or NULL if the
+ // instance is invalid.
+ virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0;
+
+ // Returns true if the given instance is considered to be currently
+ // processing a user gesture or the plugin module has the "override user
+ // gesture" flag set (in which case it can always do things normally
+ // restricted by user gestures). Returns false if the instance is invalid or
+ // if there is no current user gesture.
+ virtual bool HasUserGesture(PP_Instance instance) const = 0;
+
+ protected:
+ virtual ~RendererPpapiHost() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
+
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | content/renderer/gamepad_shared_memory_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698