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

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, 5 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
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..ab0d40cc345b0e2ccef6e66ab31173405067ba30
--- /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 browser process.
raymes 2012/07/29 15:53:24 browser->renderer
+//
+// 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_
+

Powered by Google App Engine
This is Rietveld 408576698