app_window_custom_bindings.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // 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. #ifndef EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_
  5. #define EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_
  6. #include "extensions/renderer/object_backed_native_handler.h"
  7. #include "v8/include/v8-forward.h"
  8. namespace extensions {
  9. // Implements custom bindings for the app.window API.
  10. class AppWindowCustomBindings : public ObjectBackedNativeHandler {
  11. public:
  12. AppWindowCustomBindings(ScriptContext* context);
  13. AppWindowCustomBindings(const AppWindowCustomBindings&) = delete;
  14. AppWindowCustomBindings& operator=(const AppWindowCustomBindings&) = delete;
  15. // ObjectBackedNativeHandler:
  16. void AddRoutes() override;
  17. private:
  18. void GetFrame(const v8::FunctionCallbackInfo<v8::Value>& args);
  19. void ResumeParser(const v8::FunctionCallbackInfo<v8::Value>& args);
  20. };
  21. } // namespace extensions
  22. #endif // EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_