mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision c78c0ad7 (#363565)
This commit is contained in:
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '304f01a1e1f7ebeb7d637f847469c90ba008b86d',
|
||||
'chromium_checkout': 'c78c0ad7cca1b37761b488e9499d619b21c8016d',
|
||||
}
|
||||
|
5
cef.gyp
5
cef.gyp
@ -871,6 +871,9 @@
|
||||
# Generate chrome/common/safe_browsing/csd.pb.h required by
|
||||
# zip_analyzer_results.h via chrome_utility_messages.h
|
||||
'<(DEPTH)/chrome/chrome.gyp:safe_browsing_proto',
|
||||
# Generate chrome/common/features.h required by Chrome code that uses
|
||||
# the BUILDFLAG() macro.
|
||||
'<(DEPTH)/chrome/chrome_features.gyp:chrome_common_features',
|
||||
# Generate chrome/common/chrome_version.h required by
|
||||
# chrome/common/chrome_contants.cc
|
||||
'<(DEPTH)/chrome/common_constants.gyp:version_header',
|
||||
@ -878,7 +881,7 @@
|
||||
'<(DEPTH)/components/components.gyp:component_updater',
|
||||
'<(DEPTH)/components/components.gyp:content_settings_core_browser',
|
||||
'<(DEPTH)/components/components.gyp:content_settings_core_common',
|
||||
'<(DEPTH)/components/components.gyp:crash_component_breakpad_mac_to_be_deleted',
|
||||
'<(DEPTH)/components/components.gyp:crash_component_breakpad_to_be_deleted',
|
||||
'<(DEPTH)/components/components.gyp:crx_file',
|
||||
'<(DEPTH)/components/components.gyp:data_use_measurement_core',
|
||||
'<(DEPTH)/components/components.gyp:devtools_discovery',
|
||||
|
@ -364,6 +364,7 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
|
||||
url_request_getter_ = new CefURLRequestContextGetterImpl(
|
||||
settings_,
|
||||
GetPrefs(),
|
||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
|
||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
|
||||
protocol_handlers,
|
||||
|
@ -209,7 +209,7 @@ class CefBrowserPlatformDelegate {
|
||||
|
||||
protected:
|
||||
// Allow deletion via scoped_ptr only.
|
||||
friend struct base::DefaultDeleter<CefBrowserPlatformDelegate>;
|
||||
friend std::default_delete<CefBrowserPlatformDelegate>;
|
||||
|
||||
CefBrowserPlatformDelegate();
|
||||
virtual ~CefBrowserPlatformDelegate();
|
||||
|
@ -203,7 +203,8 @@ StatusTray* ChromeBrowserProcessStub::status_tray() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SafeBrowsingService* ChromeBrowserProcessStub::safe_browsing_service() {
|
||||
safe_browsing::SafeBrowsingService*
|
||||
ChromeBrowserProcessStub::safe_browsing_service() {
|
||||
NOTIMPLEMENTED();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
void set_background_mode_manager_for_test(
|
||||
scoped_ptr<BackgroundModeManager> manager) override;
|
||||
StatusTray* status_tray() override;
|
||||
SafeBrowsingService* safe_browsing_service() override;
|
||||
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
||||
safe_browsing::ClientSideDetectionService*
|
||||
safe_browsing_detection_service() override;
|
||||
|
||||
|
@ -594,7 +594,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kDisableScrollBounce,
|
||||
switches::kDisableSpellChecking,
|
||||
switches::kEnableSpeechInput,
|
||||
switches::kEnableSpellingAutoCorrect,
|
||||
switches::kEnableSystemFlash,
|
||||
switches::kPpapiFlashArgs,
|
||||
switches::kPpapiFlashPath,
|
||||
@ -677,8 +676,7 @@ content::SpeechRecognitionManagerDelegate*
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::AllowCertificateError(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
content::WebContents* web_contents,
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
@ -699,8 +697,7 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForFrame(render_process_id,
|
||||
render_frame_id);
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (!browser.get())
|
||||
return;
|
||||
CefRefPtr<CefClient> client = browser->GetClient();
|
||||
@ -846,7 +843,8 @@ CefContentBrowserClient::CreateThrottlesForNavigation(
|
||||
new navigation_interception::InterceptNavigationThrottle(
|
||||
navigation_handle,
|
||||
base::Bind(&NavigationOnUIThread, is_main_frame, frame_id,
|
||||
parent_frame_id));
|
||||
parent_frame_id),
|
||||
true);
|
||||
throttles.push_back(throttle);
|
||||
|
||||
return throttles.Pass();
|
||||
@ -882,18 +880,14 @@ const wchar_t* CefContentBrowserClient::GetResourceDllName() {
|
||||
return file_path;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::PreSpawnRenderer(
|
||||
sandbox::TargetPolicy* policy,
|
||||
bool* success) {
|
||||
bool CefContentBrowserClient::PreSpawnRenderer(
|
||||
sandbox::TargetPolicy* policy) {
|
||||
// Flash requires this permission to play video files.
|
||||
sandbox::ResultCode result = policy->AddRule(
|
||||
sandbox::TargetPolicy::SUBSYS_HANDLES,
|
||||
sandbox::TargetPolicy::HANDLES_DUP_ANY,
|
||||
L"File");
|
||||
if (result != sandbox::SBOX_ALL_OK) {
|
||||
*success = false;
|
||||
return;
|
||||
}
|
||||
return result == sandbox::SBOX_ALL_OK;
|
||||
}
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
|
@ -65,8 +65,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
content::SpeechRecognitionManagerDelegate*
|
||||
CreateSpeechRecognitionManagerDelegate() override;
|
||||
void AllowCertificateError(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
content::WebContents* web_contents,
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
@ -117,7 +116,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
const wchar_t* GetResourceDllName() override;
|
||||
void PreSpawnRenderer(sandbox::TargetPolicy* policy, bool* success) override;
|
||||
bool PreSpawnRenderer(sandbox::TargetPolicy* policy) override;
|
||||
#endif
|
||||
|
||||
// Perform browser process registration for the custom scheme.
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/net/network_delegate.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/common/time_util.h"
|
||||
|
||||
@ -556,7 +557,8 @@ void CefCookieManagerImpl::SetCookieInternal(
|
||||
cookie.secure ? true : false,
|
||||
cookie.httponly ? true : false,
|
||||
false, // First-party only.
|
||||
false, // Enforces prefixes.
|
||||
CefNetworkDelegate::AreExperimentalCookieFeaturesEnabled(),
|
||||
CefNetworkDelegate::AreStrictSecureCookiesEnabled(),
|
||||
net::COOKIE_PRIORITY_DEFAULT,
|
||||
base::Bind(SetCookieCallbackImpl, callback));
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class CefFileDialogRunner {
|
||||
|
||||
protected:
|
||||
// Allow deletion via scoped_ptr only.
|
||||
friend struct base::DefaultDeleter<CefFileDialogRunner>;
|
||||
friend std::default_delete<CefFileDialogRunner>;
|
||||
|
||||
CefFileDialogRunner() {}
|
||||
virtual ~CefFileDialogRunner() {}
|
||||
|
@ -90,7 +90,7 @@ class CefFrameHostImpl : public CefFrame {
|
||||
int64 parent_frame_id_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefFrameHostImpl);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CefFrameHostImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefFrameHostImpl);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_FRAME_HOST_IMPL_H_
|
||||
|
@ -34,7 +34,7 @@ class CefJavaScriptDialogRunner {
|
||||
|
||||
protected:
|
||||
// Allow deletion via scoped_ptr only.
|
||||
friend struct base::DefaultDeleter<CefJavaScriptDialogRunner>;
|
||||
friend std::default_delete<CefJavaScriptDialogRunner>;
|
||||
|
||||
CefJavaScriptDialogRunner() {}
|
||||
virtual ~CefJavaScriptDialogRunner() {}
|
||||
|
@ -29,7 +29,7 @@ class CefMenuRunner {
|
||||
|
||||
protected:
|
||||
// Allow deletion via scoped_ptr only.
|
||||
friend struct base::DefaultDeleter<CefMenuRunner>;
|
||||
friend std::default_delete<CefMenuRunner>;
|
||||
|
||||
CefMenuRunner() {}
|
||||
virtual ~CefMenuRunner() {}
|
||||
|
@ -139,7 +139,8 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
|
||||
// Likewise, the X server needs to know this window's pid so it knows which
|
||||
// program to kill if the window hangs.
|
||||
// XChangeProperty() expects "pid" to be long.
|
||||
COMPILE_ASSERT(sizeof(long) >= sizeof(pid_t), pid_t_bigger_than_long);
|
||||
static_assert(sizeof(long) >= sizeof(pid_t),
|
||||
"pid_t should not be larger than long");
|
||||
long pid = getpid();
|
||||
XChangeProperty(xdisplay_,
|
||||
xwindow_,
|
||||
|
@ -14,6 +14,10 @@
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/response_impl.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/metrics/field_trial.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "net/filter/filter.h"
|
||||
#include "net/http/http_util.h"
|
||||
@ -225,6 +229,27 @@ CefNetworkDelegate::CefNetworkDelegate() {
|
||||
CefNetworkDelegate::~CefNetworkDelegate() {
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefNetworkDelegate::AreExperimentalCookieFeaturesEnabled() {
|
||||
static bool initialized = false;
|
||||
static bool enabled = false;
|
||||
if (!initialized) {
|
||||
enabled = base::CommandLine::ForCurrentProcess()->
|
||||
HasSwitch(switches::kEnableExperimentalWebPlatformFeatures);
|
||||
initialized = true;
|
||||
}
|
||||
return enabled;
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefNetworkDelegate::AreStrictSecureCookiesEnabled() {
|
||||
const std::string enforce_strict_secure_group =
|
||||
base::FieldTrialList::FindFullName("StrictSecureCookies");
|
||||
return AreExperimentalCookieFeaturesEnabled() ||
|
||||
base::StartsWith(enforce_strict_secure_group, "Enabled",
|
||||
base::CompareCase::INSENSITIVE_ASCII);
|
||||
}
|
||||
|
||||
int CefNetworkDelegate::OnBeforeURLRequest(
|
||||
net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
@ -387,6 +412,14 @@ bool CefNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const {
|
||||
return AreExperimentalCookieFeaturesEnabled();
|
||||
}
|
||||
|
||||
bool CefNetworkDelegate::OnAreStrictSecureCookiesEnabled() const {
|
||||
return AreStrictSecureCookiesEnabled();
|
||||
}
|
||||
|
||||
net::Filter* CefNetworkDelegate::SetupFilter(net::URLRequest* request,
|
||||
net::Filter* filter_list) {
|
||||
CefRefPtr<CefResponseFilter> cef_filter;
|
||||
|
@ -15,6 +15,11 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
|
||||
CefNetworkDelegate();
|
||||
~CefNetworkDelegate() override;
|
||||
|
||||
// Match the logic from ChromeNetworkDelegate and
|
||||
// RenderFrameMessageFilter::OnSetCookie.
|
||||
static bool AreExperimentalCookieFeaturesEnabled();
|
||||
static bool AreStrictSecureCookiesEnabled();
|
||||
|
||||
private:
|
||||
// net::NetworkDelegate methods.
|
||||
int OnBeforeURLRequest(net::URLRequest* request,
|
||||
@ -28,6 +33,8 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
|
||||
void OnCompleted(net::URLRequest* request, bool started) override;
|
||||
bool OnCanAccessFile(const net::URLRequest& request,
|
||||
const base::FilePath& path) const override;
|
||||
bool OnAreExperimentalCookieFeaturesEnabled() const override;
|
||||
bool OnAreStrictSecureCookiesEnabled() const override;
|
||||
net::Filter* SetupFilter(net::URLRequest* request,
|
||||
net::Filter* filter_list) override;
|
||||
|
||||
|
@ -106,25 +106,23 @@ class CefResourceRequestJobCallback : public CefCallback {
|
||||
if (job_->has_response_started() &&
|
||||
job_->GetStatus().is_io_pending()) {
|
||||
// Read the bytes. They should be available but, if not, wait again.
|
||||
int bytes_read = 0;
|
||||
if (job_->ReadRawData(dest_, dest_size_, &bytes_read)) {
|
||||
int bytes_read = job_->ReadRawData(dest_, dest_size_);
|
||||
if (bytes_read == net::ERR_IO_PENDING) {
|
||||
// Still pending, nothing to do...
|
||||
} else if (bytes_read >= 0) {
|
||||
// Must clear the members here because they may be reset as a result
|
||||
// of calling NotifyReadComplete.
|
||||
// of calling ReadRawDataComplete.
|
||||
dest_size_ = 0;
|
||||
dest_ = NULL;
|
||||
|
||||
// Clear the IO_PENDING status.
|
||||
job_->SetStatus(URLRequestStatus());
|
||||
|
||||
// Notify about the available bytes. If bytes_read > 0 then
|
||||
// ReadRawData may be called from URLRequest::Read. If bytes_read == 0
|
||||
// then Kill will be called from the URLRequest destructor.
|
||||
job_->NotifyReadComplete(bytes_read);
|
||||
} else if (!job_->GetStatus().is_io_pending()) {
|
||||
job_->ReadRawDataComplete(bytes_read);
|
||||
} else {
|
||||
// Failed due to an error.
|
||||
NOTREACHED() <<
|
||||
"ReadRawData returned false without setting IO as pending";
|
||||
job_->NotifyDone(URLRequestStatus());
|
||||
NOTREACHED() << "ReadRawData returned error " << bytes_read;
|
||||
job_->ReadRawDataComplete(bytes_read);
|
||||
Detach();
|
||||
}
|
||||
}
|
||||
@ -220,28 +218,19 @@ void CefResourceRequestJob::Kill() {
|
||||
|
||||
// This method will be called by URLRequestJob::Read and our callback.
|
||||
// It can indicate the following states:
|
||||
// 1. If the request is complete set |bytes_read| == 0 and return true. The
|
||||
// caller is then responsible for calling NotifyReadComplete. ReadRawData
|
||||
// should not be called again.
|
||||
// 2. If data is available synchronously set |bytes_read| > 0 and return true.
|
||||
// The caller is then responsible for calling NotifyReadComplete. ReadRawData
|
||||
// may be called again by URLRequestJob::Read.
|
||||
// 3. If data is not available now but may be available asynchronously set
|
||||
// status to IO_PENDING and return false. When executed asynchronously the
|
||||
// callback will again call ReadRawData. If data is returned at that time the
|
||||
// callback will clear the status and call NotifyReadComplete.
|
||||
bool CefResourceRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
|
||||
int* bytes_read) {
|
||||
// 1. Return ERR_IO_PENDING, and call ReadRawDataComplete when the read
|
||||
// completes in any way, or
|
||||
// 2. Return a count of bytes read >= 0, indicating synchronous success, or
|
||||
// 3. Return another error code < 0, indicating synchronous failure.
|
||||
int CefResourceRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
|
||||
CEF_REQUIRE_IOT();
|
||||
|
||||
DCHECK_NE(dest_size, 0);
|
||||
DCHECK(bytes_read);
|
||||
|
||||
if (remaining_bytes_ == 0) {
|
||||
// No more data to read.
|
||||
*bytes_read = 0;
|
||||
DoneWithRequest();
|
||||
return true;
|
||||
return 0;
|
||||
} else if (remaining_bytes_ > 0 && remaining_bytes_ < dest_size) {
|
||||
// The handler knows the content size beforehand.
|
||||
dest_size = static_cast<int>(remaining_bytes_);
|
||||
@ -255,33 +244,31 @@ bool CefResourceRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
|
||||
}
|
||||
|
||||
// Read response data from the handler.
|
||||
bool rv = handler_->ReadResponse(dest->data(), dest_size, *bytes_read,
|
||||
int bytes_read = 0;
|
||||
bool rv = handler_->ReadResponse(dest->data(), dest_size, bytes_read,
|
||||
callback_.get());
|
||||
if (!rv) {
|
||||
// The handler has indicated completion of the request.
|
||||
*bytes_read = 0;
|
||||
DoneWithRequest();
|
||||
return true;
|
||||
} else if (*bytes_read == 0) {
|
||||
return 0;
|
||||
} else if (bytes_read == 0) {
|
||||
// Continue reading asynchronously. May happen multiple times in a row so
|
||||
// only set IO pending the first time.
|
||||
if (!GetStatus().is_io_pending()) {
|
||||
SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
|
||||
// only set destination members the first time.
|
||||
if (!GetStatus().is_io_pending())
|
||||
callback_->SetDestination(dest, dest_size);
|
||||
}
|
||||
return false;
|
||||
} else if (*bytes_read > dest_size) {
|
||||
return net::ERR_IO_PENDING;
|
||||
} else if (bytes_read > dest_size) {
|
||||
// Normalize the return value.
|
||||
*bytes_read = dest_size;
|
||||
bytes_read = dest_size;
|
||||
}
|
||||
|
||||
sent_bytes_ += *bytes_read;
|
||||
sent_bytes_ += bytes_read;
|
||||
|
||||
if (remaining_bytes_ > 0)
|
||||
remaining_bytes_ -= *bytes_read;
|
||||
remaining_bytes_ -= bytes_read;
|
||||
|
||||
// Continue calling this method.
|
||||
return true;
|
||||
return bytes_read;
|
||||
}
|
||||
|
||||
void CefResourceRequestJob::GetResponseInfo(net::HttpResponseInfo* info) {
|
||||
|
@ -33,7 +33,7 @@ class CefResourceRequestJob : public net::URLRequestJob {
|
||||
// net::URLRequestJob methods.
|
||||
void Start() override;
|
||||
void Kill() override;
|
||||
bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) override;
|
||||
int ReadRawData(net::IOBuffer* dest, int dest_size) override;
|
||||
void GetResponseInfo(net::HttpResponseInfo* info) override;
|
||||
void GetLoadTimingInfo(
|
||||
net::LoadTimingInfo* load_timing_info) const override;
|
||||
|
@ -21,11 +21,13 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/prefs/pref_service.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/threading/worker_pool.h"
|
||||
#include "chrome/browser/net/proxy_service_factory.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
@ -36,6 +38,7 @@
|
||||
#include "net/dns/host_resolver.h"
|
||||
#include "net/ftp/ftp_network_layer.h"
|
||||
#include "net/http/http_auth_handler_factory.h"
|
||||
#include "net/http/http_auth_preferences.h"
|
||||
#include "net/http/http_cache.h"
|
||||
#include "net/http/http_server_properties_impl.h"
|
||||
#include "net/http/http_util.h"
|
||||
@ -97,6 +100,7 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
|
||||
|
||||
CefURLRequestContextGetterImpl::CefURLRequestContextGetterImpl(
|
||||
const CefRequestContextSettings& settings,
|
||||
PrefService* pref_service,
|
||||
base::MessageLoop* io_loop,
|
||||
base::MessageLoop* file_loop,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
@ -111,6 +115,10 @@ CefURLRequestContextGetterImpl::CefURLRequestContextGetterImpl(
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
std::swap(protocol_handlers_, *protocol_handlers);
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
gsapi_library_name_ = pref_service->GetString(prefs::kGSSAPILibraryName);
|
||||
#endif
|
||||
}
|
||||
|
||||
CefURLRequestContextGetterImpl::~CefURLRequestContextGetterImpl() {
|
||||
@ -172,24 +180,23 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
|
||||
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
|
||||
|
||||
// Add support for single sign-on.
|
||||
url_security_manager_.reset(net::URLSecurityManager::Create(NULL, NULL));
|
||||
|
||||
std::vector<std::string> supported_schemes;
|
||||
supported_schemes.push_back("basic");
|
||||
supported_schemes.push_back("digest");
|
||||
supported_schemes.push_back("ntlm");
|
||||
supported_schemes.push_back("negotiate");
|
||||
|
||||
storage_->set_http_auth_handler_factory(make_scoped_ptr(
|
||||
http_auth_preferences_.reset(
|
||||
new net::HttpAuthPreferences(supported_schemes
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
, gsapi_library_name_
|
||||
#endif
|
||||
));
|
||||
|
||||
storage_->set_http_auth_handler_factory(
|
||||
net::HttpAuthHandlerRegistryFactory::Create(
|
||||
supported_schemes,
|
||||
url_security_manager_.get(),
|
||||
url_request_context_->host_resolver(),
|
||||
std::string(),
|
||||
std::string(),
|
||||
false,
|
||||
false)));
|
||||
http_auth_preferences_.get(),
|
||||
url_request_context_->host_resolver()));
|
||||
storage_->set_http_server_properties(
|
||||
make_scoped_ptr<net::HttpServerProperties>(
|
||||
new net::HttpServerPropertiesImpl));
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
|
||||
class PrefService;
|
||||
|
||||
namespace base {
|
||||
class MessageLoop;
|
||||
}
|
||||
@ -28,11 +30,11 @@ class MessageLoop;
|
||||
namespace net {
|
||||
class CookieMonster;
|
||||
class FtpTransactionFactory;
|
||||
class HttpAuthPreferences;
|
||||
class ProxyConfigService;
|
||||
class URLRequestContextStorage;
|
||||
class URLRequestJobFactory;
|
||||
class URLRequestJobFactoryImpl;
|
||||
class URLSecurityManager;
|
||||
}
|
||||
|
||||
// Isolated URLRequestContextGetter implementation. Life span is primarily
|
||||
@ -43,6 +45,7 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter {
|
||||
public:
|
||||
CefURLRequestContextGetterImpl(
|
||||
const CefRequestContextSettings& settings,
|
||||
PrefService* pref_service,
|
||||
base::MessageLoop* io_loop,
|
||||
base::MessageLoop* file_loop,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
@ -80,11 +83,15 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter {
|
||||
base::MessageLoop* io_loop_;
|
||||
base::MessageLoop* file_loop_;
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
std::string gsapi_library_name_;
|
||||
#endif
|
||||
|
||||
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
|
||||
scoped_ptr<net::URLRequestContextStorage> storage_;
|
||||
scoped_ptr<net::HttpAuthPreferences> http_auth_preferences_;
|
||||
scoped_ptr<CefURLRequestContextImpl> url_request_context_;
|
||||
scoped_ptr<CefURLRequestManager> url_request_manager_;
|
||||
scoped_ptr<net::URLSecurityManager> url_security_manager_;
|
||||
scoped_ptr<net::FtpTransactionFactory> ftp_transaction_factory_;
|
||||
content::ProtocolHandlerMap protocol_handlers_;
|
||||
content::URLRequestInterceptorScopedVector request_interceptors_;
|
||||
|
@ -147,7 +147,7 @@ class CefOriginWhitelistManager {
|
||||
typedef std::vector<Cef_CrossOriginWhiteListEntry_Params> OriginList;
|
||||
OriginList origin_list_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CefOriginWhitelistManager);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefOriginWhitelistManager);
|
||||
};
|
||||
|
||||
base::LazyInstance<CefOriginWhitelistManager> g_manager =
|
||||
|
@ -293,7 +293,7 @@ class CefCopyFrameGenerator {
|
||||
content::GLHelper* gl_helper =
|
||||
content::ImageTransportFactory::GetInstance()->GetGLHelper();
|
||||
if (gl_helper)
|
||||
sync_token = gpu::SyncToken(gl_helper->InsertSyncPoint());
|
||||
gl_helper->GenerateSyncToken(&sync_token);
|
||||
}
|
||||
const bool lost_resource = !sync_token.HasData();
|
||||
release_callback->Run(sync_token, lost_resource);
|
||||
@ -658,12 +658,8 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
||||
|
||||
// The compositor will draw directly to the SoftwareOutputDevice which
|
||||
// then calls OnPaint.
|
||||
delegated_frame_host_->SwapDelegatedFrame(
|
||||
output_surface_id,
|
||||
frame->delegated_frame_data.Pass(),
|
||||
frame->metadata.device_scale_factor,
|
||||
frame->metadata.latency_info,
|
||||
&frame->metadata.satisfies_sequences);
|
||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
||||
frame.Pass());
|
||||
} else {
|
||||
if (!copy_frame_generator_.get()) {
|
||||
copy_frame_generator_.reset(
|
||||
@ -673,18 +669,14 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
||||
// Determine the damage rectangle for the current frame. This is the same
|
||||
// calculation that SwapDelegatedFrame uses.
|
||||
cc::RenderPass* root_pass =
|
||||
frame->delegated_frame_data->render_pass_list.back();
|
||||
frame->delegated_frame_data->render_pass_list.back().get();
|
||||
gfx::Size frame_size = root_pass->output_rect.size();
|
||||
gfx::Rect damage_rect =
|
||||
gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect));
|
||||
damage_rect.Intersect(gfx::Rect(frame_size));
|
||||
|
||||
delegated_frame_host_->SwapDelegatedFrame(
|
||||
output_surface_id,
|
||||
frame->delegated_frame_data.Pass(),
|
||||
frame->metadata.device_scale_factor,
|
||||
frame->metadata.latency_info,
|
||||
&frame->metadata.satisfies_sequences);
|
||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
||||
frame.Pass());
|
||||
|
||||
// Request a copy of the last compositor frame which will eventually call
|
||||
// OnPaint asynchronously.
|
||||
@ -866,7 +858,7 @@ void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
|
||||
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame(
|
||||
const gfx::Rect& src_subrect,
|
||||
const scoped_refptr<media::VideoFrame>& target,
|
||||
const base::Callback<void(bool)>& callback) {
|
||||
const base::Callback<void(const gfx::Rect&, bool)>& callback) {
|
||||
delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame(
|
||||
src_subrect, target, callback);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ class CefRenderWidgetHostViewOSR
|
||||
void CopyFromCompositingSurfaceToVideoFrame(
|
||||
const gfx::Rect& src_subrect,
|
||||
const scoped_refptr<media::VideoFrame>& target,
|
||||
const base::Callback<void(bool)>& callback) override;
|
||||
const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
|
||||
bool CanCopyToVideoFrame() const override;
|
||||
void BeginFrameSubscription(
|
||||
scoped_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
|
||||
|
@ -147,10 +147,6 @@ scoped_ptr<PrefService> CreatePrefService(const base::FilePath& pref_path) {
|
||||
registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService,
|
||||
command_line->HasSwitch(switches::kEnableSpellingService));
|
||||
registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, true);
|
||||
// The kEnableSpellingAutoCorrect command-line value is also checked in
|
||||
// SpellCheckProvider::autoCorrectWord.
|
||||
registry->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect,
|
||||
command_line->HasSwitch(switches::kEnableSpellingAutoCorrect));
|
||||
|
||||
// Pepper flash preferences.
|
||||
// Based on DeviceIDFetcher::RegisterProfilePrefs.
|
||||
@ -162,6 +158,12 @@ scoped_ptr<PrefService> CreatePrefService(const base::FilePath& pref_path) {
|
||||
registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
|
||||
registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
|
||||
|
||||
// Network preferences.
|
||||
// Based on IOThread::RegisterPrefs.
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string());
|
||||
#endif
|
||||
|
||||
if (command_line->HasSwitch(switches::kEnablePreferenceTesting)) {
|
||||
// Preferences used with unit tests.
|
||||
registry->RegisterBooleanPref("test.bool", true);
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "content/public/browser/site_instance.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "content/public/common/webrtc_ip_handling_policy.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/view_type_utils.h"
|
||||
#include "extensions/common/constants.h"
|
||||
@ -58,11 +59,6 @@ void SetDefaultPrefs(content::WebPreferences& web) {
|
||||
command_line->HasSwitch(switches::kImageShrinkStandaloneToFit);
|
||||
web.text_areas_are_resizable =
|
||||
!command_line->HasSwitch(switches::kDisableTextAreaResize);
|
||||
|
||||
web.asynchronous_spell_checking_enabled = true;
|
||||
// Auto-correct does not work in combination with the unified text checker.
|
||||
web.unified_textchecker_enabled =
|
||||
!command_line->HasSwitch(switches::kEnableSpellingAutoCorrect);
|
||||
}
|
||||
|
||||
// Chrome preferences.
|
||||
@ -346,10 +342,15 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
prefs::kEnableDoNotTrack,
|
||||
false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
// TODO(guoweis): Remove next 2 options at M50.
|
||||
registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
|
||||
registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
|
||||
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
|
||||
content::kWebRTCIPHandlingDefault);
|
||||
#endif
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true);
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ CefTraceSubscriber::CefTraceSubscriber()
|
||||
CefTraceSubscriber::~CefTraceSubscriber() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (collecting_trace_data_)
|
||||
TracingController::GetInstance()->DisableRecording(NULL);
|
||||
TracingController::GetInstance()->StopTracing(NULL);
|
||||
}
|
||||
|
||||
bool CefTraceSubscriber::BeginTracing(
|
||||
@ -50,13 +50,13 @@ bool CefTraceSubscriber::BeginTracing(
|
||||
|
||||
collecting_trace_data_ = true;
|
||||
|
||||
TracingController::EnableRecordingDoneCallback done_callback;
|
||||
TracingController::StartTracingDoneCallback done_callback;
|
||||
if (callback.get()) {
|
||||
done_callback =
|
||||
base::Bind(&CefCompletionCallback::OnComplete, callback.get());
|
||||
}
|
||||
|
||||
TracingController::GetInstance()->EnableRecording(
|
||||
TracingController::GetInstance()->StartTracing(
|
||||
base::trace_event::TraceConfig(categories, ""),
|
||||
done_callback);
|
||||
return true;
|
||||
@ -73,7 +73,7 @@ bool CefTraceSubscriber::EndTracing(
|
||||
if (!callback.get()) {
|
||||
// Discard the trace data.
|
||||
collecting_trace_data_ = false;
|
||||
TracingController::GetInstance()->DisableRecording(NULL);
|
||||
TracingController::GetInstance()->StopTracing(NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ bool CefTraceSubscriber::EndTracing(
|
||||
base::Bind(&CefTraceSubscriber::OnTracingFileResult,
|
||||
weak_factory_.GetWeakPtr(), callback, tracing_file);
|
||||
|
||||
TracingController::GetInstance()->DisableRecording(
|
||||
TracingController::GetInstance()->StopTracing(
|
||||
TracingController::CreateFileSink(tracing_file, result_callback));
|
||||
return true;
|
||||
}
|
||||
|
@ -213,6 +213,9 @@ void SetHeaderMap(const CefRequest::HeaderMap& map,
|
||||
}
|
||||
}
|
||||
|
||||
// Type used in UploadDataStream.
|
||||
typedef std::vector<scoped_ptr<net::UploadElementReader>> UploadElementReaders;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -983,11 +986,9 @@ void CefPostDataImpl::Set(const net::UploadDataStream& data_stream) {
|
||||
|
||||
CefRefPtr<CefPostDataElement> postelem;
|
||||
|
||||
const ScopedVector<net::UploadElementReader>* elements =
|
||||
data_stream.GetElementReaders();
|
||||
const UploadElementReaders* elements = data_stream.GetElementReaders();
|
||||
if (elements) {
|
||||
ScopedVector<net::UploadElementReader>::const_iterator it =
|
||||
elements->begin();
|
||||
UploadElementReaders::const_iterator it = elements->begin();
|
||||
for (; it != elements->end(); ++it) {
|
||||
postelem = CefPostDataElement::Create();
|
||||
static_cast<CefPostDataElementImpl*>(postelem.get())->Set(**it);
|
||||
@ -1015,14 +1016,14 @@ void CefPostDataImpl::Get(net::UploadData& data) const {
|
||||
net::UploadDataStream* CefPostDataImpl::Get() const {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
|
||||
ScopedVector<net::UploadElementReader> element_readers;
|
||||
UploadElementReaders element_readers;
|
||||
ElementVector::const_iterator it = elements_.begin();
|
||||
for (; it != elements_.end(); ++it) {
|
||||
element_readers.push_back(
|
||||
static_cast<CefPostDataElementImpl*>(it->get())->Get());
|
||||
element_readers.push_back(make_scoped_ptr(
|
||||
static_cast<CefPostDataElementImpl*>(it->get())->Get()));
|
||||
}
|
||||
|
||||
return new net::ElementsUploadDataStream(element_readers.Pass(), 0);
|
||||
return new net::ElementsUploadDataStream(std::move(element_readers), 0);
|
||||
}
|
||||
|
||||
void CefPostDataImpl::Set(const blink::WebHTTPBody& data) {
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "extensions/renderer/renderer_extension_registry.h"
|
||||
#include "ipc/ipc_sync_channel.h"
|
||||
#include "media/base/media.h"
|
||||
#include "printing/print_settings.h"
|
||||
#include "third_party/WebKit/public/platform/WebPrerenderingSupport.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
@ -175,6 +176,9 @@ CefContentRendererClient::CefContentRendererClient()
|
||||
extensions::ExtensionsRendererClient::Set(
|
||||
extensions_renderer_client_.get());
|
||||
}
|
||||
#if defined(ENABLE_PRINTING)
|
||||
printing::SetAgent(CefContentClient::Get()->GetUserAgent());
|
||||
#endif
|
||||
}
|
||||
|
||||
CefContentRendererClient::~CefContentRendererClient() {
|
||||
|
@ -64,7 +64,7 @@ class CefFrameImpl : public CefFrame {
|
||||
int64 frame_id_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefFrameImpl);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CefFrameImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefFrameImpl);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_RENDERER_FRAME_IMPL_H_
|
||||
|
@ -49,7 +49,7 @@ bool CefRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||
}
|
||||
|
||||
void CefRenderMessageFilter::OnDevToolsAgentAttach(
|
||||
const std::string& host_id) {
|
||||
const std::string& host_id, int session_id) {
|
||||
CEF_POST_TASK_RT(
|
||||
base::Bind(&CefRenderMessageFilter::OnDevToolsAgentAttach_RT, this));
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class CefRenderMessageFilter : public IPC::MessageFilter {
|
||||
|
||||
private:
|
||||
// Message handlers called on the IO thread.
|
||||
void OnDevToolsAgentAttach(const std::string& host_id);
|
||||
void OnDevToolsAgentAttach(const std::string& host_id, int session_id);
|
||||
void OnDevToolsAgentDetach(int32 routing_id);
|
||||
|
||||
void OnDevToolsAgentAttach_RT();
|
||||
|
@ -51,6 +51,45 @@ static const char kCefContextState[] = "Cef::ContextState";
|
||||
void MessageListenerCallbackImpl(v8::Handle<v8::Message> message,
|
||||
v8::Handle<v8::Value> data);
|
||||
|
||||
// The following *Private functions are convenience wrappers for methods on
|
||||
// v8::Object with the corresponding names.
|
||||
// Based on extensions/renderer/object_backed_native_handler.cc.
|
||||
|
||||
void SetPrivate(v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Object> obj,
|
||||
const char* key,
|
||||
v8::Local<v8::Value> value) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
obj->SetPrivate(context,
|
||||
v8::Private::ForApi(isolate,
|
||||
v8::String::NewFromUtf8(isolate, key)),
|
||||
value)
|
||||
.FromJust();
|
||||
}
|
||||
|
||||
bool GetPrivate(v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Object> obj,
|
||||
const char* key,
|
||||
v8::Local<v8::Value>* result) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
return obj->GetPrivate(context,
|
||||
v8::Private::ForApi(
|
||||
isolate,
|
||||
v8::String::NewFromUtf8(isolate, key)))
|
||||
.ToLocal(result);
|
||||
}
|
||||
|
||||
void DeletePrivate(v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Object> obj,
|
||||
const char* key) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
obj->DeletePrivate(context,
|
||||
v8::Private::ForApi(
|
||||
isolate,
|
||||
v8::String::NewFromUtf8(isolate, key)))
|
||||
.FromJust();
|
||||
}
|
||||
|
||||
// Manages memory and state information associated with a single Isolate.
|
||||
class CefV8IsolateManager {
|
||||
public:
|
||||
@ -108,18 +147,17 @@ class CefV8IsolateManager {
|
||||
|
||||
return state;
|
||||
} else {
|
||||
v8::Local<v8::String> key =
|
||||
v8::String::NewFromUtf8(isolate_, kCefContextState);
|
||||
|
||||
v8::Local<v8::Object> object = context->Global();
|
||||
v8::Local<v8::Value> value = object->GetHiddenValue(key);
|
||||
if (!value.IsEmpty()) {
|
||||
|
||||
v8::Local<v8::Value> value;
|
||||
if (GetPrivate(context, object, kCefContextState, &value)) {
|
||||
return static_cast<CefV8ContextState*>(
|
||||
v8::External::Cast(*value)->Value());
|
||||
}
|
||||
|
||||
scoped_refptr<CefV8ContextState> state = new CefV8ContextState();
|
||||
object->SetHiddenValue(key, v8::External::New(isolate_, state.get()));
|
||||
SetPrivate(context, object, kCefContextState,
|
||||
v8::External::New(isolate_, state.get()));
|
||||
|
||||
// Reference will be released in ReleaseContext.
|
||||
state->AddRef();
|
||||
@ -143,22 +181,21 @@ class CefV8IsolateManager {
|
||||
context_map_.erase(it);
|
||||
}
|
||||
} else {
|
||||
v8::Local<v8::String> key =
|
||||
v8::String::NewFromUtf8(isolate_, kCefContextState);
|
||||
v8::Local<v8::Object> object = context->Global();
|
||||
v8::Local<v8::Value> value = object->GetHiddenValue(key);
|
||||
if (value.IsEmpty())
|
||||
return;
|
||||
|
||||
v8::Local<v8::Value> value;
|
||||
if (GetPrivate(context, object, kCefContextState, &value)) {
|
||||
scoped_refptr<CefV8ContextState> state =
|
||||
static_cast<CefV8ContextState*>(v8::External::Cast(*value)->Value());
|
||||
static_cast<CefV8ContextState*>(
|
||||
v8::External::Cast(*value)->Value());
|
||||
state->Detach();
|
||||
object->DeleteHiddenValue(key);
|
||||
DeletePrivate(context, object, kCefContextState);
|
||||
|
||||
// Match the AddRef in GetContextState.
|
||||
state->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AddGlobalTrackObject(CefTrackNode* object) {
|
||||
DCHECK_EQ(isolate_, v8::Isolate::GetCurrent());
|
||||
@ -323,19 +360,17 @@ class V8TrackObject : public CefTrackNode {
|
||||
}
|
||||
|
||||
// Attach this track object to the specified V8 object.
|
||||
void AttachTo(v8::Local<v8::Object> object) {
|
||||
object->SetHiddenValue(v8::String::NewFromUtf8(isolate_, kCefTrackObject),
|
||||
void AttachTo(v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Object> object) {
|
||||
SetPrivate(context, object, kCefTrackObject,
|
||||
v8::External::New(isolate_, this));
|
||||
}
|
||||
|
||||
// Retrieve the track object for the specified V8 object.
|
||||
static V8TrackObject* Unwrap(v8::Isolate* isolate,
|
||||
static V8TrackObject* Unwrap(v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Object> object) {
|
||||
DCHECK(isolate);
|
||||
v8::Local<v8::Value> value =
|
||||
object->GetHiddenValue(
|
||||
v8::String::NewFromUtf8(isolate, kCefTrackObject));
|
||||
if (!value.IsEmpty())
|
||||
v8::Local<v8::Value> value;
|
||||
if (GetPrivate(context, object, kCefTrackObject, &value))
|
||||
return static_cast<V8TrackObject*>(v8::External::Cast(*value)->Value());
|
||||
|
||||
return NULL;
|
||||
@ -480,12 +515,13 @@ void AccessorGetterCallbackImpl(
|
||||
v8::Local<v8::String> property,
|
||||
const v8::PropertyCallbackInfo<v8::Value>& info) {
|
||||
v8::Isolate* isolate = info.GetIsolate();
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
|
||||
v8::Local<v8::Object> obj = info.This();
|
||||
|
||||
CefRefPtr<CefV8Accessor> accessorPtr;
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
accessorPtr = tracker->GetAccessor();
|
||||
|
||||
@ -518,12 +554,13 @@ void AccessorSetterCallbackImpl(
|
||||
v8::Local<v8::Value> value,
|
||||
const v8::PropertyCallbackInfo<void>& info) {
|
||||
v8::Isolate* isolate = info.GetIsolate();
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
|
||||
v8::Local<v8::Object> obj = info.This();
|
||||
|
||||
CefRefPtr<CefV8Accessor> accessorPtr;
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
accessorPtr = tracker->GetAccessor();
|
||||
|
||||
@ -947,7 +984,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
||||
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(val);
|
||||
v8::Local<v8::Value> code_val = GetV8String(isolate, code);
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
retval = NULL;
|
||||
@ -1172,7 +1209,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
tracker->SetAccessor(accessor);
|
||||
|
||||
// Attach the tracker object.
|
||||
tracker->AttachTo(obj);
|
||||
tracker->AttachTo(context, obj);
|
||||
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitObject(obj, tracker);
|
||||
@ -1200,7 +1237,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
|
||||
v8::Local<v8::Array> arr = v8::Array::New(isolate, length);
|
||||
|
||||
// Attach the tracker object.
|
||||
tracker->AttachTo(arr);
|
||||
tracker->AttachTo(context, arr);
|
||||
|
||||
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
|
||||
impl->InitObject(arr, tracker);
|
||||
@ -1250,7 +1287,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
||||
tracker->SetHandler(handler);
|
||||
|
||||
// Attach the tracker object.
|
||||
tracker->AttachTo(func);
|
||||
tracker->AttachTo(context, func);
|
||||
|
||||
// Create the CefV8ValueImpl and provide a tracker object that will cause
|
||||
// the handler reference to be released when the V8 object is destroyed.
|
||||
@ -1567,10 +1604,17 @@ bool CefV8ValueImpl::IsUserCreated() {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return false;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
return (tracker != NULL);
|
||||
}
|
||||
|
||||
@ -1638,7 +1682,7 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) {
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
bool del = obj->Delete(GetV8String(isolate, key));
|
||||
return (!HasCaught(try_catch) && del);
|
||||
@ -1652,11 +1696,12 @@ bool CefV8ValueImpl::DeleteValue(int index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
v8::HandleScope handle_scope(handle_->isolate());
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
bool del = obj->Delete(index);
|
||||
return (!HasCaught(try_catch) && del);
|
||||
@ -1670,7 +1715,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
v8::Local<v8::Value> ret_value = obj->Get(GetV8String(isolate, key));
|
||||
if (!HasCaught(try_catch) && !ret_value.IsEmpty())
|
||||
@ -1691,7 +1736,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
v8::Local<v8::Value> ret_value = obj->Get(v8::Number::New(isolate, index));
|
||||
if (!HasCaught(try_catch) && !ret_value.IsEmpty())
|
||||
@ -1711,7 +1756,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
bool set;
|
||||
// TODO(cef): This usage may not exactly match the previous implementation.
|
||||
@ -1741,11 +1786,12 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
|
||||
|
||||
CefV8ValueImpl* impl = static_cast<CefV8ValueImpl*>(value.get());
|
||||
if (impl && impl->IsValid()) {
|
||||
v8::HandleScope handle_scope(handle_->isolate());
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
bool set = obj->Set(index, impl->GetV8Value(true));
|
||||
return (!HasCaught(try_catch) && set);
|
||||
@ -1761,12 +1807,19 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings,
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return false;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
CefRefPtr<CefV8Accessor> accessorPtr;
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
accessorPtr = tracker->GetAccessor();
|
||||
|
||||
@ -1779,7 +1832,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings,
|
||||
(attribute & V8_PROPERTY_ATTRIBUTE_READONLY) ?
|
||||
NULL : AccessorSetterCallbackImpl;
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
bool set = obj->SetAccessor(GetV8String(isolate, key), getter, setter, obj,
|
||||
static_cast<v8::AccessControl>(settings),
|
||||
@ -1811,10 +1864,17 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBase> user_data) {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return false;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker) {
|
||||
tracker->SetUserData(user_data);
|
||||
return true;
|
||||
@ -1828,10 +1888,17 @@ CefRefPtr<CefBase> CefV8ValueImpl::GetUserData() {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
return tracker->GetUserData();
|
||||
|
||||
@ -1843,10 +1910,17 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return 0;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
return tracker->GetExternallyAllocatedMemory();
|
||||
|
||||
@ -1858,10 +1932,17 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return 0;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
return tracker->AdjustExternallyAllocatedMemory(change_in_bytes);
|
||||
|
||||
@ -1905,14 +1986,21 @@ CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty()) {
|
||||
NOTREACHED() << "not currently in a V8 context";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
|
||||
if (!value->IsFunction()) {
|
||||
NOTREACHED() << "V8 value is not a function";
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
v8::Local<v8::Object> obj = value->ToObject();
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj);
|
||||
V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj);
|
||||
if (tracker)
|
||||
return tracker->GetHandler();
|
||||
|
||||
@ -1995,7 +2083,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
CefRefPtr<CefV8Value> retval;
|
||||
|
||||
{
|
||||
v8::TryCatch try_catch;
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
v8::MaybeLocal<v8::Value> func_rv =
|
||||
|
@ -14,6 +14,10 @@ patches = [
|
||||
{
|
||||
# Fix Xcode 4 build on OS X Lion.
|
||||
# http://codereview.chromium.org/8086022/
|
||||
#
|
||||
# Disable use of the sysroot image for CEF because it does not include
|
||||
# the GTK dependency required by cefclient. It would be nice to enable
|
||||
# this functionality in the future. See http://crbug.com/504446.
|
||||
'name': 'build',
|
||||
'path': '../build/',
|
||||
},
|
||||
@ -227,13 +231,6 @@ patches = [
|
||||
'name': 'font_family_cache_1501',
|
||||
'path': '../chrome/browser/',
|
||||
},
|
||||
{
|
||||
# Fix crash while printing on Windows by properly initializing V8 in the PDF
|
||||
# module.
|
||||
# https://code.google.com/p/chromium/issues/detail?id=549365#c12
|
||||
'name': 'pdf_print_549365',
|
||||
'path': '../pdf/',
|
||||
},
|
||||
{
|
||||
# Fix crash while printing on Windows by properly initializing V8 in the PDF
|
||||
# module.
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||
index b389e40..c3b5d3e 100644
|
||||
index 8971b07f..f37aa2a 100644
|
||||
--- render_widget_host_view_guest.cc
|
||||
+++ render_widget_host_view_guest.cc
|
||||
@@ -191,6 +191,9 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
||||
index cef0842..d79092d 100644
|
||||
index 61dbe6c..59d1673 100644
|
||||
--- browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -23,7 +23,7 @@
|
||||
@ -36,10 +36,10 @@ index cef0842..d79092d 100644
|
||||
}
|
||||
|
||||
RendererPreferences* renderer_prefs =
|
||||
@@ -792,11 +791,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
// This will trigger a callback to RenderViewReady after a round-trip IPC.
|
||||
static_cast<RenderViewHostImpl*>(
|
||||
GetWebContents()->GetRenderViewHost())->Init();
|
||||
@@ -787,11 +786,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<RenderViewHostImpl*>(GetWebContents()->GetRenderViewHost())
|
||||
->GetWidget()
|
||||
->Init();
|
||||
- WebContentsViewGuest* web_contents_view =
|
||||
- static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
|
@ -1,56 +1,65 @@
|
||||
diff --git web_contents_impl.cc web_contents_impl.cc
|
||||
index bf45da9..19ef2c7 100644
|
||||
index 18589f1..85f57e4 100644
|
||||
--- web_contents_impl.cc
|
||||
+++ web_contents_impl.cc
|
||||
@@ -1351,23 +1351,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1383,30 +1383,38 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
main_frame_widget_routing_id);
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name);
|
||||
|
||||
- WebContentsViewDelegate* delegate =
|
||||
- GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
-
|
||||
- if (browser_plugin_guest_ &&
|
||||
- !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
||||
- scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
|
||||
- this, delegate, &render_view_host_delegate_view_));
|
||||
-
|
||||
- WebContentsViewGuest* rv = new WebContentsViewGuest(
|
||||
- this, browser_plugin_guest_.get(), platform_view.Pass(),
|
||||
- render_view_host_delegate_view_);
|
||||
- render_view_host_delegate_view_ = rv;
|
||||
- view_.reset(rv);
|
||||
- } else {
|
||||
- // Regular WebContentsView.
|
||||
- view_.reset(CreateWebContentsView(
|
||||
- this, delegate, &render_view_host_delegate_view_));
|
||||
+ if (params.view && params.delegate_view) {
|
||||
+ view_.reset(params.view);
|
||||
+ render_view_host_delegate_view_ = params.delegate_view;
|
||||
+ }
|
||||
+
|
||||
|
||||
- view_.reset(
|
||||
- CreateWebContentsView(this, delegate, &render_view_host_delegate_view_));
|
||||
+ if (!view_) {
|
||||
+ WebContentsViewDelegate* delegate =
|
||||
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
- if (browser_plugin_guest_ &&
|
||||
- !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
||||
- view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
|
||||
- view_.Pass(),
|
||||
- &render_view_host_delegate_view_));
|
||||
- }
|
||||
+ view_.reset(
|
||||
+ CreateWebContentsView(this, delegate,
|
||||
+ &render_view_host_delegate_view_));
|
||||
+
|
||||
+ if (browser_plugin_guest_ &&
|
||||
+ !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
||||
+ scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
|
||||
+ this, delegate, &render_view_host_delegate_view_));
|
||||
+
|
||||
+ WebContentsViewGuest* rv = new WebContentsViewGuest(
|
||||
+ this, browser_plugin_guest_.get(), platform_view.Pass(),
|
||||
+ render_view_host_delegate_view_);
|
||||
+ render_view_host_delegate_view_ = rv;
|
||||
+ view_.reset(rv);
|
||||
+ } else {
|
||||
+ // Regular WebContentsView.
|
||||
+ view_.reset(CreateWebContentsView(
|
||||
+ this, delegate, &render_view_host_delegate_view_));
|
||||
+ view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
|
||||
+ view_.Pass(),
|
||||
+ &render_view_host_delegate_view_));
|
||||
+ }
|
||||
|
||||
#if defined(MOJO_SHELL_CLIENT)
|
||||
- if (MojoShellConnection::Get() &&
|
||||
- base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
- switches::kUseMusInRenderer)) {
|
||||
- mus::Window* window = aura::GetMusWindow(params.context);
|
||||
- if (window) {
|
||||
- view_.reset(new WebContentsViewMus(this, window, view_.Pass(),
|
||||
- &render_view_host_delegate_view_));
|
||||
+ if (MojoShellConnection::Get() &&
|
||||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ switches::kUseMusInRenderer)) {
|
||||
+ mus::Window* window = aura::GetMusWindow(params.context);
|
||||
+ if (window) {
|
||||
+ view_.reset(new WebContentsViewMus(this, window, view_.Pass(),
|
||||
+ &render_view_host_delegate_view_));
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
#endif
|
||||
+ }
|
||||
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
@@ -1719,11 +1726,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -1810,11 +1818,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||
|
||||
@ -66,7 +75,7 @@ index bf45da9..19ef2c7 100644
|
||||
if (route_id != MSG_ROUTING_NONE &&
|
||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||
// If the embedder didn't create a WebContents for this route, we need to
|
||||
@@ -1748,6 +1758,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -1839,6 +1850,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.opener_render_process_id = render_process_id;
|
||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||
create_params.opener_suppressed = params.opener_suppressed;
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git common.gypi common.gypi
|
||||
index 780f43d..409a018 100644
|
||||
index 6b2cb0a..2bc614d 100644
|
||||
--- common.gypi
|
||||
+++ common.gypi
|
||||
@@ -9,6 +9,9 @@
|
||||
@ -12,6 +12,18 @@ index 780f43d..409a018 100644
|
||||
# Putting a variables dict inside another variables dict looks kind of
|
||||
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
|
||||
# variables within the outer variables dict here. This is necessary
|
||||
@@ -92,7 +95,10 @@
|
||||
# depending on the packages installed on the local machine. Set this
|
||||
# to 0 to build against locally installed headers and libraries (e.g.
|
||||
# if packaging for a linux distro)
|
||||
- 'use_sysroot%': 1,
|
||||
+ # Disable use of the sysroot image for CEF because it does not include
|
||||
+ # the GTK dependency required by cefclient. It would be nice to enable
|
||||
+ # this functionality in the future. See http://crbug.com/504446.
|
||||
+ 'use_sysroot%': 0,
|
||||
|
||||
# Override buildtype to select the desired build flavor.
|
||||
# Dev - everyday build for development/testing
|
||||
diff --git mac/strip_save_dsym mac/strip_save_dsym
|
||||
index c9cf226..0dedbe3 100755
|
||||
--- mac/strip_save_dsym
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/browser.cc ui/browser.cc
|
||||
index d6a2493..c352fd6a 100644
|
||||
index c633924..b93d698 100644
|
||||
--- ui/browser.cc
|
||||
+++ ui/browser.cc
|
||||
@@ -1673,7 +1673,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
@@ -1677,7 +1677,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index b74845f..4ac77c3 100644
|
||||
index 1ae2b11..2379d27 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -143,6 +143,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
||||
@@ -136,6 +136,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
||||
scoped_ptr<cc::SoftwareOutputDevice>
|
||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) {
|
||||
@ -13,9 +13,9 @@ index b74845f..4ac77c3 100644
|
||||
+ return output_device;
|
||||
+ }
|
||||
+
|
||||
#if defined(OS_WIN)
|
||||
#if defined(MOJO_RUNNER_CLIENT)
|
||||
if (IsRunningInMojoShell()) {
|
||||
return scoped_ptr<cc::SoftwareOutputDevice>(
|
||||
new SoftwareOutputDeviceWin(software_backing_.get(), compositor));
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 1602d30..3dd3e3e 100644
|
||||
--- ui/compositor/compositor.h
|
||||
|
@ -1,60 +1,73 @@
|
||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||
index 3d0316f..ccd1f58 100644
|
||||
index 32004d1..ccd1f58 100644
|
||||
--- public/renderer/content_renderer_client.cc
|
||||
+++ public/renderer/content_renderer_client.cc
|
||||
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
@@ -98,6 +98,18 @@ bool ContentRendererClient::AllowPopup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
bool ContentRendererClient::HandleNavigation(
|
||||
RenderFrame* render_frame,
|
||||
bool is_content_initiated,
|
||||
@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation(
|
||||
bool is_redirect) {
|
||||
return false;
|
||||
}
|
||||
-#endif
|
||||
|
||||
+bool ContentRendererClient::HandleNavigation(
|
||||
+ RenderFrame* render_frame,
|
||||
+ bool is_content_initiated,
|
||||
+ int opener_id,
|
||||
+ blink::WebFrame* frame,
|
||||
+ const blink::WebURLRequest& request,
|
||||
+ blink::WebNavigationType type,
|
||||
+ blink::WebNavigationPolicy default_policy,
|
||||
+ bool is_redirect) {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||
index f55c691..0aeb1b24 100644
|
||||
index 59d448c..ef15ff1 100644
|
||||
--- public/renderer/content_renderer_client.h
|
||||
+++ public/renderer/content_renderer_client.h
|
||||
@@ -192,7 +192,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "base/strings/string16.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
|
||||
+#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
|
||||
+#include "third_party/WebKit/public/web/WebNavigationType.h"
|
||||
#include "ui/base/page_transition_types.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
@@ -189,6 +191,17 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
|
||||
// Returns true if a popup window should be allowed.
|
||||
virtual bool AllowPopup();
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
// TODO(sgurun) This callback is deprecated and will be removed as soon
|
||||
// as android webview completes implementation of a resource throttle based
|
||||
// shouldoverrideurl implementation. See crbug.com/325351
|
||||
@@ -207,7 +206,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
blink::WebNavigationType type,
|
||||
blink::WebNavigationPolicy default_policy,
|
||||
bool is_redirect);
|
||||
-#endif
|
||||
+
|
||||
+ // Returns true if the navigation was handled by the embedder and should be
|
||||
+ // ignored by WebKit. This method is used by CEF and android_webview.
|
||||
+ virtual bool HandleNavigation(RenderFrame* render_frame,
|
||||
+ bool is_content_initiated,
|
||||
+ int opener_id,
|
||||
+ blink::WebFrame* frame,
|
||||
+ const blink::WebURLRequest& request,
|
||||
+ blink::WebNavigationType type,
|
||||
+ blink::WebNavigationPolicy default_policy,
|
||||
+ bool is_redirect);
|
||||
|
||||
// Returns true if we should fork a new process for the given navigation.
|
||||
// If |send_referrer| is set to false (which is the default), no referrer
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index 33219e5..f6aac25 100644
|
||||
index 314fe7b..c519785 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -4395,7 +4395,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -4440,6 +4440,14 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
(pending_navigation_params_ &&
|
||||
!pending_navigation_params_->request_params.redirects.empty());
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||
@@ -4405,7 +4404,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
is_redirect)) {
|
||||
return blink::WebNavigationPolicyIgnore;
|
||||
}
|
||||
-#endif
|
||||
|
||||
+ if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||
+ GetContentClient()->renderer()->HandleNavigation(
|
||||
+ this, is_content_initiated, render_view_->opener_id_, frame_,
|
||||
+ info.urlRequest, info.navigationType, info.defaultPolicy,
|
||||
+ is_redirect)) {
|
||||
+ return blink::WebNavigationPolicyIgnore;
|
||||
+ }
|
||||
+
|
||||
Referrer referrer(
|
||||
RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest));
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
|
||||
index 6a34aa0..1743907 100644
|
||||
index 5806540..6d1a8a7 100644
|
||||
--- browser/guest_view/extension_options/extension_options_guest.cc
|
||||
+++ browser/guest_view/extension_options/extension_options_guest.cc
|
||||
@@ -197,7 +197,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||
@@ -200,7 +200,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git resource_ids resource_ids
|
||||
index a5bcffe..6b897df 100644
|
||||
index 6f53f31..21b5454 100644
|
||||
--- resource_ids
|
||||
+++ resource_ids
|
||||
@@ -14,6 +14,12 @@
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
|
||||
index 58be3bf..4dcb2a6 100644
|
||||
index 907542b..4d77af4 100644
|
||||
--- gyp/generator/ninja.py
|
||||
+++ gyp/generator/ninja.py
|
||||
@@ -745,7 +745,16 @@ class NinjaWriter(object):
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git hwnd_message_handler.cc hwnd_message_handler.cc
|
||||
index 035df76..d1517b4 100644
|
||||
index b5bd8a8..997c4da 100644
|
||||
--- hwnd_message_handler.cc
|
||||
+++ hwnd_message_handler.cc
|
||||
@@ -2364,8 +2364,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -2381,8 +2381,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
active_mouse_tracking_flags_ = 0;
|
||||
} else if (event.type() == ui::ET_MOUSEWHEEL) {
|
||||
// Reroute the mouse wheel to the window under the pointer if applicable.
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git message_loop.cc message_loop.cc
|
||||
index a44f468..6e391e9 100644
|
||||
index a0c5f61..a3033dc 100644
|
||||
--- message_loop.cc
|
||||
+++ message_loop.cc
|
||||
@@ -135,12 +135,6 @@ MessageLoop::~MessageLoop() {
|
||||
@@ -136,12 +136,6 @@ MessageLoop::~MessageLoop() {
|
||||
// bound to a thread.
|
||||
DCHECK(current() == this || !current());
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc
|
||||
index 55b2426..bea8823 100644
|
||||
index 1f9ebfb..37c2217 100644
|
||||
--- mime_handler_view_guest.cc
|
||||
+++ mime_handler_view_guest.cc
|
||||
@@ -132,6 +132,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/network_delegate.h base/network_delegate.h
|
||||
index e8d82a3..8b536d7 100644
|
||||
index 979d3ec..0ccfd16 100644
|
||||
--- base/network_delegate.h
|
||||
+++ base/network_delegate.h
|
||||
@@ -35,6 +35,7 @@ namespace net {
|
||||
@ -10,7 +10,7 @@ index e8d82a3..8b536d7 100644
|
||||
class HttpRequestHeaders;
|
||||
class HttpResponseHeaders;
|
||||
class ProxyInfo;
|
||||
@@ -118,6 +119,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
|
||||
@@ -119,6 +120,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
|
||||
const GURL& target_url,
|
||||
const GURL& referrer_url) const;
|
||||
|
||||
@ -45,10 +45,10 @@ index 1904a8c..8d5f1ec 100644
|
||||
friend class SdchFilterChainingTest;
|
||||
FRIEND_TEST_ALL_PREFIXES(FilterTest, ThreeFilterChain);
|
||||
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
|
||||
index 641c07b..e613c86 100644
|
||||
index fc9f4a9..4f6dbcc 100644
|
||||
--- url_request/url_request_job.cc
|
||||
+++ url_request/url_request_job.cc
|
||||
@@ -466,6 +466,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
@@ -472,6 +472,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
if (request_->status().is_success())
|
||||
filter_.reset(SetupFilter());
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git url_request.h url_request.h
|
||||
index f685cf7..d01faaee 100644
|
||||
index 33b2859..44cca91 100644
|
||||
--- url_request.h
|
||||
+++ url_request.h
|
||||
@@ -645,10 +645,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
@@ -653,10 +653,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
// or after the response headers are received.
|
||||
void GetConnectionAttempts(ConnectionAttempts* out) const;
|
||||
|
||||
|
@ -1,103 +0,0 @@
|
||||
diff --git pdf.cc pdf.cc
|
||||
index 1f580e4..9521fdf 100644
|
||||
--- pdf.cc
|
||||
+++ pdf.cc
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
-#include "gin/array_buffer.h"
|
||||
-#include "gin/public/isolate_holder.h"
|
||||
#include "pdf/out_of_process_instance.h"
|
||||
#include "ppapi/c/ppp.h"
|
||||
#include "ppapi/cpp/private/internal_module.h"
|
||||
@@ -24,14 +22,6 @@ namespace {
|
||||
|
||||
bool g_sdk_initialized_via_pepper = false;
|
||||
|
||||
-gin::IsolateHolder* g_isolate_holder = nullptr;
|
||||
-
|
||||
-void TearDownV8() {
|
||||
- g_isolate_holder->isolate()->Exit();
|
||||
- delete g_isolate_holder;
|
||||
- g_isolate_holder = nullptr;
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
PDFModule::PDFModule() {
|
||||
@@ -39,7 +29,6 @@ PDFModule::PDFModule() {
|
||||
|
||||
PDFModule::~PDFModule() {
|
||||
if (g_sdk_initialized_via_pepper) {
|
||||
- TearDownV8();
|
||||
chrome_pdf::ShutdownSDK();
|
||||
g_sdk_initialized_via_pepper = false;
|
||||
}
|
||||
@@ -60,15 +49,8 @@ pp::Instance* PDFModule::CreateInstance(PP_Instance instance) {
|
||||
v8::V8::SetNativesDataBlob(&natives);
|
||||
v8::V8::SetSnapshotDataBlob(&snapshot);
|
||||
}
|
||||
- gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
|
||||
- gin::ArrayBufferAllocator::SharedInstance());
|
||||
- g_isolate_holder =
|
||||
- new gin::IsolateHolder(gin::IsolateHolder::kSingleThread);
|
||||
- g_isolate_holder->isolate()->Enter();
|
||||
- if (!chrome_pdf::InitializeSDK()) {
|
||||
- TearDownV8();
|
||||
+ if (!chrome_pdf::InitializeSDK())
|
||||
return NULL;
|
||||
- }
|
||||
g_sdk_initialized_via_pepper = true;
|
||||
}
|
||||
|
||||
diff --git pdfium/pdfium_engine.cc pdfium/pdfium_engine.cc
|
||||
index 8631088..d23c141 100644
|
||||
--- pdfium/pdfium_engine.cc
|
||||
+++ pdfium/pdfium_engine.cc
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
+#include "gin/array_buffer.h"
|
||||
#include "gin/public/gin_embedders.h"
|
||||
+#include "gin/public/isolate_holder.h"
|
||||
#include "pdf/draw_utils.h"
|
||||
#include "pdf/pdfium/pdfium_api_string_buffer_adapter.h"
|
||||
#include "pdf/pdfium/pdfium_mem_buffer_file_read.h"
|
||||
@@ -449,9 +451,27 @@ std::string GetDocumentMetadata(FPDF_DOCUMENT doc, const std::string& key) {
|
||||
return base::UTF16ToUTF8(value);
|
||||
}
|
||||
|
||||
+gin::IsolateHolder* g_isolate_holder = nullptr;
|
||||
+
|
||||
+void SetUpV8() {
|
||||
+ gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
|
||||
+ gin::ArrayBufferAllocator::SharedInstance());
|
||||
+ g_isolate_holder =
|
||||
+ new gin::IsolateHolder(gin::IsolateHolder::kSingleThread);
|
||||
+ g_isolate_holder->isolate()->Enter();
|
||||
+}
|
||||
+
|
||||
+void TearDownV8() {
|
||||
+ g_isolate_holder->isolate()->Exit();
|
||||
+ delete g_isolate_holder;
|
||||
+ g_isolate_holder = nullptr;
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
bool InitializeSDK() {
|
||||
+ SetUpV8();
|
||||
+
|
||||
FPDF_LIBRARY_CONFIG config;
|
||||
config.version = 2;
|
||||
config.m_pUserFontPaths = nullptr;
|
||||
@@ -470,6 +490,7 @@ bool InitializeSDK() {
|
||||
}
|
||||
|
||||
void ShutdownSDK() {
|
||||
+ TearDownV8();
|
||||
FPDF_DestroyLibrary();
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
diff --git fpdfsdk/src/fpdfview.cpp fpdfsdk/src/fpdfview.cpp
|
||||
index 97da89e..0484d93 100644
|
||||
index fcb6731..0c92fe5 100644
|
||||
--- fpdfsdk/src/fpdfview.cpp
|
||||
+++ fpdfsdk/src/fpdfview.cpp
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "../../core/include/fxcodec/fx_codec.h"
|
||||
#include "../../core/include/fxcrt/fx_safe_types.h"
|
||||
+#include "../../fpdfsdk/include/jsapi/fxjs_v8.h"
|
||||
#include "../../public/fpdf_ext.h"
|
||||
#include "../../public/fpdf_progressive.h"
|
||||
#include "../../public/fpdfview.h"
|
||||
@@ -105,6 +106,7 @@ DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig(
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "fpdfsdk/include/fsdk_mgr.h"
|
||||
#include "fpdfsdk/include/fsdk_rendercontext.h"
|
||||
#include "fpdfsdk/include/javascript/IJavaScript.h"
|
||||
+#include "fpdfsdk/include/jsapi/fxjs_v8.h"
|
||||
#include "public/fpdf_ext.h"
|
||||
#include "public/fpdf_progressive.h"
|
||||
#include "third_party/base/nonstd_unique_ptr.h"
|
||||
@@ -117,6 +118,7 @@ DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig(
|
||||
DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
|
||||
CPDF_ModuleMgr::Destroy();
|
||||
CFX_GEModule::Destroy();
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
||||
index 48ba994..039d8fe 100644
|
||||
index f71d867..c9d82fd 100644
|
||||
--- public/common/common_param_traits_macros.h
|
||||
+++ public/common/common_param_traits_macros.h
|
||||
@@ -195,6 +195,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@@ -191,6 +191,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||
@ -11,10 +11,10 @@ index 48ba994..039d8fe 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
||||
index 6b599c0..d2ff454 100644
|
||||
index a86de33..6129690 100644
|
||||
--- public/common/web_preferences.cc
|
||||
+++ public/common/web_preferences.cc
|
||||
@@ -176,6 +176,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -170,6 +170,7 @@ WebPreferences::WebPreferences()
|
||||
pinch_overlay_scrollbar_thickness(0),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
@ -23,10 +23,10 @@ index 6b599c0..d2ff454 100644
|
||||
slimming_paint_v2_enabled(false),
|
||||
cookie_enabled(true),
|
||||
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
||||
index 0378cd7..484342b 100644
|
||||
index eb8f77e..6616a39 100644
|
||||
--- public/common/web_preferences.h
|
||||
+++ public/common/web_preferences.h
|
||||
@@ -173,6 +173,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
@@ -168,6 +168,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
int pinch_overlay_scrollbar_thickness;
|
||||
bool use_solid_color_scrollbars;
|
||||
bool navigate_on_drag_drop;
|
||||
@ -35,10 +35,10 @@ index 0378cd7..484342b 100644
|
||||
bool slimming_paint_v2_enabled;
|
||||
|
||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||
index 3fd5464..4bf3639 100644
|
||||
index a5aa817..e02557b 100644
|
||||
--- renderer/render_view_impl.cc
|
||||
+++ renderer/render_view_impl.cc
|
||||
@@ -953,6 +953,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
@@ -941,6 +941,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
settings->setCookieEnabled(prefs.cookie_enabled);
|
||||
settings->setNavigateOnDragDrop(prefs.navigate_on_drag_drop);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
||||
index 5cb2d6e..b0c8689 100644
|
||||
index 1eb1268..aa4b840 100644
|
||||
--- prefs_tab_helper.cc
|
||||
+++ prefs_tab_helper.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
@ -11,7 +11,7 @@ index 5cb2d6e..b0c8689 100644
|
||||
#include "base/prefs/overlay_user_pref_store.h"
|
||||
#include "base/prefs/pref_change_registrar.h"
|
||||
#include "base/prefs/pref_service.h"
|
||||
@@ -413,12 +413,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
@@ -415,12 +415,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
GetInstance()->GetServiceForBrowserContext(profile, true));
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index 5cb2d6e..b0c8689 100644
|
||||
|
||||
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
|
||||
"PrefWatcher",
|
||||
@@ -439,6 +437,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
@@ -441,6 +439,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -94,18 +94,18 @@ index d9ea441..dce6b9e 100644
|
||||
bool is_loading_;
|
||||
bool is_scripted_preview_delayed_;
|
||||
diff --git printing/renderer/print_web_view_helper_linux.cc printing/renderer/print_web_view_helper_linux.cc
|
||||
index 52f92ec..85f7adb 100644
|
||||
index 3e4033d..7a8b61f 100644
|
||||
--- printing/renderer/print_web_view_helper_linux.cc
|
||||
+++ printing/renderer/print_web_view_helper_linux.cc
|
||||
@@ -154,7 +154,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -152,7 +152,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
-#if defined(ENABLE_PRINT_PREVIEW)
|
||||
if (params.params.display_header_footer) {
|
||||
// |page_number| is 0-based, so 1 is added.
|
||||
// TODO(vitalybuka) : why does it work only with 1.25?
|
||||
@@ -163,7 +162,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -161,7 +160,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
scale_factor / 1.25, page_layout_in_points,
|
||||
params.params);
|
||||
}
|
||||
@ -114,12 +114,12 @@ index 52f92ec..85f7adb 100644
|
||||
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
||||
scale_factor, canvas);
|
||||
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
|
||||
index f2b94e7..8c5df5e 100644
|
||||
index 293f567..601fee6 100644
|
||||
--- printing/renderer/print_web_view_helper_mac.mm
|
||||
+++ printing/renderer/print_web_view_helper_mac.mm
|
||||
@@ -126,14 +126,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
@@ -125,14 +125,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
||||
-#if defined(ENABLE_PRINT_PREVIEW)
|
||||
if (params.display_header_footer) {
|
||||
@ -133,12 +133,12 @@ index f2b94e7..8c5df5e 100644
|
||||
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
||||
}
|
||||
diff --git printing/renderer/print_web_view_helper_pdf_win.cc printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
index 56acc74..ac85bf6 100644
|
||||
index 13ad735..fffce71 100644
|
||||
--- printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
+++ printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
@@ -162,14 +162,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -160,14 +160,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
-#if defined(ENABLE_PRINT_PREVIEW)
|
||||
if (params.params.display_header_footer) {
|
||||
|
@ -14,7 +14,7 @@ index 1b6d8a6..b606a30 100644
|
||||
WebContents::CreateParams::~CreateParams() {
|
||||
}
|
||||
diff --git web_contents.h web_contents.h
|
||||
index cda6487..6a84ed1 100644
|
||||
index c9fa8a01..e075a76 100644
|
||||
--- web_contents.h
|
||||
+++ web_contents.h
|
||||
@@ -52,9 +52,11 @@ class PageState;
|
||||
@ -41,10 +41,10 @@ index cda6487..6a84ed1 100644
|
||||
|
||||
// Creates a new WebContents.
|
||||
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
||||
index b39436d..bf257a7 100644
|
||||
index 70a1f06..b9673d2 100644
|
||||
--- web_contents_delegate.cc
|
||||
+++ web_contents_delegate.cc
|
||||
@@ -139,7 +139,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
@@ -165,7 +165,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@ -56,7 +56,7 @@ index b39436d..bf257a7 100644
|
||||
}
|
||||
|
||||
diff --git web_contents_delegate.h web_contents_delegate.h
|
||||
index 40a4904..e857dee 100644
|
||||
index f6a04a5..f41ec5b 100644
|
||||
--- web_contents_delegate.h
|
||||
+++ web_contents_delegate.h
|
||||
@@ -39,9 +39,11 @@ class DownloadItem;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||
index fb89516..6edca6e 100644
|
||||
index ccf0de2..c4b758e 100644
|
||||
--- render_widget_host_view_mac.mm
|
||||
+++ render_widget_host_view_mac.mm
|
||||
@@ -529,9 +529,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
@@ -530,9 +530,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
// Paint this view host with |background_color_| when there is no content
|
||||
// ready to draw.
|
||||
background_layer_.reset([[CALayer alloc] init]);
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
|
||||
index f7628fe..e2f1451 100644
|
||||
index 89b7d77..9996edf 100644
|
||||
--- renderer_preferences_util.cc
|
||||
+++ renderer_preferences_util.cc
|
||||
@@ -25,7 +25,8 @@
|
||||
@@ -26,7 +26,8 @@
|
||||
#include "ui/views/controls/textfield/textfield.h"
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@ index f7628fe..e2f1451 100644
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
@@ -81,7 +82,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
|
||||
@@ -94,7 +95,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
|
||||
prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0;
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git spellcheck_factory.cc spellcheck_factory.cc
|
||||
index fcf2ce8..9e4f3d1 100644
|
||||
index 87b5b9e..8e6dfff 100644
|
||||
--- spellcheck_factory.cc
|
||||
+++ spellcheck_factory.cc
|
||||
@@ -16,6 +16,13 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index bbb79c9..bf9a924 100644
|
||||
index edb45db..0dfcfb2 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -758,6 +758,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
|
||||
@@ -772,6 +772,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
|
||||
::SetFocus(host->GetAcceleratedWidget());
|
||||
}
|
||||
#endif
|
||||
@ -17,7 +17,7 @@ index bbb79c9..bf9a924 100644
|
||||
set_focus_on_mouse_down_ = false;
|
||||
host_->Focus();
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 1b40705..52599e5 100644
|
||||
index 1c07d7d..47c1911 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -374,6 +374,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
|
||||
@ -40,7 +40,7 @@ index 1b40705..52599e5 100644
|
||||
return renderer_frame_number_;
|
||||
}
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index bf3b8e1..351c601 100644
|
||||
index 1f1e43c..22b5593 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -78,6 +78,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@ -51,7 +51,7 @@ index bf3b8e1..351c601 100644
|
||||
|
||||
// IPC::Listener implementation:
|
||||
bool OnMessageReceived(const IPC::Message& msg) override;
|
||||
@@ -414,6 +415,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -434,6 +435,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
// renderer.
|
||||
bool pinch_zoom_enabled_;
|
||||
|
||||
@ -150,10 +150,10 @@ index 363c019..97ada1d 100644
|
||||
// a reference.
|
||||
corewm::TooltipWin* tooltip_;
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index 298c92b..393a5dc 100644
|
||||
index 656769c..0e5d460 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -165,6 +165,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@@ -168,6 +168,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
use_native_frame_(false),
|
||||
should_maximize_after_map_(false),
|
||||
use_argb_visual_(false),
|
||||
@ -161,17 +161,17 @@ index 298c92b..393a5dc 100644
|
||||
drag_drop_client_(NULL),
|
||||
native_widget_delegate_(native_widget_delegate),
|
||||
desktop_native_widget_aura_(desktop_native_widget_aura),
|
||||
@@ -173,7 +174,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
custom_window_shape_(false),
|
||||
@@ -177,7 +178,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
urgency_hint_set_(false),
|
||||
activatable_(true),
|
||||
modal_dialog_xid_(0),
|
||||
- close_widget_factory_(this) {
|
||||
+ close_widget_factory_(this),
|
||||
+ xwindow_destroyed_(false) {
|
||||
}
|
||||
|
||||
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
|
||||
@@ -384,7 +386,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||
@@ -388,7 +390,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||
// Actually free our native resources.
|
||||
if (ui::PlatformEventSource::GetInstance())
|
||||
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
||||
@ -181,7 +181,7 @@ index 298c92b..393a5dc 100644
|
||||
xwindow_ = None;
|
||||
|
||||
desktop_native_widget_aura_->OnHostClosed();
|
||||
@@ -533,6 +536,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||
@@ -537,6 +540,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
|
||||
@ -190,7 +190,7 @@ index 298c92b..393a5dc 100644
|
||||
return ToDIPRect(bounds_in_pixels_);
|
||||
}
|
||||
|
||||
@@ -970,6 +975,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||
@@ -974,6 +979,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
|
||||
@ -199,7 +199,7 @@ index 298c92b..393a5dc 100644
|
||||
return bounds_in_pixels_;
|
||||
}
|
||||
|
||||
@@ -1027,6 +1034,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
@@ -1031,6 +1038,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||
@ -208,8 +208,8 @@ index 298c92b..393a5dc 100644
|
||||
return bounds_in_pixels_.origin();
|
||||
}
|
||||
|
||||
@@ -1140,9 +1149,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
}
|
||||
@@ -1135,9 +1144,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
use_argb_visual_ = true;
|
||||
}
|
||||
|
||||
+ gfx::AcceleratedWidget parent_widget = params.parent_widget;
|
||||
@ -225,7 +225,7 @@ index 298c92b..393a5dc 100644
|
||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||
bounds_in_pixels_.height(),
|
||||
0, // border width
|
||||
@@ -1797,6 +1812,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
@@ -1766,6 +1781,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -237,12 +237,12 @@ index 298c92b..393a5dc 100644
|
||||
if (xev->xfocus.mode != NotifyGrab) {
|
||||
ReleaseCapture();
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
index 09b5993..db1b2bc 100644
|
||||
index c6d9257..0a36f28 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -85,6 +85,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// internal list of open windows.
|
||||
static void CleanUpWindowList(void (*func)(aura::Window* window));
|
||||
@@ -96,6 +96,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// there is no dialog on the host window.
|
||||
const XID GetModalDialog();
|
||||
|
||||
+ void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; }
|
||||
+
|
||||
@ -253,7 +253,7 @@ index 09b5993..db1b2bc 100644
|
||||
protected:
|
||||
// Overridden from DesktopWindowTreeHost:
|
||||
void Init(aura::Window* content_window,
|
||||
@@ -265,6 +271,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -272,6 +278,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// The bounds of |xwindow_|.
|
||||
gfx::Rect bounds_in_pixels_;
|
||||
|
||||
@ -263,7 +263,7 @@ index 09b5993..db1b2bc 100644
|
||||
// Whenever the bounds are set, we keep the previous set of bounds around so
|
||||
// we can have a better chance of getting the real
|
||||
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
|
||||
@@ -301,6 +310,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -308,6 +317,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// Whether we used an ARGB visual for our window.
|
||||
bool use_argb_visual_;
|
||||
|
||||
@ -274,7 +274,7 @@ index 09b5993..db1b2bc 100644
|
||||
DesktopDragDropClientAuraX11* drag_drop_client_;
|
||||
|
||||
scoped_ptr<ui::EventHandler> x11_non_client_event_filter_;
|
||||
@@ -353,6 +366,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -364,6 +377,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
|
||||
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
|
||||
|
||||
@ -285,7 +285,7 @@ index 09b5993..db1b2bc 100644
|
||||
};
|
||||
|
||||
diff --git ui/views/widget/desktop_aura/x11_desktop_handler.cc ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
index 5ab84f9..c4095fa 100644
|
||||
index 9b20295..20b1aec 100644
|
||||
--- ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
+++ ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
@@ -31,6 +31,30 @@ views::X11DesktopHandler* g_handler = NULL;
|
||||
@ -346,26 +346,26 @@ index 5ab84f9..c4095fa 100644
|
||||
x_active_window_ = None;
|
||||
}
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index 6c0168d..fbcfbfc 100644
|
||||
index 6873cde..770e2a9 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -124,6 +124,7 @@ Widget::InitParams::InitParams()
|
||||
@@ -125,6 +125,7 @@ Widget::InitParams::InitParams()
|
||||
use_system_default_icon(false),
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
parent(NULL),
|
||||
parent(nullptr),
|
||||
+ parent_widget(gfx::kNullAcceleratedWidget),
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(ui::LAYER_TEXTURED),
|
||||
@@ -148,6 +149,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
native_widget(nullptr),
|
||||
native_theme(nullptr),
|
||||
desktop_window_tree_host(nullptr),
|
||||
@@ -150,6 +151,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
use_system_default_icon(false),
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
parent(NULL),
|
||||
parent(nullptr),
|
||||
+ parent_widget(gfx::kNullAcceleratedWidget),
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(ui::LAYER_TEXTURED),
|
||||
@@ -323,7 +325,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||
native_widget(nullptr),
|
||||
native_theme(nullptr),
|
||||
desktop_window_tree_host(nullptr),
|
||||
@@ -327,7 +329,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||
InitParams params = in_params;
|
||||
|
||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||
@ -374,7 +374,7 @@ index 6c0168d..fbcfbfc 100644
|
||||
|
||||
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
|
||||
params.type != views::Widget::InitParams::TYPE_WINDOW &&
|
||||
@@ -386,7 +388,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||
@@ -390,7 +392,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||
Minimize();
|
||||
} else if (params.delegate) {
|
||||
SetContentsView(params.delegate->GetContentsView());
|
||||
@ -389,7 +389,7 @@ index 6c0168d..fbcfbfc 100644
|
||||
// This must come after SetContentsView() or it might not be able to find
|
||||
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
||||
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
||||
index 301c0af..de63108 100644
|
||||
index b53bb48..f79ce8f 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -232,6 +232,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||
index 499991c..b5d6d32 100644
|
||||
index 5488a95..18c184f 100644
|
||||
--- Source/web/ChromeClientImpl.cpp
|
||||
+++ Source/web/ChromeClientImpl.cpp
|
||||
@@ -809,7 +809,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
@@ -821,7 +821,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
||||
{
|
||||
notifyPopupOpeningObservers();
|
||||
@ -12,10 +12,10 @@ index 499991c..b5d6d32 100644
|
||||
|
||||
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||
index c97a89c..6d2fb40 100644
|
||||
index 3efbcdf..18f0c9e3 100644
|
||||
--- Source/web/WebViewImpl.cpp
|
||||
+++ Source/web/WebViewImpl.cpp
|
||||
@@ -418,6 +418,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||
@@ -414,6 +414,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||
, m_enableFakePageScaleAnimationForTesting(false)
|
||||
, m_fakePageScaleAnimationPageScaleFactor(0)
|
||||
, m_fakePageScaleAnimationUseAnchor(false)
|
||||
@ -23,7 +23,7 @@ index c97a89c..6d2fb40 100644
|
||||
, m_doingDragAndDrop(false)
|
||||
, m_ignoreInputEvents(false)
|
||||
, m_compositorDeviceScaleFactorOverride(0)
|
||||
@@ -4018,9 +4019,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
@@ -4050,9 +4051,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
m_client->pageScaleFactorChanged();
|
||||
}
|
||||
|
||||
@ -40,10 +40,10 @@ index c97a89c..6d2fb40 100644
|
||||
|
||||
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||
index 09b718d..a1bc2ffc 100644
|
||||
index c4453c1..bb6ee4e 100644
|
||||
--- Source/web/WebViewImpl.h
|
||||
+++ Source/web/WebViewImpl.h
|
||||
@@ -389,7 +389,8 @@ public:
|
||||
@@ -395,7 +395,8 @@ public:
|
||||
|
||||
// Returns true if popup menus should be rendered by the browser, false if
|
||||
// they should be rendered by WebKit (which is the default).
|
||||
@ -53,7 +53,7 @@ index 09b718d..a1bc2ffc 100644
|
||||
|
||||
bool shouldAutoResize() const
|
||||
{
|
||||
@@ -670,6 +671,8 @@ private:
|
||||
@@ -678,6 +679,8 @@ private:
|
||||
float m_fakePageScaleAnimationPageScaleFactor;
|
||||
bool m_fakePageScaleAnimationUseAnchor;
|
||||
|
||||
@ -63,10 +63,10 @@ index 09b718d..a1bc2ffc 100644
|
||||
|
||||
bool m_ignoreInputEvents;
|
||||
diff --git public/web/WebView.h public/web/WebView.h
|
||||
index 83d8c13..350bca4 100644
|
||||
index 843f633..f922327 100644
|
||||
--- public/web/WebView.h
|
||||
+++ public/web/WebView.h
|
||||
@@ -400,6 +400,7 @@ public:
|
||||
@@ -411,6 +411,7 @@ public:
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
|
@ -6,12 +6,10 @@
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <gl/gl.h>
|
||||
#include <gl/glu.h>
|
||||
#elif defined(OS_MACOSX)
|
||||
#include <OpenGL/gl.h>
|
||||
#elif defined(OS_LINUX)
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#else
|
||||
#error Platform is not supported.
|
||||
#endif
|
||||
|
@ -76,7 +76,7 @@ const CefRect kExpectedRectLI[] = {
|
||||
const CefRect kEditBoxRect(412, 245, 60, 22);
|
||||
const CefRect kNavigateButtonRect(360, 271, 140, 22);
|
||||
const CefRect kSelectRect(467, 22, 75, 20);
|
||||
const CefRect kExpandedSelectRect(466, 42, 81, 334);
|
||||
const CefRect kExpandedSelectRect(463, 42, 81, 342);
|
||||
const CefRect kDropDivRect(8, 332, 52, 52);
|
||||
const CefRect kDragDivRect(71, 342, 30, 30);
|
||||
const int kDefaultVerticalScrollbarWidth = 17;
|
||||
@ -85,7 +85,7 @@ const int kVerticalScrollbarWidth = GetSystemMetrics(SM_CXVSCROLL);
|
||||
const CefRect kEditBoxRect(442, 251, 46, 16);
|
||||
const CefRect kNavigateButtonRect(375, 275, 130, 20);
|
||||
const CefRect kSelectRect(461, 21, 87, 26);
|
||||
const CefRect kExpandedSelectRect(466, 42, 78, 286);
|
||||
const CefRect kExpandedSelectRect(463, 42, 78, 286);
|
||||
const CefRect kDropDivRect(9, 330, 52, 52);
|
||||
const CefRect kDragDivRect(60, 330, 52, 52);
|
||||
const int kVerticalScrollbarWidth = 15;
|
||||
@ -93,7 +93,7 @@ const int kVerticalScrollbarWidth = 15;
|
||||
const CefRect kEditBoxRect(434, 246, 60, 20);
|
||||
const CefRect kNavigateButtonRect(380, 271, 140, 22);
|
||||
const CefRect kSelectRect(467, 22, 75, 20);
|
||||
const CefRect kExpandedSelectRect(466, 42, 79, 334);
|
||||
const CefRect kExpandedSelectRect(463, 42, 81, 342);
|
||||
const CefRect kDropDivRect(8, 332, 52, 52);
|
||||
const CefRect kDragDivRect(71, 342, 30, 30);
|
||||
const int kDefaultVerticalScrollbarWidth = 14;
|
||||
|
@ -522,9 +522,6 @@ class V8RendererTest : public ClientAppRenderer::Delegate,
|
||||
|
||||
CefRefPtr<CefV8Value> value = CefV8Value::CreateObject(NULL);
|
||||
|
||||
// Exit the V8 context.
|
||||
EXPECT_TRUE(context->Exit());
|
||||
|
||||
EXPECT_TRUE(value.get());
|
||||
EXPECT_TRUE(value->IsObject());
|
||||
EXPECT_FALSE(value->GetUserData().get());
|
||||
@ -540,6 +537,9 @@ class V8RendererTest : public ClientAppRenderer::Delegate,
|
||||
EXPECT_FALSE(value->IsNull());
|
||||
EXPECT_FALSE(value->IsString());
|
||||
|
||||
// Exit the V8 context.
|
||||
EXPECT_TRUE(context->Exit());
|
||||
|
||||
DestroyTest();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user