runtime_custom_bindings.h 913 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2014 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. #ifndef EXTENSIONS_RENDERER_RUNTIME_CUSTOM_BINDINGS_H_
  5. #define EXTENSIONS_RENDERER_RUNTIME_CUSTOM_BINDINGS_H_
  6. #include "base/compiler_specific.h"
  7. #include "extensions/renderer/object_backed_native_handler.h"
  8. #include "v8/include/v8-forward.h"
  9. namespace extensions {
  10. // The native component of custom bindings for the chrome.runtime API.
  11. class RuntimeCustomBindings : public ObjectBackedNativeHandler {
  12. public:
  13. explicit RuntimeCustomBindings(ScriptContext* context);
  14. ~RuntimeCustomBindings() override;
  15. // ObjectBackedNativeHandler:
  16. void AddRoutes() override;
  17. private:
  18. void GetExtensionViews(const v8::FunctionCallbackInfo<v8::Value>& args);
  19. };
  20. } // namespace extensions
  21. #endif // EXTENSIONS_RENDERER_RUNTIME_CUSTOM_BINDINGS_H_