blob: c1c2dac7575353386290e6a6da61735f067cb5dd [file] [log] [blame]
[email protected]120028b9c2012-07-03 01:32:241// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_
6#define CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_
[email protected]120028b9c2012-07-03 01:32:247
8#include "base/compiler_specific.h"
9#include "chrome/renderer/extensions/chrome_v8_extension.h"
10#include "v8/include/v8.h"
11
12class ExtensionDispatcher;
13class ChromeV8Context;
14
15namespace extensions {
16
17// The native component of custom bindings for the chrome.runtime API.
18class RuntimeCustomBindings : public ChromeV8Extension {
19 public:
[email protected]4f1633f2013-03-09 14:26:2420 RuntimeCustomBindings(Dispatcher* dispatcher, ChromeV8Context* context);
[email protected]120028b9c2012-07-03 01:32:2421
22 virtual ~RuntimeCustomBindings();
23
[email protected]481a87e62012-12-19 23:00:2724 // Creates a new messaging channel to the given extension.
[email protected]d8c5fbb2013-06-14 11:35:2525 void OpenChannelToExtension(const v8::FunctionCallbackInfo<v8::Value>& args);
[email protected]481a87e62012-12-19 23:00:2726
[email protected]78b75182013-03-06 03:41:3227 // Creates a new messaging channels for the specified native application.
[email protected]d8c5fbb2013-06-14 11:35:2528 void OpenChannelToNativeApp(const v8::FunctionCallbackInfo<v8::Value>& args);
[email protected]481a87e62012-12-19 23:00:2729
[email protected]120028b9c2012-07-03 01:32:2430 private:
[email protected]d8c5fbb2013-06-14 11:35:2531 void GetManifest(const v8::FunctionCallbackInfo<v8::Value>& args);
[email protected]120028b9c2012-07-03 01:32:2432};
33
[email protected]d8c5fbb2013-06-14 11:35:2534} // namespace extensions
[email protected]120028b9c2012-07-03 01:32:2435
36#endif // CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_