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

Unified Diff: chrome/renderer/extensions/pepper_request_natives.h

Issue 61383003: Pass pepper apps API calls through the existing js apps API bindings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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: chrome/renderer/extensions/pepper_request_natives.h
diff --git a/chrome/renderer/extensions/pepper_request_natives.h b/chrome/renderer/extensions/pepper_request_natives.h
new file mode 100644
index 0000000000000000000000000000000000000000..28720d9024e023f985ce4689b99536eefbd86ef7
--- /dev/null
+++ b/chrome/renderer/extensions/pepper_request_natives.h
@@ -0,0 +1,36 @@
+// Copyright 2013 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 CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_
+#define CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_
+
+#include "base/compiler_specific.h"
+#include "chrome/renderer/extensions/object_backed_native_handler.h"
+
+namespace base {
+class Value;
+}
+
+namespace extensions {
+
+// Custom bindings for handling API calls from pepper plugins.
+class PepperRequestNatives : public ObjectBackedNativeHandler {
+ public:
+ explicit PepperRequestNatives(ChromeV8Context* context);
+
+ private:
+ // Sends a response to an API call to the pepper plugin which made the call.
+ // |args| should contain:
+ // |request_id|: An int containing the id of the request.
+ // |response|: An array containing the response.
+ // |error|: A string containing the error message if an error occurred or
+ // null if the call was successful.
+ void SendResponse(const v8::FunctionCallbackInfo<v8::Value>& args);
+
+ DISALLOW_COPY_AND_ASSIGN(PepperRequestNatives);
+};
+
+} // namespace extensions
+
+#endif // CHROME_RENDERER_EXTENSIONS_PEPPER_REQUEST_NATIVES_H_

Powered by Google App Engine
This is Rietveld 408576698