summaryrefslogtreecommitdiff
path: root/chromium/chrome/renderer/extensions/page_capture_custom_bindings.h
diff options
context:
space:
mode:
authorThe Qt Project <gerrit-noreply@qt-project.org>2020-03-11 10:00:21 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2020-03-11 10:00:21 +0000
commit7dac0dcbe24b3fe53a575342b848eb2a127a199e (patch)
tree3a4a7d3590dfa31296b3b345f539eccc85295aa2 /chromium/chrome/renderer/extensions/page_capture_custom_bindings.h
parent9ee7f2b72eff3ef35d50db0cb7fa268dcc46adbf (diff)
parent28db9b54de6402bd38770ecc1d620255e9d1e78f (diff)
downloadqtwebengine-chromium-7dac0dcbe24b3fe53a575342b848eb2a127a199e.tar.gz
Merge "Merge remote-tracking branch 'origin/upstream-master' into 79-based" into 79-based
Diffstat (limited to 'chromium/chrome/renderer/extensions/page_capture_custom_bindings.h')
-rw-r--r--chromium/chrome/renderer/extensions/page_capture_custom_bindings.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/chrome/renderer/extensions/page_capture_custom_bindings.h b/chromium/chrome/renderer/extensions/page_capture_custom_bindings.h
new file mode 100644
index 00000000000..9aac731af3a
--- /dev/null
+++ b/chromium/chrome/renderer/extensions/page_capture_custom_bindings.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 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_PAGE_CAPTURE_CUSTOM_BINDINGS_H_
+#define CHROME_RENDERER_EXTENSIONS_PAGE_CAPTURE_CUSTOM_BINDINGS_H_
+
+#include "extensions/renderer/object_backed_native_handler.h"
+
+namespace extensions {
+
+// Implements custom bindings for the pageCapture API.
+class PageCaptureCustomBindings : public ObjectBackedNativeHandler {
+ public:
+ explicit PageCaptureCustomBindings(ScriptContext* context);
+
+ // ObjectBackedNativeHandler:
+ void AddRoutes() override;
+
+ private:
+ // Creates a Blob with the content of the specified file.
+ void CreateBlob(const v8::FunctionCallbackInfo<v8::Value>& args);
+ void SendResponseAck(const v8::FunctionCallbackInfo<v8::Value>& args);
+};
+
+} // namespace extensions
+
+#endif // CHROME_RENDERER_EXTENSIONS_PAGE_CAPTURE_CUSTOM_BINDINGS_H_