Commit b216f427 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Add component build support (issue #1617)

parent c0801879
...@@ -145,10 +145,6 @@ if (is_clang) { ...@@ -145,10 +145,6 @@ if (is_clang) {
assert(!clang_use_chrome_plugins) assert(!clang_use_chrome_plugins)
} }
# CEF does not currently support component builds. See
# https://bitbucket.org/chromiumembedded/cef/issues/1617
assert(!is_component_build)
if (is_mac) { if (is_mac) {
# Always generate dSYM files. The make_distrib script will fail if # Always generate dSYM files. The make_distrib script will fail if
# enable_dsyms=true is not explicitly set when is_official_build=false. # enable_dsyms=true is not explicitly set when is_official_build=false.
...@@ -244,6 +240,84 @@ config("libcef_static_config") { ...@@ -244,6 +240,84 @@ config("libcef_static_config") {
] ]
} }
# Target for building code that accesses Blink internals. Included from the
# //third_party/WebKit/Source/web target.
source_set("webkit_set") {
sources = [
"libcef/renderer/webkit_glue.cc",
"libcef/renderer/webkit_glue.h",
]
configs += [
":libcef_static_config",
"//build/config:precompiled_headers",
# Blink-internal include paths.
"//third_party/WebKit/Source/core:core_include_dirs",
]
include_dirs = [
# Blink code uses paths relative to these directories. We need them because
# we include Blink headers.
"//third_party/WebKit",
"//third_party/WebKit/public/platform",
"//third_party/WebKit/public/web",
"//third_party/WebKit/Source",
"$root_gen_dir/blink",
"$root_gen_dir/third_party/WebKit",
]
defines = [
# Blink-internal defines.
"BLINK_IMPLEMENTATION=1",
"BLINK_WEB_IMPLEMENTATION=1",
"INSIDE_BLINK",
]
deps = [
"//skia",
"//third_party/icu",
"//v8",
]
}
if (is_win) {
# Target for building code that accesses chrome_elf internals. Included from
# the //chrome_elf:crash target. Defined as a static_library instead of a
# source_set because (a) the source files don't export any symbols and (b)
# *_switches.cc duplication otherwise causes linker errors.
static_library("chrome_elf_set") {
sources = [
"libcef/common/crash_reporter_client.cc",
"libcef/common/crash_reporter_client.h",
# Required for crash_keys::GetChromeCrashKeys.
# Otherwise we need to copy this array into CEF, which would be difficult
# to maintain.
"//chrome/common/crash_keys.cc",
"//chrome/common/chrome_switches.cc",
"//components/flags_ui/flags_ui_switches.cc",
"//content/public/common/content_switches.cc",
]
configs += [
":libcef_static_config",
"//build/config:precompiled_headers",
]
if (is_component_build) {
# Avoid linker errors with content_switches.cc in component build by not
# defining CONTENT_EXPORT.
defines = ["COMPILE_CONTENT_STATICALLY"]
}
deps = [
"//components/crash/core/common", # crash_keys
"//gpu/config:crash_keys",
]
}
}
static_library("libcef_static") { static_library("libcef_static") {
sources = gypi_paths2.includes_common + sources = gypi_paths2.includes_common +
gypi_paths.autogen_cpp_includes + [ gypi_paths.autogen_cpp_includes + [
...@@ -552,6 +626,8 @@ static_library("libcef_static") { ...@@ -552,6 +626,8 @@ static_library("libcef_static") {
"libcef/renderer/plugins/plugin_preroller.h", "libcef/renderer/plugins/plugin_preroller.h",
"libcef/renderer/render_frame_observer.cc", "libcef/renderer/render_frame_observer.cc",
"libcef/renderer/render_frame_observer.h", "libcef/renderer/render_frame_observer.h",
"libcef/renderer/render_frame_util.cc",
"libcef/renderer/render_frame_util.h",
"libcef/renderer/render_message_filter.cc", "libcef/renderer/render_message_filter.cc",
"libcef/renderer/render_message_filter.h", "libcef/renderer/render_message_filter.h",
"libcef/renderer/render_thread_observer.cc", "libcef/renderer/render_thread_observer.cc",
...@@ -561,8 +637,6 @@ static_library("libcef_static") { ...@@ -561,8 +637,6 @@ static_library("libcef_static") {
"libcef/renderer/thread_util.h", "libcef/renderer/thread_util.h",
"libcef/renderer/v8_impl.cc", "libcef/renderer/v8_impl.cc",
"libcef/renderer/v8_impl.h", "libcef/renderer/v8_impl.h",
"libcef/renderer/webkit_glue.cc",
"libcef/renderer/webkit_glue.h",
"libcef/utility/content_utility_client.cc", "libcef/utility/content_utility_client.cc",
"libcef/utility/content_utility_client.h", "libcef/utility/content_utility_client.h",
...@@ -578,9 +652,6 @@ static_library("libcef_static") { ...@@ -578,9 +652,6 @@ static_library("libcef_static") {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning", "//build/config/compiler:no_size_t_to_int_warning",
# Blink-internal include paths.
"//third_party/WebKit/Source/core:core_include_dirs",
] ]
public_configs = [ public_configs = [
...@@ -588,11 +659,6 @@ static_library("libcef_static") { ...@@ -588,11 +659,6 @@ static_library("libcef_static") {
] ]
include_dirs = [ include_dirs = [
# Blink code uses paths relative to these directories. We need them because
# we include Blink headers.
"//third_party/WebKit/public/platform",
"//third_party/WebKit/public/web",
# Crashpad code uses paths relative to this directory. # Crashpad code uses paths relative to this directory.
"//third_party/crashpad/crashpad", "//third_party/crashpad/crashpad",
] ]
...@@ -651,6 +717,7 @@ static_library("libcef_static") { ...@@ -651,6 +717,7 @@ static_library("libcef_static") {
"//components/visitedlink/browser", "//components/visitedlink/browser",
"//components/visitedlink/common", "//components/visitedlink/common",
"//components/visitedlink/renderer", "//components/visitedlink/renderer",
"//components/viz/display_compositor",
"//components/web_cache/renderer", "//components/web_cache/renderer",
"//content/public/app:both", "//content/public/app:both",
"//content/public/browser", "//content/public/browser",
...@@ -680,6 +747,9 @@ static_library("libcef_static") { ...@@ -680,6 +747,9 @@ static_library("libcef_static") {
"//pdf", "//pdf",
"//ppapi/features", "//ppapi/features",
"//printing/features", "//printing/features",
"//services/service_manager/embedder",
"//services/service_manager/public/interfaces",
"//services/service_manager/runner/common",
"//skia", "//skia",
"//storage/browser", "//storage/browser",
"//third_party/brotli:dec", "//third_party/brotli:dec",
...@@ -739,6 +809,14 @@ static_library("libcef_static") { ...@@ -739,6 +809,14 @@ static_library("libcef_static") {
deps += [ deps += [
"//chrome_elf", "//chrome_elf",
] ]
if (is_component_build) {
deps += [ "//content:sandbox_helper_win" ]
}
libs = [
"comctl32.lib",
]
} }
if (is_linux) { if (is_linux) {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "content/browser/devtools/grit/devtools_resources_map.h" #include "content/public/browser/devtools_frontend_host.h"
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
namespace scheme { namespace scheme {
...@@ -32,15 +32,9 @@ class Delegate : public InternalHandlerDelegate { ...@@ -32,15 +32,9 @@ class Delegate : public InternalHandlerDelegate {
if (path.length() > 0) if (path.length() > 0)
path = path.substr(1); path = path.substr(1);
for (size_t i = 0; i < kDevtoolsResourcesSize; ++i) { action->string_piece =
if (base::EqualsCaseInsensitiveASCII(kDevtoolsResources[i].name, content::DevToolsFrontendHost::GetFrontendResource(path);
path.c_str())) { return !action->string_piece.empty();
action->resource_id = kDevtoolsResources[i].value;
return true;
}
}
return false;
} }
}; };
......
...@@ -140,20 +140,23 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory { ...@@ -140,20 +140,23 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
if (action.mime_type.empty()) if (action.mime_type.empty())
action.mime_type = GetMimeType(url.path()); action.mime_type = GetMimeType(url.path());
if (action.resource_id >= 0) { if (action.string_piece.empty() && action.resource_id >= 0) {
base::StringPiece piece = CefContentClient::Get()->GetDataResource( action.string_piece = CefContentClient::Get()->GetDataResource(
action.resource_id, ui::SCALE_FACTOR_NONE); action.resource_id, ui::SCALE_FACTOR_NONE);
if (!piece.empty()) { if (action.string_piece.empty()) {
action.stream = CefStreamReader::CreateForData(
const_cast<char*>(piece.data()), piece.size());
action.stream_size = piece.size();
} else {
NOTREACHED() << "Failed to load internal resource for id: " NOTREACHED() << "Failed to load internal resource for id: "
<< action.resource_id << " URL: " << url.spec().c_str(); << action.resource_id << " URL: " << url.spec().c_str();
return NULL; return NULL;
} }
} }
if (!action.string_piece.empty()) {
action.stream = CefStreamReader::CreateForData(
const_cast<char*>(action.string_piece.data()),
action.string_piece.size());
action.stream_size = action.string_piece.size();
}
if (action.stream.get()) { if (action.stream.get()) {
return new InternalHandler(action.mime_type, action.stream, return new InternalHandler(action.mime_type, action.stream,
action.stream_size); action.stream_size);
......
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
#pragma once #pragma once
#include <string> #include <string>
#include "include/cef_scheme.h" #include "include/cef_scheme.h"
#include "base/strings/string_piece.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace scheme { namespace scheme {
...@@ -28,11 +31,13 @@ class InternalHandlerDelegate { ...@@ -28,11 +31,13 @@ class InternalHandlerDelegate {
CefRefPtr<CefStreamReader> stream; CefRefPtr<CefStreamReader> stream;
int stream_size; int stream_size;
// Option 2: Specify a resource id to load static content. May include an // Option 2: Provide a base::StringPiece for the resource contents.
// optional encoding type. base::StringPiece string_piece;
// Option 3: Specify a resource id to load static content.
int resource_id; int resource_id;
// Option 3: Redirect to the specified URL. // Option 4: Redirect to the specified URL.
GURL redirect_url; GURL redirect_url;
}; };
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "libcef/common/response_manager.h" #include "libcef/common/response_manager.h"
#include "libcef/renderer/content_renderer_client.h" #include "libcef/renderer/content_renderer_client.h"
#include "libcef/renderer/dom_document_impl.h" #include "libcef/renderer/dom_document_impl.h"
#include "libcef/renderer/render_frame_util.h"
#include "libcef/renderer/thread_util.h" #include "libcef/renderer/thread_util.h"
#include "libcef/renderer/webkit_glue.h" #include "libcef/renderer/webkit_glue.h"
...@@ -194,7 +195,7 @@ CefRefPtr<CefFrame> CefBrowserImpl::GetFrame(const CefString& name) { ...@@ -194,7 +195,7 @@ CefRefPtr<CefFrame> CefBrowserImpl::GetFrame(const CefString& name) {
const std::string& searchname = name; const std::string& searchname = name;
for (WebFrame* cur_frame = web_view->MainFrame(); cur_frame; for (WebFrame* cur_frame = web_view->MainFrame(); cur_frame;
cur_frame = cur_frame->TraverseNext()) { cur_frame = cur_frame->TraverseNext()) {
if (webkit_glue::GetUniqueName(cur_frame) == searchname) { if (render_frame_util::GetUniqueName(cur_frame) == searchname) {
frame = cur_frame; frame = cur_frame;
break; break;
} }
...@@ -231,7 +232,7 @@ void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) { ...@@ -231,7 +232,7 @@ void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
if (render_view()->GetWebView()) { if (render_view()->GetWebView()) {
for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame; for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame;
frame = frame->TraverseNext()) { frame = frame->TraverseNext()) {
identifiers.push_back(webkit_glue::GetIdentifier(frame)); identifiers.push_back(render_frame_util::GetIdentifier(frame));
} }
} }
} }
...@@ -245,7 +246,7 @@ void CefBrowserImpl::GetFrameNames(std::vector<CefString>& names) { ...@@ -245,7 +246,7 @@ void CefBrowserImpl::GetFrameNames(std::vector<CefString>& names) {
if (render_view()->GetWebView()) { if (render_view()->GetWebView()) {
for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame; for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame;
frame = frame->TraverseNext()) { frame = frame->TraverseNext()) {
names.push_back(webkit_glue::GetUniqueName(frame)); names.push_back(render_frame_util::GetUniqueName(frame));
} }
} }
} }
...@@ -314,7 +315,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process, ...@@ -314,7 +315,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process,
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl( CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
blink::WebFrame* frame) { blink::WebFrame* frame) {
DCHECK(frame); DCHECK(frame);
int64_t frame_id = webkit_glue::GetIdentifier(frame); int64_t frame_id = render_frame_util::GetIdentifier(frame);
// Frames are re-used between page loads. Only add the frame to the map once. // Frames are re-used between page loads. Only add the frame to the map once.
FrameMap::const_iterator it = frames_.find(frame_id); FrameMap::const_iterator it = frames_.find(frame_id);
...@@ -324,11 +325,12 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl( ...@@ -324,11 +325,12 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame)); CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame));
frames_.insert(std::make_pair(frame_id, framePtr)); frames_.insert(std::make_pair(frame_id, framePtr));
const int64_t parent_id = frame->Parent() == NULL const int64_t parent_id =
? webkit_glue::kInvalidFrameId frame->Parent() == NULL
: webkit_glue::GetIdentifier(frame->Parent()); ? webkit_glue::kInvalidFrameId
: render_frame_util::GetIdentifier(frame->Parent());
const base::string16& name = const base::string16& name =
base::UTF8ToUTF16(webkit_glue::GetUniqueName(frame)); base::UTF8ToUTF16(render_frame_util::GetUniqueName(frame));
// Notify the browser that the frame has been identified. // Notify the browser that the frame has been identified.
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name)); Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));
...@@ -352,7 +354,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64_t frame_id) { ...@@ -352,7 +354,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64_t frame_id) {
// Check if the frame exists but we don't know about it yet. // Check if the frame exists but we don't know about it yet.
for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame; for (WebFrame* frame = render_view()->GetWebView()->MainFrame(); frame;
frame = frame->TraverseNext()) { frame = frame->TraverseNext()) {
if (webkit_glue::GetIdentifier(frame) == frame_id) if (render_frame_util::GetIdentifier(frame) == frame_id)
return GetWebFrameImpl(frame); return GetWebFrameImpl(frame);
} }
} }
...@@ -411,9 +413,10 @@ void CefBrowserImpl::DidStopLoading() { ...@@ -411,9 +413,10 @@ void CefBrowserImpl::DidStopLoading() {
void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) { void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) {
blink::WebDataSource* ds = frame->DataSource(); blink::WebDataSource* ds = frame->DataSource();
Send(new CefHostMsg_DidFinishLoad( Send(new CefHostMsg_DidFinishLoad(routing_id(),
routing_id(), webkit_glue::GetIdentifier(frame), ds->GetRequest().Url(), render_frame_util::GetIdentifier(frame),
!frame->Parent(), ds->GetResponse().HttpStatusCode())); ds->GetRequest().Url(), !frame->Parent(),
ds->GetResponse().HttpStatusCode()));
OnLoadEnd(frame); OnLoadEnd(frame);
} }
...@@ -433,7 +436,7 @@ void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebLocalFrame* frame, ...@@ -433,7 +436,7 @@ void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebLocalFrame* frame,
} }
void CefBrowserImpl::FrameDetached(WebFrame* frame) { void CefBrowserImpl::FrameDetached(WebFrame* frame) {
int64_t frame_id = webkit_glue::GetIdentifier(frame); int64_t frame_id = render_frame_util::GetIdentifier(frame);
if (!frames_.empty()) { if (!frames_.empty()) {
// Remove the frame from the map. // Remove the frame from the map.
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "libcef/common/request_impl.h" #include "libcef/common/request_impl.h"
#include "libcef/renderer/browser_impl.h" #include "libcef/renderer/browser_impl.h"
#include "libcef/renderer/dom_document_impl.h" #include "libcef/renderer/dom_document_impl.h"
#include "libcef/renderer/render_frame_util.h"
#include "libcef/renderer/thread_util.h" #include "libcef/renderer/thread_util.h"
#include "libcef/renderer/v8_impl.h" #include "libcef/renderer/v8_impl.h"
#include "libcef/renderer/webkit_glue.h" #include "libcef/renderer/webkit_glue.h"
...@@ -37,7 +38,7 @@ using blink::WebString; ...@@ -37,7 +38,7 @@ using blink::WebString;
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, blink::WebFrame* frame) CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, blink::WebFrame* frame)
: browser_(browser), : browser_(browser),
frame_(frame), frame_(frame),
frame_id_(webkit_glue::GetIdentifier(frame)) {} frame_id_(render_frame_util::GetIdentifier(frame)) {}
CefFrameImpl::~CefFrameImpl() {} CefFrameImpl::~CefFrameImpl() {}
...@@ -189,7 +190,7 @@ CefString CefFrameImpl::GetName() { ...@@ -189,7 +190,7 @@ CefString CefFrameImpl::GetName() {
CEF_REQUIRE_RT_RETURN(name); CEF_REQUIRE_RT_RETURN(name);
if (frame_) if (frame_)
name = webkit_glue::GetUniqueName(frame_); name = render_frame_util::GetUniqueName(frame_);
return name; return name;
} }
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "platform/ScriptForbiddenScope.h"
MSVC_POP_WARNING();
// Enable deprecation warnings for MSVC. See http://crbug.com/585142. // Enable deprecation warnings for MSVC. See http://crbug.com/585142.
#if defined(OS_WIN) #if defined(OS_WIN)
#pragma warning(push) #pragma warning(push)
...@@ -20,6 +16,7 @@ MSVC_POP_WARNING(); ...@@ -20,6 +16,7 @@ MSVC_POP_WARNING();
#include "libcef/common/content_client.h" #include "libcef/common/content_client.h"
#include "libcef/renderer/content_renderer_client.h" #include "libcef/renderer/content_renderer_client.h"
#include "libcef/renderer/v8_impl.h" #include "libcef/renderer/v8_impl.h"
#include "libcef/renderer/webkit_glue.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebKit.h"
...@@ -125,7 +122,7 @@ void CefRenderFrameObserver::WillReleaseScriptContext( ...@@ -125,7 +122,7 @@ void CefRenderFrameObserver::WillReleaseScriptContext(
// The released context should not be used for script execution. // The released context should not be used for script execution.
// Depending on how the context is released this may or may not already // Depending on how the context is released this may or may not already
// be set. // be set.
blink::ScriptForbiddenScope forbidScript; webkit_glue::CefScriptForbiddenScope forbidScript;
CefRefPtr<CefV8Context> contextPtr( CefRefPtr<CefV8Context> contextPtr(
new CefV8ContextImpl(isolate, context)); new CefV8ContextImpl(isolate, context));
......
// 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.
#include "libcef/renderer/render_frame_util.h"
#include "libcef/renderer/webkit_glue.h"
#include "base/logging.h"
#include "content/renderer/render_frame_impl.h"
namespace render_frame_util {
int64_t GetIdentifier(blink::WebFrame* frame) {
// Each WebFrame will have an associated RenderFrame. The RenderFrame
// routing IDs are unique within a given renderer process.
content::RenderFrame* render_frame =
content::RenderFrame::FromWebFrame(frame);
DCHECK(render_frame);
if (render_frame)
return render_frame->GetRoutingID();
return webkit_glue::kInvalidFrameId;
}
std::string GetUniqueName(blink::WebFrame* frame) {
content::RenderFrameImpl* render_frame =
content::RenderFrameImpl::FromWebFrame(frame);
DCHECK(render_frame);
if (render_frame)
return render_frame->unique_name();
return std::string();
}
} // render_frame_util
// 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_RENDER_FRAME_UTIL_H_
#define CEF_LIBCEF_RENDERER_RENDER_FRAME_UTIL_H_
#include <stdint.h>
#include <string>
namespace blink {
class WebFrame;
}
namespace render_frame_util {
int64_t GetIdentifier(blink::WebFrame* frame);
std::string GetUniqueName(blink::WebFrame* frame);
} // render_frame_util
#endif // CEF_LIBCEF_RENDERER_RENDER_FRAME_UTIL_H_
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "libcef/common/task_runner_impl.h" #include "libcef/common/task_runner_impl.h"
#include "libcef/common/tracker.h" #include "libcef/common/tracker.h"
#include "libcef/renderer/browser_impl.h" #include "libcef/renderer/browser_impl.h"
#include "libcef/renderer/render_frame_util.h"
#include "libcef/renderer/thread_util.h" #include "libcef/renderer/thread_util.h"
#include "libcef/renderer/webkit_glue.h" #include "libcef/renderer/webkit_glue.h"
...@@ -897,7 +898,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() { ...@@ -897,7 +898,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
if (webframe) { if (webframe) {
CefRefPtr<CefBrowserImpl> browser = CefRefPtr<CefBrowserImpl> browser =
CefBrowserImpl::GetBrowserForMainFrame(webframe->Top()); CefBrowserImpl::GetBrowserForMainFrame(webframe->Top());
frame = browser->GetFrame(webkit_glue::GetIdentifier(webframe)); frame = browser->GetFrame(render_frame_util::GetIdentifier(webframe));
} }
return frame; return frame;
......
...@@ -3,16 +3,6 @@ ...@@ -3,16 +3,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// MSVC++ requires this to be set before any other includes to get M_PI.
// Otherwise there will be compile errors in wtf/MathExtras.h.
#define _USE_MATH_DEFINES
// Defines required to access Blink internals (unwrap WebNode).
#undef BLINK_IMPLEMENTATION
#define BLINK_IMPLEMENTATION 1
#undef INSIDE_BLINK
#define INSIDE_BLINK 1
#include "libcef/renderer/webkit_glue.h" #include "libcef/renderer/webkit_glue.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
...@@ -32,6 +22,7 @@ MSVC_PUSH_WARNING_LEVEL(0); ...@@ -32,6 +22,7 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h" #include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
#include "third_party/WebKit/Source/core/frame/LocalFrame.h" #include "third_party/WebKit/Source/core/frame/LocalFrame.h"
#include "third_party/WebKit/Source/core/frame/Settings.h" #include "third_party/WebKit/Source/core/frame/Settings.h"
#include "third_party/WebKit/Source/platform/ScriptForbiddenScope.h"
#include "third_party/WebKit/Source/platform/bindings/V8Binding.h" #include "third_party/WebKit/Source/platform/bindings/V8Binding.h"
#include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h" #include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h"
#include "third_party/WebKit/Source/web/WebLocalFrameImpl.h"