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

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

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-jigged to use ModuleSystem Created 8 years, 10 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: chrome/renderer/extensions/app_bindings.h
diff --git a/chrome/renderer/extensions/app_bindings.h b/chrome/renderer/extensions/app_bindings.h
index 9455ba2a9fc2c1a33e662efdffcef519b51a8728..28090a76520bd125a90bece2eb7e54000377c71b 100644
--- a/chrome/renderer/extensions/app_bindings.h
+++ b/chrome/renderer/extensions/app_bindings.h
@@ -14,21 +14,34 @@
#include "base/compiler_specific.h"
#include "chrome/renderer/extensions/chrome_v8_extension.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
class ChromeV8Context;
// Implements the chrome.app JavaScript object.
//
// TODO(aa): Add unit testing for this class.
-class AppBindings : public ChromeV8Extension {
+class AppBindings : public ChromeV8Extension, public ChromeV8ExtensionHandler {
public:
- explicit AppBindings(ExtensionDispatcher* dispatcher);
+ explicit AppBindings(ExtensionDispatcher* dispatcher,
+ ChromeV8Context* context);
- protected:
- virtual ChromeV8ExtensionHandler* CreateHandler(
- ChromeV8Context* context) OVERRIDE;
+ // IPC::Channel::Listener
Aaron Boodman 2012/02/28 02:42:59 There's no need to have this be public unless you
koz (OOO until 15th September) 2012/03/01 03:41:56 Done.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
+ v8::Handle<v8::Value> GetIsInstalled(const v8::Arguments& args);
+ v8::Handle<v8::Value> Install(const v8::Arguments& args);
+ v8::Handle<v8::Value> GetDetails(const v8::Arguments& args);
+ v8::Handle<v8::Value> GetDetailsForFrame(const v8::Arguments& args);
+ v8::Handle<v8::Value> GetAppNotifyChannel(const v8::Arguments& args);
+
+ v8::Handle<v8::Value> GetDetailsForFrameImpl(WebKit::WebFrame* frame);
+
+ void OnGetAppNotifyChannelResponse(const std::string& channel_id,
+ const std::string& error,
+ int callback_id);
+
DISALLOW_COPY_AND_ASSIGN(AppBindings);
};

Powered by Google App Engine
This is Rietveld 408576698