mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 233896.
- The CefBrowserSettings.author_and_user_styles option is now always enabled. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1512 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -39,17 +39,17 @@
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
|
||||
using WebKit::WebFrame;
|
||||
using WebKit::WebScriptSource;
|
||||
using WebKit::WebString;
|
||||
using WebKit::WebURL;
|
||||
using WebKit::WebView;
|
||||
using blink::WebFrame;
|
||||
using blink::WebScriptSource;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebView;
|
||||
|
||||
namespace {
|
||||
|
||||
const int64 kInvalidFrameId = -1;
|
||||
|
||||
WebKit::WebString FilePathStringToWebString(
|
||||
blink::WebString FilePathStringToWebString(
|
||||
const base::FilePath::StringType& str) {
|
||||
#if defined(OS_POSIX)
|
||||
return WideToUTF16Hack(base::SysNativeMBToWide(str));
|
||||
@@ -72,7 +72,7 @@ CefRefPtr<CefBrowserImpl> CefBrowserImpl::GetBrowserForView(
|
||||
|
||||
// static
|
||||
CefRefPtr<CefBrowserImpl> CefBrowserImpl::GetBrowserForMainFrame(
|
||||
WebKit::WebFrame* frame) {
|
||||
blink::WebFrame* frame) {
|
||||
return CefContentRendererClient::Get()->GetBrowserForMainFrame(frame);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
|
||||
WebFrame* web_frame = framePtr->web_frame();
|
||||
|
||||
WebKit::WebURLRequest request(params.url);
|
||||
blink::WebURLRequest request(params.url);
|
||||
|
||||
// DidCreateDataSource checks for this value.
|
||||
request.setRequestorID(-1);
|
||||
@@ -299,8 +299,8 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
request.setHTTPMethod(ASCIIToUTF16(params.method));
|
||||
|
||||
if (params.referrer.is_valid()) {
|
||||
WebString referrer = WebKit::WebSecurityPolicy::generateReferrerHeader(
|
||||
static_cast<WebKit::WebReferrerPolicy>(params.referrer_policy),
|
||||
WebString referrer = blink::WebSecurityPolicy::generateReferrerHeader(
|
||||
static_cast<blink::WebReferrerPolicy>(params.referrer_policy),
|
||||
params.url,
|
||||
WebString::fromUTF8(params.referrer.spec()));
|
||||
if (!referrer.isEmpty())
|
||||
@@ -330,7 +330,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
ASCIIToUTF16("application/x-www-form-urlencoded"));
|
||||
}
|
||||
|
||||
WebKit::WebHTTPBody body;
|
||||
blink::WebHTTPBody body;
|
||||
body.initialize();
|
||||
|
||||
const ScopedVector<net::UploadElement>& elements =
|
||||
@@ -340,7 +340,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
for (; it != elements.end(); ++it) {
|
||||
const net::UploadElement& element = **it;
|
||||
if (element.type() == net::UploadElement::TYPE_BYTES) {
|
||||
WebKit::WebData data;
|
||||
blink::WebData data;
|
||||
data.assign(element.bytes(), element.bytes_length());
|
||||
body.appendData(data);
|
||||
} else if (element.type() == net::UploadElement::TYPE_FILE) {
|
||||
@@ -376,7 +376,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process,
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||
WebKit::WebFrame* frame) {
|
||||
blink::WebFrame* frame) {
|
||||
DCHECK(frame);
|
||||
int64 frame_id = frame->identifier();
|
||||
|
||||
@@ -478,14 +478,14 @@ void CefBrowserImpl::DidStopLoading() {
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidFailLoad(
|
||||
WebKit::WebFrame* frame,
|
||||
const WebKit::WebURLError& error) {
|
||||
blink::WebFrame* frame,
|
||||
const blink::WebURLError& error) {
|
||||
OnLoadError(frame, error);
|
||||
OnLoadEnd(frame);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidFinishLoad(WebKit::WebFrame* frame) {
|
||||
WebKit::WebDataSource* ds = frame->dataSource();
|
||||
void CefBrowserImpl::DidFinishLoad(blink::WebFrame* frame) {
|
||||
blink::WebDataSource* ds = frame->dataSource();
|
||||
Send(new CefHostMsg_DidFinishLoad(routing_id(),
|
||||
frame->identifier(),
|
||||
ds->request().url(),
|
||||
@@ -494,18 +494,18 @@ void CefBrowserImpl::DidFinishLoad(WebKit::WebFrame* frame) {
|
||||
OnLoadEnd(frame);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidStartProvisionalLoad(WebKit::WebFrame* frame) {
|
||||
void CefBrowserImpl::DidStartProvisionalLoad(blink::WebFrame* frame) {
|
||||
// Send the frame creation notification if necessary.
|
||||
GetWebFrameImpl(frame);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidFailProvisionalLoad(
|
||||
WebKit::WebFrame* frame,
|
||||
const WebKit::WebURLError& error) {
|
||||
blink::WebFrame* frame,
|
||||
const blink::WebURLError& error) {
|
||||
OnLoadError(frame, error);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidCommitProvisionalLoad(WebKit::WebFrame* frame,
|
||||
void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebFrame* frame,
|
||||
bool is_new_navigation) {
|
||||
OnLoadStart(frame);
|
||||
}
|
||||
@@ -533,7 +533,7 @@ void CefBrowserImpl::FrameDetached(WebFrame* frame) {
|
||||
Send(new CefHostMsg_FrameDetached(routing_id(), frame_id));
|
||||
}
|
||||
|
||||
void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) {
|
||||
void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) {
|
||||
// Notify the handler.
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
if (app.get()) {
|
||||
@@ -543,9 +543,9 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) {
|
||||
if (node.isNull()) {
|
||||
handler->OnFocusedNodeChanged(this, GetFocusedFrame(), NULL);
|
||||
} else {
|
||||
const WebKit::WebDocument& document = node.document();
|
||||
const blink::WebDocument& document = node.document();
|
||||
if (!document.isNull()) {
|
||||
WebKit::WebFrame* frame = document.frame();
|
||||
blink::WebFrame* frame = document.frame();
|
||||
CefRefPtr<CefDOMDocumentImpl> documentImpl =
|
||||
new CefDOMDocumentImpl(this, frame);
|
||||
handler->OnFocusedNodeChanged(this,
|
||||
@@ -565,7 +565,7 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) {
|
||||
|
||||
// Try to identify the focused frame from the node.
|
||||
if (!node.isNull()) {
|
||||
const WebKit::WebDocument& document = node.document();
|
||||
const blink::WebDocument& document = node.document();
|
||||
if (!document.isNull())
|
||||
focused_frame = document.frame();
|
||||
}
|
||||
@@ -587,9 +587,9 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) {
|
||||
Send(new CefHostMsg_FrameFocusChange(routing_id(), frame_id));
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidCreateDataSource(WebKit::WebFrame* frame,
|
||||
WebKit::WebDataSource* ds) {
|
||||
const WebKit::WebURLRequest& request = ds->request();
|
||||
void CefBrowserImpl::DidCreateDataSource(blink::WebFrame* frame,
|
||||
blink::WebDataSource* ds) {
|
||||
const blink::WebURLRequest& request = ds->request();
|
||||
if (request.requestorID() == -1) {
|
||||
// Mark the request as browser-initiated so
|
||||
// RenderViewImpl::decidePolicyForNavigation won't attempt to fork it.
|
||||
@@ -770,7 +770,7 @@ void CefBrowserImpl::OnLoadingStateChange(bool isLoading) {
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserImpl::OnLoadStart(WebKit::WebFrame* frame) {
|
||||
void CefBrowserImpl::OnLoadStart(blink::WebFrame* frame) {
|
||||
if (is_swapped_out())
|
||||
return;
|
||||
|
||||
@@ -788,7 +788,7 @@ void CefBrowserImpl::OnLoadStart(WebKit::WebFrame* frame) {
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserImpl::OnLoadEnd(WebKit::WebFrame* frame) {
|
||||
void CefBrowserImpl::OnLoadEnd(blink::WebFrame* frame) {
|
||||
if (is_swapped_out())
|
||||
return;
|
||||
|
||||
@@ -807,8 +807,8 @@ void CefBrowserImpl::OnLoadEnd(WebKit::WebFrame* frame) {
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserImpl::OnLoadError(WebKit::WebFrame* frame,
|
||||
const WebKit::WebURLError& error) {
|
||||
void CefBrowserImpl::OnLoadError(blink::WebFrame* frame,
|
||||
const blink::WebURLError& error) {
|
||||
if (is_swapped_out())
|
||||
return;
|
||||
|
||||
|
@@ -30,7 +30,7 @@ namespace base {
|
||||
class ListValue;
|
||||
}
|
||||
|
||||
namespace WebKit {
|
||||
namespace blink {
|
||||
class WebFrame;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class CefBrowserImpl : public CefBrowser,
|
||||
static CefRefPtr<CefBrowserImpl> GetBrowserForView(content::RenderView* view);
|
||||
// Returns the browser associated with the specified main WebFrame.
|
||||
static CefRefPtr<CefBrowserImpl> GetBrowserForMainFrame(
|
||||
WebKit::WebFrame* frame);
|
||||
blink::WebFrame* frame);
|
||||
|
||||
// CefBrowser methods.
|
||||
virtual CefRefPtr<CefBrowserHost> GetHost() OVERRIDE;
|
||||
@@ -92,7 +92,7 @@ class CefBrowserImpl : public CefBrowser,
|
||||
bool user_initiated);
|
||||
|
||||
// Returns the matching CefFrameImpl reference or creates a new one.
|
||||
CefRefPtr<CefFrameImpl> GetWebFrameImpl(WebKit::WebFrame* frame);
|
||||
CefRefPtr<CefFrameImpl> GetWebFrameImpl(blink::WebFrame* frame);
|
||||
CefRefPtr<CefFrameImpl> GetWebFrameImpl(int64 frame_id);
|
||||
|
||||
// Frame objects will be deleted immediately before the frame is closed.
|
||||
@@ -114,19 +114,19 @@ class CefBrowserImpl : public CefBrowser,
|
||||
virtual void OnDestruct() OVERRIDE;
|
||||
virtual void DidStartLoading() OVERRIDE;
|
||||
virtual void DidStopLoading() OVERRIDE;
|
||||
virtual void DidFailLoad(WebKit::WebFrame* frame,
|
||||
const WebKit::WebURLError& error) OVERRIDE;
|
||||
virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE;
|
||||
virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE;
|
||||
virtual void DidFailLoad(blink::WebFrame* frame,
|
||||
const blink::WebURLError& error) OVERRIDE;
|
||||
virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE;
|
||||
virtual void DidStartProvisionalLoad(blink::WebFrame* frame) OVERRIDE;
|
||||
virtual void DidFailProvisionalLoad(
|
||||
WebKit::WebFrame* frame,
|
||||
const WebKit::WebURLError& error) OVERRIDE;
|
||||
virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame,
|
||||
blink::WebFrame* frame,
|
||||
const blink::WebURLError& error) OVERRIDE;
|
||||
virtual void DidCommitProvisionalLoad(blink::WebFrame* frame,
|
||||
bool is_new_navigation) OVERRIDE;
|
||||
virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE;
|
||||
virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE;
|
||||
virtual void DidCreateDataSource(WebKit::WebFrame* frame,
|
||||
WebKit::WebDataSource* ds) OVERRIDE;
|
||||
virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE;
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE;
|
||||
virtual void DidCreateDataSource(blink::WebFrame* frame,
|
||||
blink::WebDataSource* ds) OVERRIDE;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
|
||||
// RenderViewObserver::OnMessageReceived message handlers.
|
||||
@@ -135,9 +135,9 @@ class CefBrowserImpl : public CefBrowser,
|
||||
void OnResponseAck(int request_id);
|
||||
|
||||
void OnLoadingStateChange(bool isLoading);
|
||||
void OnLoadStart(WebKit::WebFrame* frame);
|
||||
void OnLoadEnd(WebKit::WebFrame* frame);
|
||||
void OnLoadError(WebKit::WebFrame* frame, const WebKit::WebURLError& error);
|
||||
void OnLoadStart(blink::WebFrame* frame);
|
||||
void OnLoadEnd(blink::WebFrame* frame);
|
||||
void OnLoadError(blink::WebFrame* frame, const blink::WebURLError& error);
|
||||
|
||||
// ID of the browser that this RenderView is associated with. During loading
|
||||
// of cross-origin requests multiple RenderViews may be associated with the
|
||||
|
@@ -60,20 +60,20 @@ MSVC_POP_WARNING();
|
||||
|
||||
namespace {
|
||||
|
||||
// Stub implementation of WebKit::WebPrerenderingSupport.
|
||||
class CefPrerenderingSupport : public WebKit::WebPrerenderingSupport {
|
||||
// Stub implementation of blink::WebPrerenderingSupport.
|
||||
class CefPrerenderingSupport : public blink::WebPrerenderingSupport {
|
||||
public:
|
||||
virtual ~CefPrerenderingSupport() {}
|
||||
|
||||
private:
|
||||
virtual void add(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void cancel(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void abandon(const WebKit::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void add(const blink::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void cancel(const blink::WebPrerender& prerender) OVERRIDE {}
|
||||
virtual void abandon(const blink::WebPrerender& prerender) OVERRIDE {}
|
||||
};
|
||||
|
||||
// Stub implementation of WebKit::WebPrerendererClient.
|
||||
// Stub implementation of blink::WebPrerendererClient.
|
||||
class CefPrerendererClient : public content::RenderViewObserver,
|
||||
public WebKit::WebPrerendererClient {
|
||||
public blink::WebPrerendererClient {
|
||||
public:
|
||||
explicit CefPrerendererClient(content::RenderView* render_view)
|
||||
: content::RenderViewObserver(render_view) {
|
||||
@@ -84,7 +84,7 @@ class CefPrerendererClient : public content::RenderViewObserver,
|
||||
private:
|
||||
virtual ~CefPrerendererClient() {}
|
||||
|
||||
virtual void willAddPrerender(WebKit::WebPrerender* prerender) OVERRIDE {}
|
||||
virtual void willAddPrerender(blink::WebPrerender* prerender) OVERRIDE {}
|
||||
};
|
||||
|
||||
// Implementation of SequencedTaskRunner for WebWorker threads.
|
||||
@@ -163,7 +163,7 @@ CefRefPtr<CefBrowserImpl> CefContentRendererClient::GetBrowserForView(
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserImpl> CefContentRendererClient::GetBrowserForMainFrame(
|
||||
WebKit::WebFrame* frame) {
|
||||
blink::WebFrame* frame) {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
|
||||
BrowserMap::const_iterator it = browsers_.begin();
|
||||
@@ -194,15 +194,15 @@ void CefContentRendererClient::OnBrowserDestroyed(CefBrowserImpl* browser) {
|
||||
void CefContentRendererClient::WebKitInitialized() {
|
||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||
|
||||
WebKit::WebRuntimeFeatures::enableMediaPlayer(
|
||||
blink::WebRuntimeFeatures::enableMediaPlayer(
|
||||
media::IsMediaLibraryInitialized());
|
||||
|
||||
// TODO(cef): Enable these once the implementation supports it.
|
||||
WebKit::WebRuntimeFeatures::enableNotifications(false);
|
||||
blink::WebRuntimeFeatures::enableNotifications(false);
|
||||
|
||||
WebKit::WebRuntimeFeatures::enableSpeechInput(
|
||||
blink::WebRuntimeFeatures::enableSpeechInput(
|
||||
command_line.HasSwitch(switches::kEnableSpeechInput));
|
||||
WebKit::WebRuntimeFeatures::enableMediaStream(
|
||||
blink::WebRuntimeFeatures::enableMediaStream(
|
||||
command_line.HasSwitch(switches::kEnableMediaStream));
|
||||
|
||||
const CefContentClient::SchemeInfoList* schemes =
|
||||
@@ -212,17 +212,17 @@ void CefContentRendererClient::WebKitInitialized() {
|
||||
CefContentClient::SchemeInfoList::const_iterator it = schemes->begin();
|
||||
for (; it != schemes->end(); ++it) {
|
||||
const CefContentClient::SchemeInfo& info = *it;
|
||||
const WebKit::WebString& scheme =
|
||||
WebKit::WebString::fromUTF8(info.scheme_name);
|
||||
const blink::WebString& scheme =
|
||||
blink::WebString::fromUTF8(info.scheme_name);
|
||||
if (info.is_standard) {
|
||||
// Standard schemes must also be registered as CORS enabled to support
|
||||
// CORS-restricted requests (for example, XMLHttpRequest redirects).
|
||||
WebKit::WebSecurityPolicy::registerURLSchemeAsCORSEnabled(scheme);
|
||||
blink::WebSecurityPolicy::registerURLSchemeAsCORSEnabled(scheme);
|
||||
}
|
||||
if (info.is_local)
|
||||
WebKit::WebSecurityPolicy::registerURLSchemeAsLocal(scheme);
|
||||
blink::WebSecurityPolicy::registerURLSchemeAsLocal(scheme);
|
||||
if (info.is_display_isolated)
|
||||
WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(scheme);
|
||||
blink::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(scheme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,10 +232,10 @@ void CefContentRendererClient::WebKitInitialized() {
|
||||
const Cef_CrossOriginWhiteListEntry_Params& entry =
|
||||
cross_origin_whitelist_entries_[i];
|
||||
GURL gurl = GURL(entry.source_origin);
|
||||
WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry(
|
||||
blink::WebSecurityPolicy::addOriginAccessWhitelistEntry(
|
||||
gurl,
|
||||
WebKit::WebString::fromUTF8(entry.target_protocol),
|
||||
WebKit::WebString::fromUTF8(entry.target_domain),
|
||||
blink::WebString::fromUTF8(entry.target_protocol),
|
||||
blink::WebString::fromUTF8(entry.target_domain),
|
||||
entry.allow_target_subdomains);
|
||||
}
|
||||
cross_origin_whitelist_entries_.clear();
|
||||
@@ -394,7 +394,7 @@ void CefContentRendererClient::RenderThreadStarted() {
|
||||
if (!media_path.empty())
|
||||
media::InitializeMediaLibrary(media_path);
|
||||
|
||||
WebKit::WebPrerenderingSupport::initialize(new CefPrerenderingSupport());
|
||||
blink::WebPrerenderingSupport::initialize(new CefPrerenderingSupport());
|
||||
|
||||
// Create global objects associated with the default Isolate.
|
||||
CefV8IsolateCreated();
|
||||
@@ -458,9 +458,9 @@ void CefContentRendererClient::RenderViewCreated(
|
||||
|
||||
bool CefContentRendererClient::OverrideCreatePlugin(
|
||||
content::RenderView* render_view,
|
||||
WebKit::WebFrame* frame,
|
||||
const WebKit::WebPluginParams& params,
|
||||
WebKit::WebPlugin** plugin) {
|
||||
blink::WebFrame* frame,
|
||||
const blink::WebPluginParams& params,
|
||||
blink::WebPlugin** plugin) {
|
||||
CefRefPtr<CefBrowserImpl> browser =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->top());
|
||||
if (!browser || !browser->is_window_rendering_disabled())
|
||||
@@ -504,11 +504,11 @@ bool CefContentRendererClient::OverrideCreatePlugin(
|
||||
|
||||
if (flash || silverlight) {
|
||||
// Force Flash and Silverlight plugins to use windowless mode.
|
||||
WebKit::WebPluginParams params_to_use = params;
|
||||
params_to_use.mimeType = WebKit::WebString::fromUTF8(mime_type);
|
||||
blink::WebPluginParams params_to_use = params;
|
||||
params_to_use.mimeType = blink::WebString::fromUTF8(mime_type);
|
||||
|
||||
size_t size = params.attributeNames.size();
|
||||
WebKit::WebVector<WebKit::WebString> new_names(size+1),
|
||||
blink::WebVector<blink::WebString> new_names(size+1),
|
||||
new_values(size+1);
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
@@ -536,7 +536,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
|
||||
}
|
||||
|
||||
void CefContentRendererClient::DidCreateScriptContext(
|
||||
WebKit::WebFrame* frame, v8::Handle<v8::Context> context,
|
||||
blink::WebFrame* frame, v8::Handle<v8::Context> context,
|
||||
int extension_group, int world_id) {
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->top());
|
||||
@@ -566,7 +566,7 @@ void CefContentRendererClient::DidCreateScriptContext(
|
||||
}
|
||||
|
||||
void CefContentRendererClient::WillReleaseScriptContext(
|
||||
WebKit::WebFrame* frame, v8::Handle<v8::Context> context, int world_id) {
|
||||
blink::WebFrame* frame, v8::Handle<v8::Context> context, int world_id) {
|
||||
// Notify the render process handler.
|
||||
CefRefPtr<CefApp> application = CefContentClient::Get()->application();
|
||||
if (application.get()) {
|
||||
|
@@ -36,7 +36,7 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
||||
CefRefPtr<CefBrowserImpl> GetBrowserForView(content::RenderView* view);
|
||||
|
||||
// Returns the browser associated with the specified main WebFrame.
|
||||
CefRefPtr<CefBrowserImpl> GetBrowserForMainFrame(WebKit::WebFrame* frame);
|
||||
CefRefPtr<CefBrowserImpl> GetBrowserForMainFrame(blink::WebFrame* frame);
|
||||
|
||||
// Called from CefBrowserImpl::OnDestruct().
|
||||
void OnBrowserDestroyed(CefBrowserImpl* browser);
|
||||
@@ -78,14 +78,14 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
||||
virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE;
|
||||
virtual bool OverrideCreatePlugin(
|
||||
content::RenderView* render_view,
|
||||
WebKit::WebFrame* frame,
|
||||
const WebKit::WebPluginParams& params,
|
||||
WebKit::WebPlugin** plugin) OVERRIDE;
|
||||
virtual void DidCreateScriptContext(WebKit::WebFrame* frame,
|
||||
blink::WebFrame* frame,
|
||||
const blink::WebPluginParams& params,
|
||||
blink::WebPlugin** plugin) OVERRIDE;
|
||||
virtual void DidCreateScriptContext(blink::WebFrame* frame,
|
||||
v8::Handle<v8::Context> context,
|
||||
int extension_group,
|
||||
int world_id) OVERRIDE;
|
||||
virtual void WillReleaseScriptContext(WebKit::WebFrame* frame,
|
||||
virtual void WillReleaseScriptContext(blink::WebFrame* frame,
|
||||
v8::Handle<v8::Context> context,
|
||||
int world_id) OVERRIDE;
|
||||
|
||||
|
@@ -15,13 +15,13 @@
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebRange.h"
|
||||
|
||||
using WebKit::WebDocument;
|
||||
using WebKit::WebElement;
|
||||
using WebKit::WebFrame;
|
||||
using WebKit::WebNode;
|
||||
using WebKit::WebRange;
|
||||
using WebKit::WebString;
|
||||
using WebKit::WebURL;
|
||||
using blink::WebDocument;
|
||||
using blink::WebElement;
|
||||
using blink::WebFrame;
|
||||
using blink::WebNode;
|
||||
using blink::WebRange;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
|
||||
|
||||
CefDOMDocumentImpl::CefDOMDocumentImpl(CefBrowserImpl* browser,
|
||||
@@ -199,7 +199,7 @@ CefString CefDOMDocumentImpl::GetCompleteURL(const CefString& partialURL) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetOrCreateNode(
|
||||
const WebKit::WebNode& node) {
|
||||
const blink::WebNode& node) {
|
||||
if (!VerifyContext())
|
||||
return NULL;
|
||||
|
||||
@@ -220,7 +220,7 @@ CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetOrCreateNode(
|
||||
return nodeImpl;
|
||||
}
|
||||
|
||||
void CefDOMDocumentImpl::RemoveNode(const WebKit::WebNode& node) {
|
||||
void CefDOMDocumentImpl::RemoveNode(const blink::WebNode& node) {
|
||||
if (!VerifyContext())
|
||||
return;
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#include <map>
|
||||
#include "include/cef_dom.h"
|
||||
|
||||
namespace WebKit {
|
||||
namespace blink {
|
||||
class WebFrame;
|
||||
class WebNode;
|
||||
};
|
||||
@@ -19,7 +19,7 @@ class CefBrowserImpl;
|
||||
class CefDOMDocumentImpl : public CefDOMDocument {
|
||||
public:
|
||||
CefDOMDocumentImpl(CefBrowserImpl* browser,
|
||||
WebKit::WebFrame* frame);
|
||||
blink::WebFrame* frame);
|
||||
virtual ~CefDOMDocumentImpl();
|
||||
|
||||
// CefDOMDocument methods.
|
||||
@@ -41,11 +41,11 @@ class CefDOMDocumentImpl : public CefDOMDocument {
|
||||
virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE;
|
||||
|
||||
CefBrowserImpl* GetBrowser() { return browser_; }
|
||||
WebKit::WebFrame* GetFrame() { return frame_; }
|
||||
blink::WebFrame* GetFrame() { return frame_; }
|
||||
|
||||
// The document maintains a map of all existing node objects.
|
||||
CefRefPtr<CefDOMNode> GetOrCreateNode(const WebKit::WebNode& node);
|
||||
void RemoveNode(const WebKit::WebNode& node);
|
||||
CefRefPtr<CefDOMNode> GetOrCreateNode(const blink::WebNode& node);
|
||||
void RemoveNode(const blink::WebNode& node);
|
||||
|
||||
// Must be called before the object is destroyed.
|
||||
void Detach();
|
||||
@@ -55,9 +55,9 @@ class CefDOMDocumentImpl : public CefDOMDocument {
|
||||
|
||||
protected:
|
||||
CefBrowserImpl* browser_;
|
||||
WebKit::WebFrame* frame_;
|
||||
blink::WebFrame* frame_;
|
||||
|
||||
typedef std::map<WebKit::WebNode, CefDOMNode*> NodeMap;
|
||||
typedef std::map<blink::WebNode, CefDOMNode*> NodeMap;
|
||||
NodeMap node_map_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefDOMDocumentImpl);
|
||||
|
@@ -10,12 +10,12 @@
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/web/WebDOMEvent.h"
|
||||
|
||||
using WebKit::WebDOMEvent;
|
||||
using WebKit::WebString;
|
||||
using blink::WebDOMEvent;
|
||||
using blink::WebString;
|
||||
|
||||
|
||||
CefDOMEventImpl::CefDOMEventImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
||||
const WebKit::WebDOMEvent& event)
|
||||
const blink::WebDOMEvent& event)
|
||||
: document_(document),
|
||||
event_(event) {
|
||||
DCHECK(!event_.isNull());
|
||||
|
@@ -14,7 +14,7 @@ class CefDOMDocumentImpl;
|
||||
class CefDOMEventImpl : public CefDOMEvent {
|
||||
public:
|
||||
CefDOMEventImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
||||
const WebKit::WebDOMEvent& event);
|
||||
const blink::WebDOMEvent& event);
|
||||
virtual ~CefDOMEventImpl();
|
||||
|
||||
// CefDOMEvent methods.
|
||||
@@ -35,7 +35,7 @@ class CefDOMEventImpl : public CefDOMEvent {
|
||||
|
||||
protected:
|
||||
CefRefPtr<CefDOMDocumentImpl> document_;
|
||||
WebKit::WebDOMEvent event_;
|
||||
blink::WebDOMEvent event_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefDOMEventImpl);
|
||||
};
|
||||
|
@@ -24,16 +24,16 @@
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebSelectElement.h"
|
||||
|
||||
using WebKit::WebDocument;
|
||||
using WebKit::WebDOMEvent;
|
||||
using WebKit::WebDOMEventListener;
|
||||
using WebKit::WebElement;
|
||||
using WebKit::WebFrame;
|
||||
using WebKit::WebFormControlElement;
|
||||
using WebKit::WebInputElement;
|
||||
using WebKit::WebNode;
|
||||
using WebKit::WebSelectElement;
|
||||
using WebKit::WebString;
|
||||
using blink::WebDocument;
|
||||
using blink::WebDOMEvent;
|
||||
using blink::WebDOMEventListener;
|
||||
using blink::WebElement;
|
||||
using blink::WebFrame;
|
||||
using blink::WebFormControlElement;
|
||||
using blink::WebInputElement;
|
||||
using blink::WebNode;
|
||||
using blink::WebSelectElement;
|
||||
using blink::WebString;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -85,7 +85,7 @@ class CefDOMEventListenerWrapper : public WebDOMEventListener,
|
||||
|
||||
|
||||
CefDOMNodeImpl::CefDOMNodeImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
||||
const WebKit::WebNode& node)
|
||||
const blink::WebNode& node)
|
||||
: document_(document),
|
||||
node_(node) {
|
||||
}
|
||||
@@ -359,7 +359,7 @@ CefString CefDOMNodeImpl::GetElementTagName() {
|
||||
return str;
|
||||
}
|
||||
|
||||
const WebElement& element = node_.toConst<WebKit::WebElement>();
|
||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||
const WebString& tagname = element.tagName();
|
||||
if (!tagname.isNull())
|
||||
str = tagname;
|
||||
@@ -376,7 +376,7 @@ bool CefDOMNodeImpl::HasElementAttributes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
const WebElement& element = node_.toConst<WebKit::WebElement>();
|
||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||
return (element.attributeCount() > 0);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const WebElement& element = node_.toConst<WebKit::WebElement>();
|
||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||
return element.hasAttribute(string16(attrName));
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
|
||||
return str;
|
||||
}
|
||||
|
||||
const WebElement& element = node_.toConst<WebKit::WebElement>();
|
||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||
const WebString& attr = element.getAttribute(string16(attrName));
|
||||
if (!attr.isNull())
|
||||
str = attr;
|
||||
@@ -420,7 +420,7 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) {
|
||||
return;
|
||||
}
|
||||
|
||||
const WebElement& element = node_.toConst<WebKit::WebElement>();
|
||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||
unsigned int len = element.attributeCount();
|
||||
if (len == 0)
|
||||
return;
|
||||
@@ -442,7 +442,7 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName,
|
||||
return false;
|
||||
}
|
||||
|
||||
WebElement element = node_.to<WebKit::WebElement>();
|
||||
WebElement element = node_.to<blink::WebElement>();
|
||||
return element.setAttribute(string16(attrName), string16(value));
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() {
|
||||
return str;
|
||||
}
|
||||
|
||||
WebElement element = node_.to<WebKit::WebElement>();
|
||||
WebElement element = node_.to<blink::WebElement>();
|
||||
const WebString& text = element.innerText();
|
||||
if (!text.isNull())
|
||||
str = text;
|
||||
|
@@ -14,7 +14,7 @@ class CefDOMDocumentImpl;
|
||||
class CefDOMNodeImpl : public CefDOMNode {
|
||||
public:
|
||||
CefDOMNodeImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
||||
const WebKit::WebNode& node);
|
||||
const blink::WebNode& node);
|
||||
virtual ~CefDOMNodeImpl();
|
||||
|
||||
// CefDOMNode methods.
|
||||
@@ -56,7 +56,7 @@ class CefDOMNodeImpl : public CefDOMNode {
|
||||
|
||||
protected:
|
||||
CefRefPtr<CefDOMDocumentImpl> document_;
|
||||
WebKit::WebNode node_;
|
||||
blink::WebNode node_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefDOMNodeImpl);
|
||||
};
|
||||
|
@@ -21,10 +21,10 @@
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptSource.h"
|
||||
|
||||
using WebKit::WebString;
|
||||
using blink::WebString;
|
||||
|
||||
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser,
|
||||
WebKit::WebFrame* frame)
|
||||
blink::WebFrame* frame)
|
||||
: browser_(browser),
|
||||
frame_(frame),
|
||||
frame_id_(frame->identifier()) {
|
||||
@@ -170,7 +170,7 @@ void CefFrameImpl::ExecuteJavaScript(const CefString& jsCode,
|
||||
if (frame_) {
|
||||
GURL gurl = GURL(scriptUrl.ToString());
|
||||
frame_->executeScript(
|
||||
WebKit::WebScriptSource(jsCode.ToString16(), gurl, startLine));
|
||||
blink::WebScriptSource(jsCode.ToString16(), gurl, startLine));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ CefRefPtr<CefFrame> CefFrameImpl::GetParent() {
|
||||
CEF_REQUIRE_RT_RETURN(NULL);
|
||||
|
||||
if (frame_) {
|
||||
WebKit::WebFrame* parent = frame_->parent();
|
||||
blink::WebFrame* parent = frame_->parent();
|
||||
if (parent)
|
||||
return browser_->GetWebFrameImpl(parent).get();
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void CefFrameImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
|
||||
// Create a CefDOMDocumentImpl object that is valid only for the scope of this
|
||||
// method.
|
||||
CefRefPtr<CefDOMDocumentImpl> documentImpl;
|
||||
const WebKit::WebDocument& document = frame_->document();
|
||||
const blink::WebDocument& document = frame_->document();
|
||||
if (!document.isNull())
|
||||
documentImpl = new CefDOMDocumentImpl(browser_, frame_);
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
class CefBrowserImpl;
|
||||
|
||||
namespace WebKit {
|
||||
namespace blink {
|
||||
class WebFrame;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class WebFrame;
|
||||
class CefFrameImpl : public CefFrame {
|
||||
public:
|
||||
CefFrameImpl(CefBrowserImpl* browser,
|
||||
WebKit::WebFrame* frame);
|
||||
blink::WebFrame* frame);
|
||||
virtual ~CefFrameImpl();
|
||||
|
||||
// CefFrame implementation.
|
||||
@@ -56,11 +56,11 @@ class CefFrameImpl : public CefFrame {
|
||||
|
||||
void Detach();
|
||||
|
||||
WebKit::WebFrame* web_frame() const { return frame_; }
|
||||
blink::WebFrame* web_frame() const { return frame_; }
|
||||
|
||||
protected:
|
||||
CefBrowserImpl* browser_;
|
||||
WebKit::WebFrame* frame_;
|
||||
blink::WebFrame* frame_;
|
||||
int64 frame_id_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefFrameImpl);
|
||||
|
@@ -46,20 +46,20 @@ void CefRenderProcessObserver::OnModifyCrossOriginWhitelistEntry(
|
||||
const Cef_CrossOriginWhiteListEntry_Params& params) {
|
||||
GURL gurl = GURL(params.source_origin);
|
||||
if (add) {
|
||||
WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry(
|
||||
blink::WebSecurityPolicy::addOriginAccessWhitelistEntry(
|
||||
gurl,
|
||||
WebKit::WebString::fromUTF8(params.target_protocol),
|
||||
WebKit::WebString::fromUTF8(params.target_domain),
|
||||
blink::WebString::fromUTF8(params.target_protocol),
|
||||
blink::WebString::fromUTF8(params.target_domain),
|
||||
params.allow_target_subdomains);
|
||||
} else {
|
||||
WebKit::WebSecurityPolicy::removeOriginAccessWhitelistEntry(
|
||||
blink::WebSecurityPolicy::removeOriginAccessWhitelistEntry(
|
||||
gurl,
|
||||
WebKit::WebString::fromUTF8(params.target_protocol),
|
||||
WebKit::WebString::fromUTF8(params.target_domain),
|
||||
blink::WebString::fromUTF8(params.target_protocol),
|
||||
blink::WebString::fromUTF8(params.target_domain),
|
||||
params.allow_target_subdomains);
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderProcessObserver::OnClearCrossOriginWhitelist() {
|
||||
WebKit::WebSecurityPolicy::resetOriginAccessWhitelists();
|
||||
blink::WebSecurityPolicy::resetOriginAccessWhitelists();
|
||||
}
|
||||
|
@@ -17,23 +17,23 @@
|
||||
#include "third_party/WebKit/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
||||
|
||||
using WebKit::WebString;
|
||||
using WebKit::WebURL;
|
||||
using WebKit::WebURLError;
|
||||
using WebKit::WebURLLoader;
|
||||
using WebKit::WebURLRequest;
|
||||
using WebKit::WebURLResponse;
|
||||
using blink::WebString;
|
||||
using blink::WebURL;
|
||||
using blink::WebURLError;
|
||||
using blink::WebURLLoader;
|
||||
using blink::WebURLRequest;
|
||||
using blink::WebURLResponse;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class CefWebURLLoaderClient : public WebKit::WebURLLoaderClient {
|
||||
class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
|
||||
public:
|
||||
CefWebURLLoaderClient(CefRenderURLRequest::Context* context,
|
||||
int request_flags);
|
||||
virtual ~CefWebURLLoaderClient();
|
||||
|
||||
// WebKit::WebURLLoaderClient methods.
|
||||
// blink::WebURLLoaderClient methods.
|
||||
virtual void willSendRequest(
|
||||
WebURLLoader* loader,
|
||||
WebURLRequest& newRequest,
|
||||
@@ -105,7 +105,7 @@ class CefRenderURLRequest::Context
|
||||
if (!url.is_valid())
|
||||
return false;
|
||||
|
||||
loader_.reset(WebKit::Platform::current()->createURLLoader());
|
||||
loader_.reset(blink::Platform::current()->createURLLoader());
|
||||
url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags()));
|
||||
|
||||
WebURLRequest urlRequest;
|
||||
@@ -235,7 +235,7 @@ class CefRenderURLRequest::Context
|
||||
CefURLRequest::Status status_;
|
||||
CefURLRequest::ErrorCode error_code_;
|
||||
CefRefPtr<CefResponse> response_;
|
||||
scoped_ptr<WebKit::WebURLLoader> loader_;
|
||||
scoped_ptr<blink::WebURLLoader> loader_;
|
||||
scoped_ptr<CefWebURLLoaderClient> url_client_;
|
||||
int64 upload_data_size_;
|
||||
bool got_upload_progress_complete_;
|
||||
|
@@ -872,7 +872,7 @@ CefRefPtr<CefBrowser> CefV8ContextImpl::GetBrowser() {
|
||||
if (!CEF_CURRENTLY_ON_RT())
|
||||
return browser;
|
||||
|
||||
WebKit::WebFrame* webframe = GetWebFrame();
|
||||
blink::WebFrame* webframe = GetWebFrame();
|
||||
if (webframe)
|
||||
browser = CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
|
||||
|
||||
@@ -887,7 +887,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
||||
if (!CEF_CURRENTLY_ON_RT())
|
||||
return frame;
|
||||
|
||||
WebKit::WebFrame* webframe = GetWebFrame();
|
||||
blink::WebFrame* webframe = GetWebFrame();
|
||||
if (webframe) {
|
||||
CefRefPtr<CefBrowserImpl> browser =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
|
||||
@@ -989,11 +989,11 @@ v8::Handle<v8::Context> CefV8ContextImpl::GetV8Context() {
|
||||
return handle_->GetNewV8Handle();
|
||||
}
|
||||
|
||||
WebKit::WebFrame* CefV8ContextImpl::GetWebFrame() {
|
||||
blink::WebFrame* CefV8ContextImpl::GetWebFrame() {
|
||||
CEF_REQUIRE_RT();
|
||||
v8::HandleScope handle_scope(handle_->isolate());
|
||||
v8::Context::Scope context_scope(GetV8Context());
|
||||
WebKit::WebFrame* frame = WebKit::WebFrame::frameForCurrentContext();
|
||||
blink::WebFrame* frame = blink::WebFrame::frameForCurrentContext();
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
class CefTrackNode;
|
||||
class GURL;
|
||||
|
||||
namespace WebKit {
|
||||
namespace blink {
|
||||
class WebFrame;
|
||||
};
|
||||
|
||||
@@ -175,7 +175,7 @@ class CefV8ContextImpl : public CefV8Context {
|
||||
CefRefPtr<CefV8Exception>& exception) OVERRIDE;
|
||||
|
||||
v8::Handle<v8::Context> GetV8Context();
|
||||
WebKit::WebFrame* GetWebFrame();
|
||||
blink::WebFrame* GetWebFrame();
|
||||
|
||||
protected:
|
||||
typedef CefV8Handle<v8::Context> Handle;
|
||||
|
@@ -37,57 +37,57 @@ MSVC_POP_WARNING();
|
||||
|
||||
namespace webkit_glue {
|
||||
|
||||
bool CanGoBack(WebKit::WebView* view) {
|
||||
bool CanGoBack(blink::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
return (impl->client()->historyBackListCount() > 0);
|
||||
}
|
||||
|
||||
bool CanGoForward(WebKit::WebView* view) {
|
||||
bool CanGoForward(blink::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
return (impl->client()->historyForwardListCount() > 0);
|
||||
}
|
||||
|
||||
void GoBack(WebKit::WebView* view) {
|
||||
void GoBack(blink::WebView* view) {
|
||||
if (!view)
|
||||
return;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
if (impl->client()->historyBackListCount() > 0)
|
||||
impl->client()->navigateBackForwardSoon(-1);
|
||||
}
|
||||
|
||||
void GoForward(WebKit::WebView* view) {
|
||||
void GoForward(blink::WebView* view) {
|
||||
if (!view)
|
||||
return;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
if (impl->client()->historyForwardListCount() > 0)
|
||||
impl->client()->navigateBackForwardSoon(1);
|
||||
}
|
||||
|
||||
v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame) {
|
||||
WebKit::WebFrameImpl* impl = static_cast<WebKit::WebFrameImpl*>(frame);
|
||||
v8::Isolate* GetV8Isolate(blink::WebFrame* frame) {
|
||||
blink::WebFrameImpl* impl = static_cast<blink::WebFrameImpl*>(frame);
|
||||
return WebCore::toIsolate(impl->frame());
|
||||
}
|
||||
|
||||
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {
|
||||
WebKit::WebFrameImpl* impl = static_cast<WebKit::WebFrameImpl*>(frame);
|
||||
v8::Handle<v8::Context> GetV8Context(blink::WebFrame* frame) {
|
||||
blink::WebFrameImpl* impl = static_cast<blink::WebFrameImpl*>(frame);
|
||||
return WebCore::ScriptController::mainWorldContext(impl->frame());
|
||||
}
|
||||
|
||||
std::string DumpDocumentText(WebKit::WebFrame* frame) {
|
||||
std::string DumpDocumentText(blink::WebFrame* frame) {
|
||||
// We use the document element's text instead of the body text here because
|
||||
// not all documents have a body, such as XML documents.
|
||||
WebKit::WebElement document_element = frame->document().documentElement();
|
||||
blink::WebElement document_element = frame->document().documentElement();
|
||||
if (document_element.isNull())
|
||||
return std::string();
|
||||
|
||||
return document_element.innerText().utf8();
|
||||
}
|
||||
|
||||
bool SetNodeValue(WebKit::WebNode& node, const WebKit::WebString& value) {
|
||||
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value) {
|
||||
WebCore::Node* web_node = node.unwrap<WebCore::Node>();
|
||||
web_node->setNodeValue(value);
|
||||
return true;
|
||||
|
@@ -14,7 +14,7 @@ template <class T> class Handle;
|
||||
class Isolate;
|
||||
}
|
||||
|
||||
namespace WebKit {
|
||||
namespace blink {
|
||||
class WebFrame;
|
||||
class WebNode;
|
||||
class WebString;
|
||||
@@ -23,21 +23,21 @@ class WebView;
|
||||
|
||||
namespace webkit_glue {
|
||||
|
||||
bool CanGoBack(WebKit::WebView* view);
|
||||
bool CanGoForward(WebKit::WebView* view);
|
||||
void GoBack(WebKit::WebView* view);
|
||||
void GoForward(WebKit::WebView* view);
|
||||
bool CanGoBack(blink::WebView* view);
|
||||
bool CanGoForward(blink::WebView* view);
|
||||
void GoBack(blink::WebView* view);
|
||||
void GoForward(blink::WebView* view);
|
||||
|
||||
// Retrieve the V8 isolate associated with the frame.
|
||||
v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame);
|
||||
v8::Isolate* GetV8Isolate(blink::WebFrame* frame);
|
||||
|
||||
// Retrieve the V8 context associated with the frame.
|
||||
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);
|
||||
v8::Handle<v8::Context> GetV8Context(blink::WebFrame* frame);
|
||||
|
||||
// Returns the text of the document element.
|
||||
std::string DumpDocumentText(WebKit::WebFrame* frame);
|
||||
std::string DumpDocumentText(blink::WebFrame* frame);
|
||||
|
||||
bool SetNodeValue(WebKit::WebNode& node, const WebKit::WebString& value);
|
||||
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value);
|
||||
|
||||
} // webkit_glue
|
||||
|
||||
|
Reference in New Issue
Block a user