2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2011 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 CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
|
|
|
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
|
|
|
|
2016-01-06 20:20:54 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#include <string>
|
2016-01-06 20:20:54 +01:00
|
|
|
|
2015-10-09 17:23:12 +02:00
|
|
|
#include "include/internal/cef_types.h"
|
2016-08-31 13:25:56 +02:00
|
|
|
#include "v8/include/v8.h"
|
2015-10-09 17:23:12 +02:00
|
|
|
|
2013-11-08 22:28:56 +01:00
|
|
|
namespace blink {
|
2012-04-03 03:34:16 +02:00
|
|
|
class WebFrame;
|
2013-10-29 18:53:18 +01:00
|
|
|
class WebNode;
|
|
|
|
class WebString;
|
2012-04-03 03:34:16 +02:00
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace webkit_glue {
|
|
|
|
|
2016-01-06 20:20:54 +01:00
|
|
|
extern const int64_t kInvalidFrameId;
|
2014-04-04 18:50:38 +02:00
|
|
|
|
2013-11-08 22:28:56 +01:00
|
|
|
bool CanGoBack(blink::WebView* view);
|
|
|
|
bool CanGoForward(blink::WebView* view);
|
|
|
|
void GoBack(blink::WebView* view);
|
|
|
|
void GoForward(blink::WebView* view);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-06-04 19:41:37 +02:00
|
|
|
// Returns the text of the document element.
|
2013-11-08 22:28:56 +01:00
|
|
|
std::string DumpDocumentText(blink::WebFrame* frame);
|
2013-10-29 18:53:18 +01:00
|
|
|
|
2015-10-09 17:23:12 +02:00
|
|
|
// Expose additional actions on WebNode.
|
|
|
|
cef_dom_node_type_t GetNodeType(const blink::WebNode& node);
|
|
|
|
blink::WebString GetNodeName(const blink::WebNode& node);
|
|
|
|
blink::WebString CreateNodeMarkup(const blink::WebNode& node);
|
2013-11-08 22:28:56 +01:00
|
|
|
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value);
|
2013-06-04 19:41:37 +02:00
|
|
|
|
2016-01-06 20:20:54 +01:00
|
|
|
int64_t GetIdentifier(blink::WebFrame* frame);
|
2014-04-04 18:50:38 +02:00
|
|
|
|
2014-09-24 17:38:11 +02:00
|
|
|
// Find the frame with the specified |unique_name| relative to
|
|
|
|
// |relative_to_frame| in the frame hierarchy.
|
|
|
|
blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
|
|
|
|
blink::WebFrame* relative_to_frame);
|
|
|
|
|
2016-08-31 13:25:56 +02:00
|
|
|
v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
|
|
|
|
v8::Local<v8::Function> function,
|
|
|
|
v8::Local<v8::Object> receiver,
|
|
|
|
int argc,
|
|
|
|
v8::Local<v8::Value> args[],
|
|
|
|
v8::Isolate* isolate);
|
|
|
|
|
|
|
|
bool IsScriptForbidden();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
} // webkit_glue
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|