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

Unified Diff: content/renderer/pepper/content_instance_glue.h

Issue 10544089: Implement the file chooser as a new resource "host" (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/renderer/pepper/content_instance_glue.h
diff --git a/content/renderer/pepper/content_instance_glue.h b/content/renderer/pepper/content_instance_glue.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d93454e82b57d1a675fe44416b98dcc3fa75cfd
--- /dev/null
+++ b/content/renderer/pepper/content_instance_glue.h
@@ -0,0 +1,33 @@
+// 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_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_H_
+#define CONTENT_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_H_
+
+#include "base/basictypes.h"
+#include "ppapi/c/pp_instance.h"
+
+namespace content {
+
+// This interface provides functions for querying instance state for resource
+// host implementations. It allows us to mock out some of these interactions
+// for testing, as well as limit the dependencies on the webkit layer.
+class ContentInstanceGlue {
bbudge 2012/07/09 20:41:36 Can you come up with a better name for this? Also,
+ public:
+ virtual ~ContentInstanceGlue() {}
+
+ // Returns true if the given instance is valid for the host.
+ virtual bool IsValidInstance(PP_Instance instance) = 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) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_H_

Powered by Google App Engine
This is Rietveld 408576698