mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 088f14a0 (#373530)
- Building on Windows now requires the Windows 10.0.10586 SDK. - Remove CefParseCSSColor which was implemented using Blink code in the browser process. This is longer advisable now that the Oilpan GC is enabled. - Avoid potential renderer process crashes by disabling script actions on the CefV8Context passed to CefRenderProcessHandler::OnContextReleased.
This commit is contained in:
@ -7,5 +7,5 @@
|
|||||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||||
|
|
||||||
{
|
{
|
||||||
'chromium_checkout': '92d77538a86529ca35f9220bd3cd512cbea1f086',
|
'chromium_checkout': '088f14a08fb102ca523424290965c04052eca325',
|
||||||
}
|
}
|
||||||
|
16
cef.gyp
16
cef.gyp
@ -862,7 +862,6 @@
|
|||||||
],
|
],
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(DEPTH)/base/base.gyp:base',
|
'<(DEPTH)/base/base.gyp:base',
|
||||||
'<(DEPTH)/base/base.gyp:base_prefs',
|
|
||||||
'<(DEPTH)/base/base.gyp:base_static',
|
'<(DEPTH)/base/base.gyp:base_static',
|
||||||
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
||||||
'<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink',
|
'<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink',
|
||||||
@ -904,6 +903,7 @@
|
|||||||
'<(DEPTH)/components/components.gyp:visitedlink_common',
|
'<(DEPTH)/components/components.gyp:visitedlink_common',
|
||||||
'<(DEPTH)/components/components.gyp:visitedlink_renderer',
|
'<(DEPTH)/components/components.gyp:visitedlink_renderer',
|
||||||
'<(DEPTH)/components/components.gyp:web_cache_renderer',
|
'<(DEPTH)/components/components.gyp:web_cache_renderer',
|
||||||
|
'<(DEPTH)/components/prefs/prefs.gyp:prefs',
|
||||||
'<(DEPTH)/components/url_formatter/url_formatter.gyp:url_formatter',
|
'<(DEPTH)/components/url_formatter/url_formatter.gyp:url_formatter',
|
||||||
'<(DEPTH)/content/content.gyp:content_app_both',
|
'<(DEPTH)/content/content.gyp:content_app_both',
|
||||||
'<(DEPTH)/content/content.gyp:content_browser',
|
'<(DEPTH)/content/content.gyp:content_browser',
|
||||||
@ -1389,8 +1389,6 @@
|
|||||||
'<(DEPTH)/components/nacl/common/nacl_constants.cc',
|
'<(DEPTH)/components/nacl/common/nacl_constants.cc',
|
||||||
'<(DEPTH)/components/nacl/common/nacl_constants.h',
|
'<(DEPTH)/components/nacl/common/nacl_constants.h',
|
||||||
# Include sources for preferences support.
|
# Include sources for preferences support.
|
||||||
'<(DEPTH)/base/prefs/testing_pref_store.cc',
|
|
||||||
'<(DEPTH)/base/prefs/testing_pref_store.h',
|
|
||||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.cc',
|
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.cc',
|
||||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.h',
|
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.h',
|
||||||
'<(DEPTH)/chrome/browser/character_encoding.cc',
|
'<(DEPTH)/chrome/browser/character_encoding.cc',
|
||||||
@ -1414,6 +1412,8 @@
|
|||||||
'<(DEPTH)/chrome/common/pref_names.h',
|
'<(DEPTH)/chrome/common/pref_names.h',
|
||||||
'<(DEPTH)/chrome/common/pref_names_util.cc',
|
'<(DEPTH)/chrome/common/pref_names_util.cc',
|
||||||
'<(DEPTH)/chrome/common/pref_names_util.h',
|
'<(DEPTH)/chrome/common/pref_names_util.h',
|
||||||
|
'<(DEPTH)/components/prefs/testing_pref_store.cc',
|
||||||
|
'<(DEPTH)/components/prefs/testing_pref_store.h',
|
||||||
# Include sources for permissions support.
|
# Include sources for permissions support.
|
||||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.h',
|
'<(DEPTH)/chrome/browser/permissions/permission_request_id.h',
|
||||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.cc',
|
'<(DEPTH)/chrome/browser/permissions/permission_request_id.cc',
|
||||||
@ -1892,11 +1892,6 @@
|
|||||||
'<@(libcef_sources_common)',
|
'<@(libcef_sources_common)',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="win" and win_use_allocator_shim==1', {
|
|
||||||
'dependencies': [
|
|
||||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'configurations': {
|
'configurations': {
|
||||||
'Debug_Base': {
|
'Debug_Base': {
|
||||||
@ -1931,11 +1926,6 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
[ '(OS=="linux" or OS=="freebsd" or OS=="openbsd") and use_allocator!="none"', {
|
|
||||||
'dependencies':[
|
|
||||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
}], # OS!="mac"
|
}], # OS!="mac"
|
||||||
|
@ -127,15 +127,6 @@ CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
|
|||||||
CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
|
CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
|
||||||
int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
|
int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
|
||||||
|
|
||||||
///
|
|
||||||
// Parses |string| which represents a CSS color value. If |strict| is true (1)
|
|
||||||
// strict parsing rules will be applied. Returns true (1) on success or false
|
|
||||||
// (0) on error. If parsing succeeds |color| will be set to the color value
|
|
||||||
// otherwise |color| will remain unchanged.
|
|
||||||
///
|
|
||||||
CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict,
|
|
||||||
cef_color_t* color);
|
|
||||||
|
|
||||||
// Parses the specified |json_string| and returns a dictionary or list
|
// Parses the specified |json_string| and returns a dictionary or list
|
||||||
// representation. If JSON parsing fails this function returns NULL.
|
// representation. If JSON parsing fails this function returns NULL.
|
||||||
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
|
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
|
||||||
|
@ -126,17 +126,6 @@ CefString CefURIDecode(const CefString& text,
|
|||||||
bool convert_to_utf8,
|
bool convert_to_utf8,
|
||||||
cef_uri_unescape_rule_t unescape_rule);
|
cef_uri_unescape_rule_t unescape_rule);
|
||||||
|
|
||||||
///
|
|
||||||
// Parses |string| which represents a CSS color value. If |strict| is true
|
|
||||||
// strict parsing rules will be applied. Returns true on success or false on
|
|
||||||
// error. If parsing succeeds |color| will be set to the color value otherwise
|
|
||||||
// |color| will remain unchanged.
|
|
||||||
///
|
|
||||||
/*--cef()--*/
|
|
||||||
bool CefParseCSSColor(const CefString& string,
|
|
||||||
bool strict,
|
|
||||||
cef_color_t& color);
|
|
||||||
|
|
||||||
// Parses the specified |json_string| and returns a dictionary or list
|
// Parses the specified |json_string| and returns a dictionary or list
|
||||||
// representation. If JSON parsing fails this method returns NULL.
|
// representation. If JSON parsing fails this method returns NULL.
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/lazy_instance.h"
|
#include "base/lazy_instance.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "chrome/browser/font_family_cache.h"
|
#include "chrome/browser/font_family_cache.h"
|
||||||
@ -29,6 +28,7 @@
|
|||||||
#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
|
#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
|
||||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||||
#include "components/guest_view/browser/guest_view_manager.h"
|
#include "components/guest_view/browser/guest_view_manager.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "components/ui/zoom/zoom_event_manager.h"
|
#include "components/ui/zoom/zoom_event_manager.h"
|
||||||
#include "components/visitedlink/browser/visitedlink_event_listener.h"
|
#include "components/visitedlink/browser/visitedlink_event_listener.h"
|
||||||
#include "components/visitedlink/browser/visitedlink_master.h"
|
#include "components/visitedlink/browser/visitedlink_master.h"
|
||||||
@ -470,10 +470,12 @@ net::URLRequestContextGetter*
|
|||||||
HostContentSettingsMap* CefBrowserContextImpl::GetHostContentSettingsMap() {
|
HostContentSettingsMap* CefBrowserContextImpl::GetHostContentSettingsMap() {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||||
if (!host_content_settings_map_.get()) {
|
if (!host_content_settings_map_.get()) {
|
||||||
// The |incognito| argument is intentionally set to false as it otherwise
|
// The |is_incognito_profile| and |is_guest_profile| arguments are
|
||||||
// limits the types of values that can be stored in the settings map (for
|
// intentionally set to false as they otherwise limit the types of values
|
||||||
// example, default values set via DefaultProvider::SetWebsiteSetting).
|
// that can be stored in the settings map (for example, default values set
|
||||||
host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
|
// via DefaultProvider::SetWebsiteSetting).
|
||||||
|
host_content_settings_map_ =
|
||||||
|
new HostContentSettingsMap(GetPrefs(), false, false);
|
||||||
|
|
||||||
// Change the default plugin policy.
|
// Change the default plugin policy.
|
||||||
const base::CommandLine* command_line =
|
const base::CommandLine* command_line =
|
||||||
|
@ -120,8 +120,7 @@ int CefBrowserMainParts::PreCreateThreads() {
|
|||||||
content::GpuDataManager::GetInstance();
|
content::GpuDataManager::GetInstance();
|
||||||
|
|
||||||
#if defined(USE_AURA)
|
#if defined(USE_AURA)
|
||||||
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
|
gfx::Screen::SetScreenInstance(views::CreateDesktopScreen());
|
||||||
views::CreateDesktopScreen());
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
#include "base/macros.h"
|
#include "base/macros.h"
|
||||||
#include "base/memory/scoped_ptr.h"
|
#include "base/memory/scoped_ptr.h"
|
||||||
#include "base/memory/scoped_vector.h"
|
#include "base/memory/scoped_vector.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/strings/string_piece.h"
|
#include "base/strings/string_piece.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "content/public/browser/browser_main_parts.h"
|
#include "content/public/browser/browser_main_parts.h"
|
||||||
#include "net/url_request/url_request_context_getter.h"
|
#include "net/url_request/url_request_context_getter.h"
|
||||||
|
|
||||||
|
@ -68,19 +68,6 @@ bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) {
|
|||||||
return (std::find(vec.begin(), vec.end(), test) != vec.end());
|
return (std::find(vec.begin(), vec.end(), test) != vec.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if falling back on an alternate, unsafe, service URL is
|
|
||||||
// allowed. In the fallback case, the security of the component update relies
|
|
||||||
// only on the integrity of the CRX payloads, which is self-validating.
|
|
||||||
// This is allowed only for some of the pre-Windows Vista versions not including
|
|
||||||
// Windows XP SP3. As a side note, pings could be sent to the alternate URL too.
|
|
||||||
bool CanUseAltUrlSource() {
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
return !base::win::MaybeHasSHA256Support();
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif // OS_WIN
|
|
||||||
}
|
|
||||||
|
|
||||||
// If there is an element of |vec| of the form |test|=.*, returns the right-
|
// If there is an element of |vec| of the form |test|=.*, returns the right-
|
||||||
// hand side of that assignment. Otherwise, returns an empty string.
|
// hand side of that assignment. Otherwise, returns an empty string.
|
||||||
// The right-hand side may contain additional '=' characters, allowing for
|
// The right-hand side may contain additional '=' characters, allowing for
|
||||||
@ -119,6 +106,7 @@ class CefConfigurator : public Configurator {
|
|||||||
std::string GetLang() const override;
|
std::string GetLang() const override;
|
||||||
std::string GetOSLongName() const override;
|
std::string GetOSLongName() const override;
|
||||||
std::string ExtraRequestParams() const override;
|
std::string ExtraRequestParams() const override;
|
||||||
|
std::string GetDownloadPreference() const override;
|
||||||
net::URLRequestContextGetter* RequestContext() const override;
|
net::URLRequestContextGetter* RequestContext() const override;
|
||||||
scoped_refptr<update_client::OutOfProcessPatcher>
|
scoped_refptr<update_client::OutOfProcessPatcher>
|
||||||
CreateOutOfProcessPatcher() const override;
|
CreateOutOfProcessPatcher() const override;
|
||||||
@ -139,7 +127,6 @@ class CefConfigurator : public Configurator {
|
|||||||
bool pings_enabled_;
|
bool pings_enabled_;
|
||||||
bool deltas_enabled_;
|
bool deltas_enabled_;
|
||||||
bool background_downloads_enabled_;
|
bool background_downloads_enabled_;
|
||||||
bool fallback_to_alt_source_url_enabled_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CefConfigurator::CefConfigurator(
|
CefConfigurator::CefConfigurator(
|
||||||
@ -149,8 +136,7 @@ CefConfigurator::CefConfigurator(
|
|||||||
fast_update_(false),
|
fast_update_(false),
|
||||||
pings_enabled_(false),
|
pings_enabled_(false),
|
||||||
deltas_enabled_(false),
|
deltas_enabled_(false),
|
||||||
background_downloads_enabled_(false),
|
background_downloads_enabled_(false) {
|
||||||
fallback_to_alt_source_url_enabled_(false) {
|
|
||||||
// Parse comma-delimited debug flags.
|
// Parse comma-delimited debug flags.
|
||||||
std::vector<std::string> switch_values = base::SplitString(
|
std::vector<std::string> switch_values = base::SplitString(
|
||||||
cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
|
cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
|
||||||
@ -179,8 +165,6 @@ CefConfigurator::CefConfigurator(
|
|||||||
|
|
||||||
if (HasSwitchValue(switch_values, kSwitchRequestParam))
|
if (HasSwitchValue(switch_values, kSwitchRequestParam))
|
||||||
extra_info_ += "testrequest=\"1\"";
|
extra_info_ += "testrequest=\"1\"";
|
||||||
|
|
||||||
fallback_to_alt_source_url_enabled_ = CanUseAltUrlSource();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CefConfigurator::InitialDelay() const {
|
int CefConfigurator::InitialDelay() const {
|
||||||
@ -209,9 +193,6 @@ std::vector<GURL> CefConfigurator::UpdateUrl() const {
|
|||||||
urls.push_back(GURL(url_source_override_));
|
urls.push_back(GURL(url_source_override_));
|
||||||
} else {
|
} else {
|
||||||
urls.push_back(GURL(kUpdaterDefaultUrl));
|
urls.push_back(GURL(kUpdaterDefaultUrl));
|
||||||
if (fallback_to_alt_source_url_enabled_) {
|
|
||||||
urls.push_back(GURL(kUpdaterAltUrl));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return urls;
|
return urls;
|
||||||
}
|
}
|
||||||
@ -262,6 +243,10 @@ std::string CefConfigurator::ExtraRequestParams() const {
|
|||||||
return extra_info_;
|
return extra_info_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CefConfigurator::GetDownloadPreference() const {
|
||||||
|
return std::string();
|
||||||
|
}
|
||||||
|
|
||||||
net::URLRequestContextGetter* CefConfigurator::RequestContext() const {
|
net::URLRequestContextGetter* CefConfigurator::RequestContext() const {
|
||||||
return url_request_getter_;
|
return url_request_getter_;
|
||||||
}
|
}
|
||||||
@ -283,7 +268,7 @@ scoped_refptr<base::SequencedTaskRunner>
|
|||||||
CefConfigurator::GetSequencedTaskRunner() const {
|
CefConfigurator::GetSequencedTaskRunner() const {
|
||||||
return content::BrowserThread::GetBlockingPool()
|
return content::BrowserThread::GetBlockingPool()
|
||||||
->GetSequencedTaskRunnerWithShutdownBehavior(
|
->GetSequencedTaskRunnerWithShutdownBehavior(
|
||||||
content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
|
base::SequencedWorkerPool::GetSequenceToken(),
|
||||||
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
|
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,10 +194,10 @@ void CefCookieManagerImpl::SetSupportedSchemes(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<std::string> scheme_set;
|
std::vector<std::string> scheme_set;
|
||||||
std::vector<CefString>::const_iterator it = schemes.begin();
|
std::vector<CefString>::const_iterator it = schemes.begin();
|
||||||
for (; it != schemes.end(); ++it)
|
for (; it != schemes.end(); ++it)
|
||||||
scheme_set.insert(*it);
|
scheme_set.push_back(*it);
|
||||||
|
|
||||||
SetSupportedSchemesInternal(scheme_set, callback);
|
SetSupportedSchemesInternal(scheme_set, callback);
|
||||||
}
|
}
|
||||||
@ -379,25 +379,18 @@ bool CefCookieManagerImpl::GetCefCookie(const GURL& url,
|
|||||||
// static
|
// static
|
||||||
void CefCookieManagerImpl::SetCookieMonsterSchemes(
|
void CefCookieManagerImpl::SetCookieMonsterSchemes(
|
||||||
net::CookieMonster* cookie_monster,
|
net::CookieMonster* cookie_monster,
|
||||||
const std::set<std::string>& schemes) {
|
const std::vector<std::string>& schemes) {
|
||||||
CEF_REQUIRE_IOT();
|
CEF_REQUIRE_IOT();
|
||||||
|
|
||||||
std::set<std::string> all_schemes = schemes;
|
std::vector<std::string> all_schemes = schemes;
|
||||||
|
|
||||||
// Add default schemes that should always support cookies.
|
// Add default schemes that should always support cookies.
|
||||||
all_schemes.insert("http");
|
all_schemes.push_back("http");
|
||||||
all_schemes.insert("https");
|
all_schemes.push_back("https");
|
||||||
all_schemes.insert("ws");
|
all_schemes.push_back("ws");
|
||||||
all_schemes.insert("wss");
|
all_schemes.push_back("wss");
|
||||||
|
|
||||||
const char** arr = new const char*[all_schemes.size()];
|
cookie_monster->SetCookieableSchemes(all_schemes);
|
||||||
std::set<std::string>::const_iterator it2 = all_schemes.begin();
|
|
||||||
for (int i = 0; it2 != all_schemes.end(); ++it2, ++i)
|
|
||||||
arr[i] = it2->c_str();
|
|
||||||
|
|
||||||
cookie_monster->SetCookieableSchemes(arr, all_schemes.size());
|
|
||||||
|
|
||||||
delete [] arr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefCookieManagerImpl::HasContext() {
|
bool CefCookieManagerImpl::HasContext() {
|
||||||
@ -454,7 +447,7 @@ void CefCookieManagerImpl::SetStoragePathWithContext(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefCookieManagerImpl::SetSupportedSchemesWithContext(
|
void CefCookieManagerImpl::SetSupportedSchemesWithContext(
|
||||||
const std::set<std::string>& schemes,
|
const std::vector<std::string>& schemes,
|
||||||
CefRefPtr<CefCompletionCallback> callback,
|
CefRefPtr<CefCompletionCallback> callback,
|
||||||
scoped_refptr<CefURLRequestContextGetterImpl> request_context) {
|
scoped_refptr<CefURLRequestContextGetterImpl> request_context) {
|
||||||
CEF_REQUIRE_IOT();
|
CEF_REQUIRE_IOT();
|
||||||
@ -483,7 +476,7 @@ void CefCookieManagerImpl::GetCookieMonsterWithContext(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefCookieManagerImpl::SetSupportedSchemesInternal(
|
void CefCookieManagerImpl::SetSupportedSchemesInternal(
|
||||||
const std::set<std::string>& schemes,
|
const std::vector<std::string>& schemes,
|
||||||
CefRefPtr<CefCompletionCallback> callback){
|
CefRefPtr<CefCompletionCallback> callback){
|
||||||
CEF_REQUIRE_IOT();
|
CEF_REQUIRE_IOT();
|
||||||
|
|
||||||
@ -553,11 +546,11 @@ void CefCookieManagerImpl::SetCookieInternal(
|
|||||||
|
|
||||||
cookie_monster->SetCookieWithDetailsAsync(
|
cookie_monster->SetCookieWithDetailsAsync(
|
||||||
url, name, value, domain, path,
|
url, name, value, domain, path,
|
||||||
|
base::Time(), // Creation time.
|
||||||
expiration_time,
|
expiration_time,
|
||||||
cookie.secure ? true : false,
|
cookie.secure ? true : false,
|
||||||
cookie.httponly ? true : false,
|
cookie.httponly ? true : false,
|
||||||
false, // First-party only.
|
false, // First-party only.
|
||||||
CefNetworkDelegate::AreExperimentalCookieFeaturesEnabled(),
|
|
||||||
CefNetworkDelegate::AreStrictSecureCookiesEnabled(),
|
CefNetworkDelegate::AreStrictSecureCookiesEnabled(),
|
||||||
net::COOKIE_PRIORITY_DEFAULT,
|
net::COOKIE_PRIORITY_DEFAULT,
|
||||||
base::Bind(SetCookieCallbackImpl, callback));
|
base::Bind(SetCookieCallbackImpl, callback));
|
||||||
@ -576,7 +569,8 @@ void CefCookieManagerImpl::DeleteCookiesInternal(
|
|||||||
base::Bind(DeleteCookiesCallbackImpl, callback));
|
base::Bind(DeleteCookiesCallbackImpl, callback));
|
||||||
} else if (cookie_name.empty()) {
|
} else if (cookie_name.empty()) {
|
||||||
// Delete all matching host cookies.
|
// Delete all matching host cookies.
|
||||||
cookie_monster->DeleteAllForHostAsync(url,
|
cookie_monster->DeleteAllCreatedBetweenForHostAsync(
|
||||||
|
base::Time(), base::Time::Max(), url,
|
||||||
base::Bind(DeleteCookiesCallbackImpl, callback));
|
base::Bind(DeleteCookiesCallbackImpl, callback));
|
||||||
} else {
|
} else {
|
||||||
// Delete all matching host and domain cookies.
|
// Delete all matching host and domain cookies.
|
||||||
|
@ -63,7 +63,7 @@ class CefCookieManagerImpl : public CefCookieManager {
|
|||||||
// Set the schemes supported by |cookie_monster|. Default schemes will always
|
// Set the schemes supported by |cookie_monster|. Default schemes will always
|
||||||
// be supported.
|
// be supported.
|
||||||
static void SetCookieMonsterSchemes(net::CookieMonster* cookie_monster,
|
static void SetCookieMonsterSchemes(net::CookieMonster* cookie_monster,
|
||||||
const std::set<std::string>& schemes);
|
const std::vector<std::string>& schemes);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Returns true if a context is or will be available.
|
// Returns true if a context is or will be available.
|
||||||
@ -82,7 +82,7 @@ class CefCookieManagerImpl : public CefCookieManager {
|
|||||||
CefRefPtr<CefCompletionCallback> callback,
|
CefRefPtr<CefCompletionCallback> callback,
|
||||||
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
||||||
void SetSupportedSchemesWithContext(
|
void SetSupportedSchemesWithContext(
|
||||||
const std::set<std::string>& schemes,
|
const std::vector<std::string>& schemes,
|
||||||
CefRefPtr<CefCompletionCallback> callback,
|
CefRefPtr<CefCompletionCallback> callback,
|
||||||
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
||||||
void GetCookieMonsterWithContext(
|
void GetCookieMonsterWithContext(
|
||||||
@ -91,7 +91,7 @@ class CefCookieManagerImpl : public CefCookieManager {
|
|||||||
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
scoped_refptr<CefURLRequestContextGetterImpl> request_context);
|
||||||
|
|
||||||
void SetSupportedSchemesInternal(
|
void SetSupportedSchemesInternal(
|
||||||
const std::set<std::string>& schemes,
|
const std::vector<std::string>& schemes,
|
||||||
CefRefPtr<CefCompletionCallback> callback);
|
CefRefPtr<CefCompletionCallback> callback);
|
||||||
void VisitAllCookiesInternal(
|
void VisitAllCookiesInternal(
|
||||||
CefRefPtr<CefCookieVisitor> visitor,
|
CefRefPtr<CefCookieVisitor> visitor,
|
||||||
@ -121,7 +121,7 @@ class CefCookieManagerImpl : public CefCookieManager {
|
|||||||
|
|
||||||
// Used for cookie monsters owned by this object.
|
// Used for cookie monsters owned by this object.
|
||||||
base::FilePath storage_path_;
|
base::FilePath storage_path_;
|
||||||
std::set<std::string> supported_schemes_;
|
std::vector<std::string> supported_schemes_;
|
||||||
scoped_refptr<net::CookieMonster> cookie_monster_;
|
scoped_refptr<net::CookieMonster> cookie_monster_;
|
||||||
|
|
||||||
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
|
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
|
||||||
|
@ -321,7 +321,7 @@ void CefDevToolsFrontend::OnURLFetchComplete(const net::URLFetcher* source) {
|
|||||||
response.SetInteger("statusCode", rh ? rh->response_code() : 200);
|
response.SetInteger("statusCode", rh ? rh->response_code() : 200);
|
||||||
response.Set("headers", headers);
|
response.Set("headers", headers);
|
||||||
|
|
||||||
void* iterator = NULL;
|
size_t iterator = 0;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string value;
|
std::string value;
|
||||||
while (rh && rh->EnumerateHeaderLines(&iterator, &name, &value))
|
while (rh && rh->EnumerateHeaderLines(&iterator, &name, &value))
|
||||||
|
@ -28,7 +28,7 @@ void CreateResponseHeadersDictionary(const net::HttpResponseHeaders* headers,
|
|||||||
if (!headers)
|
if (!headers)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
void* iter = NULL;
|
size_t iter = 0;
|
||||||
std::string header_name;
|
std::string header_name;
|
||||||
std::string header_value;
|
std::string header_value;
|
||||||
while (headers->EnumerateHeaderLines(&iter, &header_name, &header_value)) {
|
while (headers->EnumerateHeaderLines(&iter, &header_name, &header_value)) {
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#include "libcef/browser/media_capture_devices_dispatcher.h"
|
#include "libcef/browser/media_capture_devices_dispatcher.h"
|
||||||
|
|
||||||
#include "base/prefs/pref_registry_simple.h"
|
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
|
#include "components/prefs/pref_registry_simple.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/media_capture_devices.h"
|
#include "content/public/browser/media_capture_devices.h"
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
|
|||||||
|
|
||||||
// Adjust for potential display scaling.
|
// Adjust for potential display scaling.
|
||||||
gfx::Point point = gfx::Point(cr.right, cr.bottom);
|
gfx::Point point = gfx::Point(cr.right, cr.bottom);
|
||||||
float scale = gfx::Screen::GetNativeScreen()->
|
float scale = gfx::Screen::GetScreen()->
|
||||||
GetDisplayNearestPoint(point).device_scale_factor();
|
GetDisplayNearestPoint(point).device_scale_factor();
|
||||||
point = gfx::ToFlooredPoint(
|
point = gfx::ToFlooredPoint(
|
||||||
gfx::ScalePoint(gfx::PointF(point), 1.0f / scale));
|
gfx::ScalePoint(gfx::PointF(point), 1.0f / scale));
|
||||||
@ -296,8 +296,8 @@ gfx::Point CefBrowserPlatformDelegateNativeWin::GetScreenPoint(
|
|||||||
bounds_in_screen.y() + view.y());
|
bounds_in_screen.y() + view.y());
|
||||||
|
|
||||||
// Adjust for potential display scaling.
|
// Adjust for potential display scaling.
|
||||||
float scale = gfx::Screen::GetScreenFor(window)->
|
float scale = gfx::Screen::GetScreen()->
|
||||||
GetDisplayNearestWindow(window).device_scale_factor();
|
GetDisplayNearestPoint(screen_point).device_scale_factor();
|
||||||
return gfx::ToFlooredPoint(
|
return gfx::ToFlooredPoint(
|
||||||
gfx::ScalePoint(gfx::PointF(screen_point), scale));
|
gfx::ScalePoint(gfx::PointF(screen_point), scale));
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,30 @@ void CefCookieStoreProxy::SetCookieWithOptionsAsync(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefCookieStoreProxy::SetCookieWithDetailsAsync(
|
||||||
|
const GURL& url,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& value,
|
||||||
|
const std::string& domain,
|
||||||
|
const std::string& path,
|
||||||
|
const base::Time creation_time,
|
||||||
|
const base::Time expiration_time,
|
||||||
|
bool secure,
|
||||||
|
bool http_only,
|
||||||
|
bool same_site,
|
||||||
|
bool enforce_strict_secure,
|
||||||
|
net::CookiePriority priority,
|
||||||
|
const SetCookiesCallback& callback) {
|
||||||
|
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||||
|
if (cookie_store.get()) {
|
||||||
|
cookie_store->SetCookieWithDetailsAsync(url, name, value, domain, path,
|
||||||
|
creation_time, expiration_time,
|
||||||
|
secure, http_only, same_site,
|
||||||
|
enforce_strict_secure, priority,
|
||||||
|
callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CefCookieStoreProxy::GetCookiesWithOptionsAsync(
|
void CefCookieStoreProxy::GetCookiesWithOptionsAsync(
|
||||||
const GURL& url, const net::CookieOptions& options,
|
const GURL& url, const net::CookieOptions& options,
|
||||||
const GetCookiesCallback& callback) {
|
const GetCookiesCallback& callback) {
|
||||||
@ -50,6 +74,13 @@ void CefCookieStoreProxy::GetCookiesWithOptionsAsync(
|
|||||||
cookie_store->GetCookiesWithOptionsAsync(url, options, callback);
|
cookie_store->GetCookiesWithOptionsAsync(url, options, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefCookieStoreProxy::GetAllCookiesAsync(
|
||||||
|
const GetCookieListCallback& callback) {
|
||||||
|
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||||
|
if (cookie_store.get())
|
||||||
|
cookie_store->GetAllCookiesAsync(callback);
|
||||||
|
}
|
||||||
|
|
||||||
void CefCookieStoreProxy::DeleteCookieAsync(
|
void CefCookieStoreProxy::DeleteCookieAsync(
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
const std::string& cookie_name,
|
const std::string& cookie_name,
|
||||||
@ -97,6 +128,12 @@ void CefCookieStoreProxy::DeleteSessionCookiesAsync(
|
|||||||
cookie_store->DeleteSessionCookiesAsync(callback);
|
cookie_store->DeleteSessionCookiesAsync(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefCookieStoreProxy::FlushStore(const base::Closure& callback) {
|
||||||
|
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||||
|
if (cookie_store.get())
|
||||||
|
cookie_store->FlushStore(callback);
|
||||||
|
}
|
||||||
|
|
||||||
net::CookieMonster* CefCookieStoreProxy::GetCookieMonster() {
|
net::CookieMonster* CefCookieStoreProxy::GetCookieMonster() {
|
||||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||||
if (cookie_store.get())
|
if (cookie_store.get())
|
||||||
|
@ -30,9 +30,24 @@ class CefCookieStoreProxy : public net::CookieStore {
|
|||||||
const std::string& cookie_line,
|
const std::string& cookie_line,
|
||||||
const net::CookieOptions& options,
|
const net::CookieOptions& options,
|
||||||
const SetCookiesCallback& callback) override;
|
const SetCookiesCallback& callback) override;
|
||||||
|
void SetCookieWithDetailsAsync(
|
||||||
|
const GURL& url,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& value,
|
||||||
|
const std::string& domain,
|
||||||
|
const std::string& path,
|
||||||
|
const base::Time creation_time,
|
||||||
|
const base::Time expiration_time,
|
||||||
|
bool secure,
|
||||||
|
bool http_only,
|
||||||
|
bool same_site,
|
||||||
|
bool enforce_strict_secure,
|
||||||
|
net::CookiePriority priority,
|
||||||
|
const SetCookiesCallback& callback) override;
|
||||||
void GetCookiesWithOptionsAsync(
|
void GetCookiesWithOptionsAsync(
|
||||||
const GURL& url, const net::CookieOptions& options,
|
const GURL& url, const net::CookieOptions& options,
|
||||||
const GetCookiesCallback& callback) override;
|
const GetCookiesCallback& callback) override;
|
||||||
|
void GetAllCookiesAsync(const GetCookieListCallback& callback) override;
|
||||||
void DeleteCookieAsync(const GURL& url,
|
void DeleteCookieAsync(const GURL& url,
|
||||||
const std::string& cookie_name,
|
const std::string& cookie_name,
|
||||||
const base::Closure& callback) override;
|
const base::Closure& callback) override;
|
||||||
@ -48,6 +63,7 @@ class CefCookieStoreProxy : public net::CookieStore {
|
|||||||
const GURL& url,
|
const GURL& url,
|
||||||
const DeleteCallback& callback) override;
|
const DeleteCallback& callback) override;
|
||||||
void DeleteSessionCookiesAsync(const DeleteCallback& callback) override;
|
void DeleteSessionCookiesAsync(const DeleteCallback& callback) override;
|
||||||
|
void FlushStore(const base::Closure& callback) override;
|
||||||
net::CookieMonster* GetCookieMonster() override;
|
net::CookieMonster* GetCookieMonster() override;
|
||||||
scoped_ptr<CookieChangedSubscription> AddCallbackForCookie(
|
scoped_ptr<CookieChangedSubscription> AddCallbackForCookie(
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
|
@ -379,10 +379,6 @@ void CefResourceRequestJob::SendHeaders() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefResourceRequestJob::AddCookieHeaderAndStart() {
|
void CefResourceRequestJob::AddCookieHeaderAndStart() {
|
||||||
// No matter what, we want to report our status as IO pending since we will
|
|
||||||
// be notifying our consumer asynchronously via OnStartCompleted.
|
|
||||||
SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
|
|
||||||
|
|
||||||
// If the request was destroyed, then there is no more work to do.
|
// If the request was destroyed, then there is no more work to do.
|
||||||
if (!request_)
|
if (!request_)
|
||||||
return;
|
return;
|
||||||
@ -484,7 +480,6 @@ net::HttpResponseHeaders* CefResourceRequestJob::GetResponseHeaders() {
|
|||||||
|
|
||||||
void CefResourceRequestJob::SaveCookiesAndNotifyHeadersComplete() {
|
void CefResourceRequestJob::SaveCookiesAndNotifyHeadersComplete() {
|
||||||
if (request_->load_flags() & net::LOAD_DO_NOT_SAVE_COOKIES) {
|
if (request_->load_flags() & net::LOAD_DO_NOT_SAVE_COOKIES) {
|
||||||
SetStatus(URLRequestStatus()); // Clear the IO_PENDING status
|
|
||||||
NotifyHeadersComplete();
|
NotifyHeadersComplete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -502,15 +497,10 @@ void CefResourceRequestJob::SaveNextCookie() {
|
|||||||
if (response_cookies_save_index_ == response_cookies_.size()) {
|
if (response_cookies_save_index_ == response_cookies_.size()) {
|
||||||
response_cookies_.clear();
|
response_cookies_.clear();
|
||||||
response_cookies_save_index_ = 0;
|
response_cookies_save_index_ = 0;
|
||||||
SetStatus(URLRequestStatus()); // Clear the IO_PENDING status
|
|
||||||
NotifyHeadersComplete();
|
NotifyHeadersComplete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No matter what, we want to report our status as IO pending since we will
|
|
||||||
// be notifying our consumer asynchronously via OnStartCompleted.
|
|
||||||
SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
|
|
||||||
|
|
||||||
net::CookieOptions options;
|
net::CookieOptions options;
|
||||||
options.set_include_httponly();
|
options.set_include_httponly();
|
||||||
bool can_set_cookie = CanSetCookie(
|
bool can_set_cookie = CanSetCookie(
|
||||||
@ -555,7 +545,7 @@ void CefResourceRequestJob::FetchResponseCookies(
|
|||||||
const std::string name = "Set-Cookie";
|
const std::string name = "Set-Cookie";
|
||||||
std::string value;
|
std::string value;
|
||||||
|
|
||||||
void* iter = NULL;
|
size_t iter = 0;
|
||||||
net::HttpResponseHeaders* headers = GetResponseHeaders();
|
net::HttpResponseHeaders* headers = GetResponseHeaders();
|
||||||
while (headers->EnumerateHeader(&iter, name, &value)) {
|
while (headers->EnumerateHeader(&iter, name, &value)) {
|
||||||
if (!value.empty())
|
if (!value.empty())
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
@ -27,6 +26,7 @@
|
|||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "chrome/browser/net/proxy_service_factory.h"
|
#include "chrome/browser/net/proxy_service_factory.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/common/content_client.h"
|
#include "content/public/common/content_client.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
@ -347,7 +347,7 @@ void CefURLRequestContextGetterImpl::SetCookieStoragePath(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefURLRequestContextGetterImpl::SetCookieSupportedSchemes(
|
void CefURLRequestContextGetterImpl::SetCookieSupportedSchemes(
|
||||||
const std::set<std::string>& schemes) {
|
const std::vector<std::string>& schemes) {
|
||||||
CEF_REQUIRE_IOT();
|
CEF_REQUIRE_IOT();
|
||||||
|
|
||||||
cookie_supported_schemes_ = schemes;
|
cookie_supported_schemes_ = schemes;
|
||||||
|
@ -63,7 +63,7 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter {
|
|||||||
|
|
||||||
void SetCookieStoragePath(const base::FilePath& path,
|
void SetCookieStoragePath(const base::FilePath& path,
|
||||||
bool persist_session_cookies);
|
bool persist_session_cookies);
|
||||||
void SetCookieSupportedSchemes(const std::set<std::string>& schemes);
|
void SetCookieSupportedSchemes(const std::vector<std::string>& schemes);
|
||||||
|
|
||||||
// Keep a reference to all handlers sharing this context so that they'll be
|
// Keep a reference to all handlers sharing this context so that they'll be
|
||||||
// kept alive until the context is destroyed.
|
// kept alive until the context is destroyed.
|
||||||
@ -97,7 +97,7 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter {
|
|||||||
content::URLRequestInterceptorScopedVector request_interceptors_;
|
content::URLRequestInterceptorScopedVector request_interceptors_;
|
||||||
|
|
||||||
base::FilePath cookie_store_path_;
|
base::FilePath cookie_store_path_;
|
||||||
std::set<std::string> cookie_supported_schemes_;
|
std::vector<std::string> cookie_supported_schemes_;
|
||||||
|
|
||||||
std::vector<CefRefPtr<CefRequestContextHandler> > handler_list_;
|
std::vector<CefRefPtr<CefRequestContextHandler> > handler_list_;
|
||||||
|
|
||||||
|
@ -51,6 +51,9 @@
|
|||||||
// Underline information of the |markedText_|.
|
// Underline information of the |markedText_|.
|
||||||
std::vector<blink::WebCompositionUnderline> underlines_;
|
std::vector<blink::WebCompositionUnderline> underlines_;
|
||||||
|
|
||||||
|
// Replacement range information received from |setMarkedText:|.
|
||||||
|
gfx::Range setMarkedTextReplacementRange_;
|
||||||
|
|
||||||
// Indicates if doCommandBySelector method receives any edit command when
|
// Indicates if doCommandBySelector method receives any edit command when
|
||||||
// handling a key down event.
|
// handling a key down event.
|
||||||
BOOL hasEditCommands_;
|
BOOL hasEditCommands_;
|
||||||
|
@ -165,10 +165,12 @@ extern "C" {
|
|||||||
// is empty to update the input method state. (Our input method backend can
|
// is empty to update the input method state. (Our input method backend can
|
||||||
// automatically cancels an ongoing composition when we send an empty text.
|
// automatically cancels an ongoing composition when we send an empty text.
|
||||||
// So, it is OK to send an empty text to the renderer.)
|
// So, it is OK to send an empty text to the renderer.)
|
||||||
if (!handlingKeyDown_) {
|
if (handlingKeyDown_) {
|
||||||
|
setMarkedTextReplacementRange_ = gfx::Range(replacementRange);
|
||||||
|
} else if (!handlingKeyDown_) {
|
||||||
renderWidgetHostView_->render_widget_host()->ImeSetComposition(
|
renderWidgetHostView_->render_widget_host()->ImeSetComposition(
|
||||||
markedText_, underlines_, newSelRange.location,
|
markedText_, underlines_, gfx::Range(replacementRange),
|
||||||
NSMaxRange(newSelRange));
|
newSelRange.location, NSMaxRange(newSelRange));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,6 +317,7 @@ extern "C" {
|
|||||||
textToBeInserted_.clear();
|
textToBeInserted_.clear();
|
||||||
markedText_.clear();
|
markedText_.clear();
|
||||||
underlines_.clear();
|
underlines_.clear();
|
||||||
|
setMarkedTextReplacementRange_ = gfx::Range::InvalidRange();
|
||||||
unmarkTextCalled_ = NO;
|
unmarkTextCalled_ = NO;
|
||||||
hasEditCommands_ = NO;
|
hasEditCommands_ = NO;
|
||||||
editCommands_.clear();
|
editCommands_.clear();
|
||||||
@ -362,8 +365,8 @@ extern "C" {
|
|||||||
// When marked text is available, |selectedRange_| will be the range being
|
// When marked text is available, |selectedRange_| will be the range being
|
||||||
// selected inside the marked text.
|
// selected inside the marked text.
|
||||||
renderWidgetHostView_->render_widget_host()->ImeSetComposition(
|
renderWidgetHostView_->render_widget_host()->ImeSetComposition(
|
||||||
markedText_, underlines_, selectedRange_.location,
|
markedText_, underlines_, setMarkedTextReplacementRange_,
|
||||||
NSMaxRange(selectedRange_));
|
selectedRange_.location, NSMaxRange(selectedRange_));
|
||||||
} else if (oldHasMarkedText_ && !hasMarkedText_ && !textInserted) {
|
} else if (oldHasMarkedText_ && !hasMarkedText_ && !textInserted) {
|
||||||
if (unmarkTextCalled_) {
|
if (unmarkTextCalled_) {
|
||||||
renderWidgetHostView_->render_widget_host()->ImeConfirmComposition(
|
renderWidgetHostView_->render_widget_host()->ImeConfirmComposition(
|
||||||
@ -372,6 +375,8 @@ extern "C" {
|
|||||||
renderWidgetHostView_->render_widget_host()->ImeCancelComposition();
|
renderWidgetHostView_->render_widget_host()->ImeCancelComposition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setMarkedTextReplacementRange_ = gfx::Range::InvalidRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cancelComposition {
|
- (void)cancelComposition {
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/macros.h"
|
#include "base/macros.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#if defined(OS_CHROMEOS)
|
#if defined(OS_CHROMEOS)
|
||||||
#include "chromeos/cryptohome/system_salt_getter.h"
|
#include "chromeos/cryptohome/system_salt_getter.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "components/pref_registry/pref_registry_syncable.h"
|
#include "components/pref_registry/pref_registry_syncable.h"
|
||||||
#include "components/user_prefs/user_prefs.h"
|
#include "components/user_prefs/user_prefs.h"
|
||||||
#include "content/public/browser/browser_context.h"
|
#include "content/public/browser/browser_context.h"
|
||||||
|
@ -24,11 +24,11 @@ PermissionStatus ContentSettingToPermissionStatus(ContentSetting setting) {
|
|||||||
switch (setting) {
|
switch (setting) {
|
||||||
case CONTENT_SETTING_ALLOW:
|
case CONTENT_SETTING_ALLOW:
|
||||||
case CONTENT_SETTING_SESSION_ONLY:
|
case CONTENT_SETTING_SESSION_ONLY:
|
||||||
return content::PERMISSION_STATUS_GRANTED;
|
return content::PermissionStatus::GRANTED;
|
||||||
case CONTENT_SETTING_BLOCK:
|
case CONTENT_SETTING_BLOCK:
|
||||||
return content::PERMISSION_STATUS_DENIED;
|
return content::PermissionStatus::DENIED;
|
||||||
case CONTENT_SETTING_ASK:
|
case CONTENT_SETTING_ASK:
|
||||||
return content::PERMISSION_STATUS_ASK;
|
return content::PermissionStatus::ASK;
|
||||||
case CONTENT_SETTING_DETECT_IMPORTANT_CONTENT:
|
case CONTENT_SETTING_DETECT_IMPORTANT_CONTENT:
|
||||||
case CONTENT_SETTING_DEFAULT:
|
case CONTENT_SETTING_DEFAULT:
|
||||||
case CONTENT_SETTING_NUM_SETTINGS:
|
case CONTENT_SETTING_NUM_SETTINGS:
|
||||||
@ -36,17 +36,17 @@ PermissionStatus ContentSettingToPermissionStatus(ContentSetting setting) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
return content::PERMISSION_STATUS_DENIED;
|
return content::PermissionStatus::DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method to convert PermissionStatus to ContentSetting.
|
// Helper method to convert PermissionStatus to ContentSetting.
|
||||||
ContentSetting PermissionStatusToContentSetting(PermissionStatus status) {
|
ContentSetting PermissionStatusToContentSetting(PermissionStatus status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case content::PERMISSION_STATUS_GRANTED:
|
case content::PermissionStatus::GRANTED:
|
||||||
return CONTENT_SETTING_ALLOW;
|
return CONTENT_SETTING_ALLOW;
|
||||||
case content::PERMISSION_STATUS_DENIED:
|
case content::PermissionStatus::DENIED:
|
||||||
return CONTENT_SETTING_BLOCK;
|
return CONTENT_SETTING_BLOCK;
|
||||||
case content::PERMISSION_STATUS_ASK:
|
case content::PermissionStatus::ASK:
|
||||||
return CONTENT_SETTING_ASK;
|
return CONTENT_SETTING_ASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class CefPermissionManager::PendingRequest {
|
|||||||
render_frame_id_(render_frame_host->GetRoutingID()),
|
render_frame_id_(render_frame_host->GetRoutingID()),
|
||||||
callback_(callback),
|
callback_(callback),
|
||||||
permissions_(permissions),
|
permissions_(permissions),
|
||||||
results_(permissions.size(), content::PERMISSION_STATUS_DENIED),
|
results_(permissions.size(), content::PermissionStatus::DENIED),
|
||||||
remaining_results_(permissions.size()) {
|
remaining_results_(permissions.size()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ PermissionStatus CefPermissionManager::GetPermissionStatus(
|
|||||||
return GetPermissionStatusForConstantPermission(permission);
|
return GetPermissionStatusForConstantPermission(permission);
|
||||||
|
|
||||||
if (!context_.SupportsPermission(permission))
|
if (!context_.SupportsPermission(permission))
|
||||||
return content::PERMISSION_STATUS_DENIED;
|
return content::PermissionStatus::DENIED;
|
||||||
|
|
||||||
return ContentSettingToPermissionStatus(
|
return ContentSettingToPermissionStatus(
|
||||||
context_.GetPermissionStatus(permission, requesting_origin,
|
context_.GetPermissionStatus(permission, requesting_origin,
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/prefs/pref_member.h"
|
|
||||||
#include "base/sequenced_task_runner_helpers.h"
|
#include "base/sequenced_task_runner_helpers.h"
|
||||||
#include "chrome/browser/plugins/plugin_metadata.h"
|
#include "chrome/browser/plugins/plugin_metadata.h"
|
||||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||||
#include "components/content_settings/core/common/content_settings.h"
|
#include "components/content_settings/core/common/content_settings.h"
|
||||||
|
#include "components/prefs/pref_member.h"
|
||||||
#include "content/public/browser/browser_message_filter.h"
|
#include "content/public/browser/browser_message_filter.h"
|
||||||
|
|
||||||
class CefBrowserContext;
|
class CefBrowserContext;
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/prefs/json_pref_store.h"
|
|
||||||
#include "base/prefs/pref_filter.h"
|
|
||||||
#include "base/prefs/pref_registry_simple.h"
|
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/prefs/pref_service_factory.h"
|
|
||||||
#include "base/prefs/testing_pref_store.h"
|
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "chrome/browser/prefs/command_line_pref_store.h"
|
#include "chrome/browser/prefs/command_line_pref_store.h"
|
||||||
#include "chrome/common/chrome_switches.h"
|
#include "chrome/common/chrome_switches.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||||
|
#include "components/prefs/json_pref_store.h"
|
||||||
|
#include "components/prefs/pref_filter.h"
|
||||||
|
#include "components/prefs/pref_registry_simple.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
|
#include "components/prefs/pref_service_factory.h"
|
||||||
|
#include "components/prefs/testing_pref_store.h"
|
||||||
#include "components/pref_registry/pref_registry_syncable.h"
|
#include "components/pref_registry/pref_registry_syncable.h"
|
||||||
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
|
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
|
||||||
#include "components/proxy_config/proxy_config_dictionary.h"
|
#include "components/proxy_config/proxy_config_dictionary.h"
|
||||||
@ -87,7 +87,7 @@ scoped_ptr<PrefService> CreatePrefService(const base::FilePath& pref_path) {
|
|||||||
const base::CommandLine* command_line =
|
const base::CommandLine* command_line =
|
||||||
base::CommandLine::ForCurrentProcess();
|
base::CommandLine::ForCurrentProcess();
|
||||||
|
|
||||||
base::PrefServiceFactory factory;
|
PrefServiceFactory factory;
|
||||||
|
|
||||||
// Used to store command-line preferences, most of which will be evaluated in
|
// Used to store command-line preferences, most of which will be evaluated in
|
||||||
// the CommandLinePrefStore constructor. Preferences set in this manner cannot
|
// the CommandLinePrefStore constructor. Preferences set in this manner cannot
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
#include "libcef/common/extensions/extensions_util.h"
|
#include "libcef/common/extensions/extensions_util.h"
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/prefs/pref_store.h"
|
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||||
#include "chrome/browser/character_encoding.h"
|
#include "chrome/browser/character_encoding.h"
|
||||||
@ -25,6 +23,8 @@
|
|||||||
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
|
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
|
||||||
#include "chrome/common/chrome_switches.h"
|
#include "chrome/common/chrome_switches.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
|
#include "components/prefs/pref_store.h"
|
||||||
#include "components/pref_registry/pref_registry_syncable.h"
|
#include "components/pref_registry/pref_registry_syncable.h"
|
||||||
#include "content/public/browser/render_process_host.h"
|
#include "content/public/browser/render_process_host.h"
|
||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/location.h"
|
#include "base/location.h"
|
||||||
#include "base/memory/scoped_ptr.h"
|
#include "base/memory/scoped_ptr.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/single_thread_task_runner.h"
|
#include "base/single_thread_task_runner.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/thread_task_runner_handle.h"
|
#include "base/thread_task_runner_handle.h"
|
||||||
@ -24,6 +23,7 @@
|
|||||||
#include "chrome/browser/printing/printer_query.h"
|
#include "chrome/browser/printing/printer_query.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#include "chrome/grit/generated_resources.h"
|
#include "chrome/grit/generated_resources.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "components/printing/common/print_messages.h"
|
#include "components/printing/common/print_messages.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/notification_details.h"
|
#include "content/public/browser/notification_details.h"
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
#include "base/macros.h"
|
#include "base/macros.h"
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "base/prefs/pref_member.h"
|
|
||||||
#include "base/strings/string16.h"
|
#include "base/strings/string16.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
#include "components/prefs/pref_member.h"
|
||||||
#include "components/printing/browser/print_manager.h"
|
#include "components/printing/browser/print_manager.h"
|
||||||
#include "content/public/browser/notification_observer.h"
|
#include "content/public/browser/notification_observer.h"
|
||||||
#include "content/public/browser/notification_registrar.h"
|
#include "content/public/browser/notification_registrar.h"
|
||||||
|
@ -43,9 +43,6 @@ void PrintingMessageFilter::OverrideThreadForMessage(
|
|||||||
bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||||
bool handled = true;
|
bool handled = true;
|
||||||
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilter, message)
|
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilter, message)
|
||||||
#if defined(OS_WIN)
|
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_DuplicateSection, OnDuplicateSection)
|
|
||||||
#endif
|
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
|
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
|
||||||
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
|
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
|
||||||
OnGetDefaultPrintSettings)
|
OnGetDefaultPrintSettings)
|
||||||
@ -58,18 +55,6 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
|||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
void PrintingMessageFilter::OnDuplicateSection(
|
|
||||||
base::SharedMemoryHandle renderer_handle,
|
|
||||||
base::SharedMemoryHandle* browser_handle) {
|
|
||||||
// Duplicate the handle in this process right now so the memory is kept alive
|
|
||||||
// (even if it is not mapped)
|
|
||||||
base::SharedMemory shared_buf(renderer_handle, true, PeerHandle());
|
|
||||||
shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), browser_handle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void PrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
void PrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||||
*is_enabled = true;
|
*is_enabled = true;
|
||||||
|
@ -49,12 +49,6 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
|||||||
private:
|
private:
|
||||||
~PrintingMessageFilter() override;
|
~PrintingMessageFilter() override;
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
// Used to pass resulting EMF from renderer to browser in printing.
|
|
||||||
void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
|
|
||||||
base::SharedMemoryHandle* browser_handle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// GetPrintSettingsForRenderView must be called via PostTask and
|
// GetPrintSettingsForRenderView must be called via PostTask and
|
||||||
// base::Bind. Collapse the settings-specific params into a
|
// base::Bind. Collapse the settings-specific params into a
|
||||||
// struct to avoid running into issues with too many params
|
// struct to avoid running into issues with too many params
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
#include "base/atomic_sequence_num.h"
|
#include "base/atomic_sequence_num.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/prefs/pref_service.h"
|
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
#include "content/public/browser/plugin_service.h"
|
#include "content/public/browser/plugin_service.h"
|
||||||
|
|
||||||
using content::BrowserThread;
|
using content::BrowserThread;
|
||||||
|
@ -14,7 +14,7 @@ namespace IPC {
|
|||||||
template <>
|
template <>
|
||||||
struct ParamTraits<net::UploadElement> {
|
struct ParamTraits<net::UploadElement> {
|
||||||
typedef net::UploadElement param_type;
|
typedef net::UploadElement param_type;
|
||||||
static void Write(Message* m, const param_type& p) {
|
static void Write(base::Pickle* m, const param_type& p) {
|
||||||
WriteParam(m, static_cast<int>(p.type()));
|
WriteParam(m, static_cast<int>(p.type()));
|
||||||
switch (p.type()) {
|
switch (p.type()) {
|
||||||
case net::UploadElement::TYPE_BYTES: {
|
case net::UploadElement::TYPE_BYTES: {
|
||||||
@ -31,7 +31,7 @@ struct ParamTraits<net::UploadElement> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static bool Read(const Message* m,
|
static bool Read(const base::Pickle* m,
|
||||||
base::PickleIterator* iter,
|
base::PickleIterator* iter,
|
||||||
param_type* r) {
|
param_type* r) {
|
||||||
int type;
|
int type;
|
||||||
@ -71,7 +71,7 @@ struct ParamTraits<net::UploadElement> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void ParamTraits<scoped_refptr<net::UploadData> >::Write(Message* m,
|
void ParamTraits<scoped_refptr<net::UploadData> >::Write(base::Pickle* m,
|
||||||
const param_type& p) {
|
const param_type& p) {
|
||||||
WriteParam(m, p.get() != NULL);
|
WriteParam(m, p.get() != NULL);
|
||||||
if (p.get()) {
|
if (p.get()) {
|
||||||
@ -83,7 +83,7 @@ void ParamTraits<scoped_refptr<net::UploadData> >::Write(Message* m,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ParamTraits<scoped_refptr<net::UploadData> >::Read(
|
bool ParamTraits<scoped_refptr<net::UploadData> >::Read(
|
||||||
const Message* m,
|
const base::Pickle* m,
|
||||||
base::PickleIterator* iter,
|
base::PickleIterator* iter,
|
||||||
param_type* r) {
|
param_type* r) {
|
||||||
bool has_object;
|
bool has_object;
|
||||||
|
@ -41,8 +41,9 @@ namespace IPC {
|
|||||||
template <>
|
template <>
|
||||||
struct ParamTraits<scoped_refptr<net::UploadData> > {
|
struct ParamTraits<scoped_refptr<net::UploadData> > {
|
||||||
typedef scoped_refptr<net::UploadData> param_type;
|
typedef scoped_refptr<net::UploadData> param_type;
|
||||||
static void Write(Message* m, const param_type& p);
|
static void Write(base::Pickle* m, const param_type& p);
|
||||||
static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
|
static bool Read(const base::Pickle* m, base::PickleIterator* iter,
|
||||||
|
param_type* r);
|
||||||
static void Log(const param_type& p, std::string* l);
|
static void Log(const param_type& p, std::string* l);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -415,9 +415,7 @@ gfx::Image CefContentClient::GetImageNamed(int resource_id) {
|
|||||||
return gfx::Image();
|
return gfx::Image();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Image CefContentClient::GetNativeImageNamed(
|
gfx::Image CefContentClient::GetNativeImageNamed(int resource_id) {
|
||||||
int resource_id,
|
|
||||||
ui::ResourceBundle::ImageRTL rtl) {
|
|
||||||
return gfx::Image();
|
return gfx::Image();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,9 +92,7 @@ class CefContentClient : public content::ContentClient,
|
|||||||
const base::FilePath& pack_path,
|
const base::FilePath& pack_path,
|
||||||
const std::string& locale) override;
|
const std::string& locale) override;
|
||||||
gfx::Image GetImageNamed(int resource_id) override;
|
gfx::Image GetImageNamed(int resource_id) override;
|
||||||
gfx::Image GetNativeImageNamed(
|
gfx::Image GetNativeImageNamed(int resource_id) override;
|
||||||
int resource_id,
|
|
||||||
ui::ResourceBundle::ImageRTL rtl) override;
|
|
||||||
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||||
int resource_id,
|
int resource_id,
|
||||||
ui::ScaleFactor scale_factor) override;
|
ui::ScaleFactor scale_factor) override;
|
||||||
|
@ -5,14 +5,12 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "include/cef_parser.h"
|
#include "include/cef_parser.h"
|
||||||
#include "libcef/renderer/webkit_glue.h"
|
|
||||||
|
|
||||||
#include "base/base64.h"
|
#include "base/base64.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "components/url_formatter/elide_url.h"
|
#include "components/url_formatter/elide_url.h"
|
||||||
#include "net/base/escape.h"
|
#include "net/base/escape.h"
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "third_party/WebKit/public/platform/WebString.h"
|
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
|
|
||||||
bool CefParseURL(const CefString& url,
|
bool CefParseURL(const CefString& url,
|
||||||
@ -139,13 +137,3 @@ CefString CefURIDecode(const CefString& text,
|
|||||||
else
|
else
|
||||||
return net::UnescapeURLComponent(text.ToString(), type);
|
return net::UnescapeURLComponent(text.ToString(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefParseCSSColor(const CefString& string,
|
|
||||||
bool strict,
|
|
||||||
cef_color_t& color) {
|
|
||||||
// Blink types depend on PartitionAlloc. Safe to call multiple times.
|
|
||||||
webkit_glue::InitializePartitionAlloc();
|
|
||||||
|
|
||||||
return webkit_glue::ParseCSSColor(
|
|
||||||
blink::WebString::fromUTF8(string.ToString().data()), strict, color);
|
|
||||||
}
|
|
||||||
|
@ -157,7 +157,7 @@ void CefResponseImpl::SetResponseHeaders(
|
|||||||
|
|
||||||
header_map_.empty();
|
header_map_.empty();
|
||||||
|
|
||||||
void* iter = NULL;
|
size_t iter = 0;
|
||||||
std::string name, value;
|
std::string name, value;
|
||||||
while (headers.EnumerateHeaderLines(&iter, &name, &value))
|
while (headers.EnumerateHeaderLines(&iter, &name, &value))
|
||||||
header_map_.insert(std::make_pair(name, value));
|
header_map_.insert(std::make_pair(name, value));
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
#include "ipc/ipc_sync_channel.h"
|
#include "ipc/ipc_sync_channel.h"
|
||||||
#include "media/base/media.h"
|
#include "media/base/media.h"
|
||||||
#include "printing/print_settings.h"
|
#include "printing/print_settings.h"
|
||||||
|
#include "third_party/WebKit/public/platform/URLConversion.h"
|
||||||
#include "third_party/WebKit/public/platform/WebPrerenderingSupport.h"
|
#include "third_party/WebKit/public/platform/WebPrerenderingSupport.h"
|
||||||
#include "third_party/WebKit/public/platform/WebString.h"
|
#include "third_party/WebKit/public/platform/WebString.h"
|
||||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||||
@ -498,8 +499,8 @@ bool CefContentRendererClient::OverrideCreatePlugin(
|
|||||||
CefViewHostMsg_GetPluginInfo_Output output;
|
CefViewHostMsg_GetPluginInfo_Output output;
|
||||||
blink::WebString top_origin = frame->top()->securityOrigin().toString();
|
blink::WebString top_origin = frame->top()->securityOrigin().toString();
|
||||||
render_frame->Send(new CefViewHostMsg_GetPluginInfo(
|
render_frame->Send(new CefViewHostMsg_GetPluginInfo(
|
||||||
render_frame->GetRoutingID(), url, GURL(top_origin), orig_mime_type,
|
render_frame->GetRoutingID(), url, blink::WebStringToGURL(top_origin),
|
||||||
&output));
|
orig_mime_type, &output));
|
||||||
|
|
||||||
*plugin = CreatePlugin(render_frame, frame, params, output);
|
*plugin = CreatePlugin(render_frame, frame, params, output);
|
||||||
return true;
|
return true;
|
||||||
|
@ -78,7 +78,7 @@ static void AddPepperBasedWidevine(
|
|||||||
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
||||||
Version glibc_version(gnu_get_libc_version());
|
Version glibc_version(gnu_get_libc_version());
|
||||||
DCHECK(glibc_version.IsValid());
|
DCHECK(glibc_version.IsValid());
|
||||||
if (glibc_version.IsOlderThan(WIDEVINE_CDM_MIN_GLIBC_VERSION))
|
if (glibc_version < base::Version(WIDEVINE_CDM_MIN_GLIBC_VERSION))
|
||||||
return;
|
return;
|
||||||
#endif // defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
#endif // defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "content/public/renderer/render_frame.h"
|
#include "content/public/renderer/render_frame.h"
|
||||||
#include "content/public/renderer/render_thread.h"
|
#include "content/public/renderer/render_thread.h"
|
||||||
#include "gin/object_template_builder.h"
|
#include "gin/object_template_builder.h"
|
||||||
|
#include "third_party/WebKit/public/platform/URLConversion.h"
|
||||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||||
#include "third_party/WebKit/public/web/WebInputEvent.h"
|
#include "third_party/WebKit/public/web/WebInputEvent.h"
|
||||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||||
@ -181,7 +182,7 @@ void CefPluginPlaceholder::PluginListChanged() {
|
|||||||
render_frame()->Send(
|
render_frame()->Send(
|
||||||
new CefViewHostMsg_GetPluginInfo(routing_id(),
|
new CefViewHostMsg_GetPluginInfo(routing_id(),
|
||||||
GURL(GetPluginParams().url),
|
GURL(GetPluginParams().url),
|
||||||
GURL(top_origin),
|
blink::WebStringToGURL(top_origin),
|
||||||
mime_type,
|
mime_type,
|
||||||
&output));
|
&output));
|
||||||
if (output.status == status_)
|
if (output.status == status_)
|
||||||
|
@ -77,8 +77,11 @@ void CefRenderFrameObserver::WillReleaseScriptContext(
|
|||||||
|
|
||||||
v8::Isolate* isolate = blink::mainThreadIsolate();
|
v8::Isolate* isolate = blink::mainThreadIsolate();
|
||||||
v8::HandleScope handle_scope(isolate);
|
v8::HandleScope handle_scope(isolate);
|
||||||
v8::Context::Scope scope(context);
|
|
||||||
blink::V8RecursionScope recursion_scope(isolate);
|
// The released context should not be used for script execution.
|
||||||
|
// Depending on how the context is released this may or may not already
|
||||||
|
// be set.
|
||||||
|
blink::ScriptForbiddenScope forbidScript;
|
||||||
|
|
||||||
CefRefPtr<CefV8Context> contextPtr(
|
CefRefPtr<CefV8Context> contextPtr(
|
||||||
new CefV8ContextImpl(isolate, context));
|
new CefV8ContextImpl(isolate, context));
|
||||||
|
@ -394,9 +394,82 @@ class V8TrackString : public CefTrackNode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Object wrapped in a v8::External and passed as the Data argument to
|
||||||
|
// v8::FunctionTemplate::New.
|
||||||
|
class V8FunctionData {
|
||||||
|
public:
|
||||||
|
static v8::Local<v8::External> Create(v8::Isolate* isolate,
|
||||||
|
const CefString& function_name,
|
||||||
|
CefV8Handler* handler) {
|
||||||
|
// |data| will be deleted if/when the returned v8::External is GC'd.
|
||||||
|
V8FunctionData* data = new V8FunctionData(isolate, function_name, handler);
|
||||||
|
return data->CreateExternal();
|
||||||
|
}
|
||||||
|
|
||||||
|
static V8FunctionData* Unwrap(v8::Local<v8::Value> data) {
|
||||||
|
DCHECK(data->IsExternal());
|
||||||
|
return static_cast<V8FunctionData*>(v8::External::Cast(*data)->Value());
|
||||||
|
}
|
||||||
|
|
||||||
|
CefString function_name() const {
|
||||||
|
return function_name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
CefV8Handler* handler() const {
|
||||||
|
return handler_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
V8FunctionData(v8::Isolate* isolate,
|
||||||
|
const CefString& function_name,
|
||||||
|
CefV8Handler* handler)
|
||||||
|
: isolate_(isolate),
|
||||||
|
function_name_(function_name),
|
||||||
|
handler_(handler) {
|
||||||
|
DCHECK(isolate_);
|
||||||
|
DCHECK(handler_);
|
||||||
|
}
|
||||||
|
|
||||||
|
~V8FunctionData() {
|
||||||
|
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
||||||
|
-static_cast<int>(sizeof(V8FunctionData)));
|
||||||
|
}
|
||||||
|
|
||||||
|
v8::Local<v8::External> CreateExternal() {
|
||||||
|
v8::Local<v8::External> external = v8::External::New(isolate_, this);
|
||||||
|
|
||||||
|
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
||||||
|
static_cast<int>(sizeof(V8FunctionData)));
|
||||||
|
|
||||||
|
handle_.Reset(isolate_, external);
|
||||||
|
handle_.SetWeak(this, FirstWeakCallback, v8::WeakCallbackType::kParameter);
|
||||||
|
|
||||||
|
return external;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void FirstWeakCallback(
|
||||||
|
const v8::WeakCallbackInfo<V8FunctionData>& data) {
|
||||||
|
V8FunctionData* wrapper = data.GetParameter();
|
||||||
|
wrapper->handle_.Reset();
|
||||||
|
data.SetSecondPassCallback(SecondWeakCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SecondWeakCallback(
|
||||||
|
const v8::WeakCallbackInfo<V8FunctionData>& data) {
|
||||||
|
V8FunctionData* wrapper = data.GetParameter();
|
||||||
|
delete wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
v8::Isolate* isolate_;
|
||||||
|
CefString function_name_;
|
||||||
|
CefV8Handler* handler_;
|
||||||
|
v8::Persistent<v8::External> handle_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Convert a CefString to a V8::String.
|
// Convert a CefString to a V8::String.
|
||||||
v8::Local<v8::String> GetV8String(v8::Isolate* isolate,
|
v8::Local<v8::String> GetV8String(v8::Isolate* isolate,
|
||||||
const CefString& str) {
|
const CefString& str) {
|
||||||
#if defined(CEF_STRING_TYPE_UTF16)
|
#if defined(CEF_STRING_TYPE_UTF16)
|
||||||
// Already a UTF16 string.
|
// Already a UTF16 string.
|
||||||
return v8::String::NewFromTwoByte(
|
return v8::String::NewFromTwoByte(
|
||||||
@ -479,22 +552,19 @@ void FunctionCallbackImpl(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
|||||||
v8::Isolate* isolate = info.GetIsolate();
|
v8::Isolate* isolate = info.GetIsolate();
|
||||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||||
|
|
||||||
CefV8Handler* handler =
|
V8FunctionData* data = V8FunctionData::Unwrap(info.Data());
|
||||||
static_cast<CefV8Handler*>(v8::External::Cast(*info.Data())->Value());
|
|
||||||
|
|
||||||
CefV8ValueList params;
|
CefV8ValueList params;
|
||||||
for (int i = 0; i < info.Length(); i++)
|
for (int i = 0; i < info.Length(); i++)
|
||||||
params.push_back(new CefV8ValueImpl(isolate, context, info[i]));
|
params.push_back(new CefV8ValueImpl(isolate, context, info[i]));
|
||||||
|
|
||||||
CefString func_name;
|
|
||||||
GetCefString(v8::Handle<v8::String>::Cast(info.Callee()->GetName()),
|
|
||||||
func_name);
|
|
||||||
CefRefPtr<CefV8Value> object =
|
CefRefPtr<CefV8Value> object =
|
||||||
new CefV8ValueImpl(isolate, context, info.This());
|
new CefV8ValueImpl(isolate, context, info.This());
|
||||||
CefRefPtr<CefV8Value> retval;
|
CefRefPtr<CefV8Value> retval;
|
||||||
CefString exception;
|
CefString exception;
|
||||||
|
|
||||||
if (handler->Execute(func_name, object, params, retval, exception)) {
|
if (data->handler()->Execute(data->function_name(), object, params, retval,
|
||||||
|
exception)) {
|
||||||
if (!exception.empty()) {
|
if (!exception.empty()) {
|
||||||
info.GetReturnValue().Set(
|
info.GetReturnValue().Set(
|
||||||
isolate->ThrowException(
|
isolate->ThrowException(
|
||||||
@ -592,7 +662,7 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
|
|||||||
// Execute the function call using the ScriptController so that inspector
|
// Execute the function call using the ScriptController so that inspector
|
||||||
// instrumentation works.
|
// instrumentation works.
|
||||||
if (CEF_CURRENTLY_ON_RT()) {
|
if (CEF_CURRENTLY_ON_RT()) {
|
||||||
RefPtr<blink::LocalFrame> frame =
|
blink::LocalFrame* frame =
|
||||||
toLocalFrame(blink::toFrameIfNotDetached(context));
|
toLocalFrame(blink::toFrameIfNotDetached(context));
|
||||||
DCHECK(frame);
|
DCHECK(frame);
|
||||||
if (frame &&
|
if (frame &&
|
||||||
@ -625,9 +695,15 @@ class ExtensionWrapper : public v8::Extension {
|
|||||||
if (!handler_)
|
if (!handler_)
|
||||||
return v8::Local<v8::FunctionTemplate>();
|
return v8::Local<v8::FunctionTemplate>();
|
||||||
|
|
||||||
|
CefString func_name;
|
||||||
|
GetCefString(name, func_name);
|
||||||
|
|
||||||
|
v8::Local<v8::External> function_data =
|
||||||
|
V8FunctionData::Create(isolate, func_name, handler_);
|
||||||
|
|
||||||
return v8::FunctionTemplate::New(isolate,
|
return v8::FunctionTemplate::New(isolate,
|
||||||
FunctionCallbackImpl,
|
FunctionCallbackImpl,
|
||||||
v8::External::New(isolate, handler_));
|
function_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -918,6 +994,9 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
|||||||
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
||||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
|
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
|
||||||
|
|
||||||
|
if (blink::ScriptForbiddenScope::isScriptForbidden())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
v8::Isolate* isolate = handle_->isolate();
|
v8::Isolate* isolate = handle_->isolate();
|
||||||
v8::HandleScope handle_scope(isolate);
|
v8::HandleScope handle_scope(isolate);
|
||||||
v8::Local<v8::Context> context = GetV8Context();
|
v8::Local<v8::Context> context = GetV8Context();
|
||||||
@ -928,6 +1007,9 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
|||||||
bool CefV8ContextImpl::Enter() {
|
bool CefV8ContextImpl::Enter() {
|
||||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||||
|
|
||||||
|
if (blink::ScriptForbiddenScope::isScriptForbidden())
|
||||||
|
return false;
|
||||||
|
|
||||||
v8::Isolate* isolate = handle_->isolate();
|
v8::Isolate* isolate = handle_->isolate();
|
||||||
v8::HandleScope handle_scope(isolate);
|
v8::HandleScope handle_scope(isolate);
|
||||||
|
|
||||||
@ -942,6 +1024,9 @@ bool CefV8ContextImpl::Enter() {
|
|||||||
bool CefV8ContextImpl::Exit() {
|
bool CefV8ContextImpl::Exit() {
|
||||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||||
|
|
||||||
|
if (blink::ScriptForbiddenScope::isScriptForbidden())
|
||||||
|
return false;
|
||||||
|
|
||||||
v8::Isolate* isolate = handle_->isolate();
|
v8::Isolate* isolate = handle_->isolate();
|
||||||
v8::HandleScope handle_scope(handle_->isolate());
|
v8::HandleScope handle_scope(handle_->isolate());
|
||||||
|
|
||||||
@ -970,6 +1055,9 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
|||||||
CefRefPtr<CefV8Exception>& exception) {
|
CefRefPtr<CefV8Exception>& exception) {
|
||||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||||
|
|
||||||
|
if (blink::ScriptForbiddenScope::isScriptForbidden())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (code.empty()) {
|
if (code.empty()) {
|
||||||
NOTREACHED() << "invalid input parameter";
|
NOTREACHED() << "invalid input parameter";
|
||||||
return false;
|
return false;
|
||||||
@ -1013,9 +1101,14 @@ v8::Local<v8::Context> CefV8ContextImpl::GetV8Context() {
|
|||||||
|
|
||||||
blink::WebFrame* CefV8ContextImpl::GetWebFrame() {
|
blink::WebFrame* CefV8ContextImpl::GetWebFrame() {
|
||||||
CEF_REQUIRE_RT();
|
CEF_REQUIRE_RT();
|
||||||
|
|
||||||
|
if (blink::ScriptForbiddenScope::isScriptForbidden())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
v8::HandleScope handle_scope(handle_->isolate());
|
v8::HandleScope handle_scope(handle_->isolate());
|
||||||
v8::Context::Scope context_scope(GetV8Context());
|
v8::Local<v8::Context> context = GetV8Context();
|
||||||
return blink::WebLocalFrame::frameForCurrentContext();
|
v8::Context::Scope context_scope(context);
|
||||||
|
return blink::WebLocalFrame::frameForContext(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1045,17 +1138,18 @@ CefV8ValueImpl::Handle::~Handle() {
|
|||||||
} else {
|
} else {
|
||||||
GetIsolateManager()->DeleteGlobalTrackObject(tracker_);
|
GetIsolateManager()->DeleteGlobalTrackObject(tracker_);
|
||||||
}
|
}
|
||||||
|
|
||||||
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
|
||||||
-static_cast<int>(sizeof(Handle)));
|
|
||||||
} else {
|
} else {
|
||||||
delete tracker_;
|
delete tracker_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always call Reset() on a persistent handle to avoid the
|
if (is_set_weak_) {
|
||||||
// CHECK(state() != NEAR_DEATH) in V8's PostGarbageCollectionProcessing.
|
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
||||||
handle_.Reset();
|
-static_cast<int>(sizeof(Handle)));
|
||||||
|
} else {
|
||||||
|
// SetWeak was not called so reset now.
|
||||||
|
handle_.Reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CefV8ValueImpl::Handle::handleType
|
CefV8ValueImpl::Handle::handleType
|
||||||
@ -1089,13 +1183,13 @@ void CefV8ValueImpl::Handle::SetWeakIfNecessary() {
|
|||||||
if (context_state_.get()) {
|
if (context_state_.get()) {
|
||||||
// |tracker_| will be deleted when:
|
// |tracker_| will be deleted when:
|
||||||
// A. The associated context is released, or
|
// A. The associated context is released, or
|
||||||
// B. Destructor is called for the weak handle.
|
// B. SecondWeakCallback is called for the weak handle.
|
||||||
DCHECK(context_state_->IsValid());
|
DCHECK(context_state_->IsValid());
|
||||||
context_state_->AddTrackObject(tracker_);
|
context_state_->AddTrackObject(tracker_);
|
||||||
} else {
|
} else {
|
||||||
// |tracker_| will be deleted when:
|
// |tracker_| will be deleted when:
|
||||||
// A. The process shuts down, or
|
// A. The process shuts down, or
|
||||||
// B. Destructor is called for the weak handle.
|
// B. SecondWeakCallback is called for the weak handle.
|
||||||
GetIsolateManager()->AddGlobalTrackObject(tracker_);
|
GetIsolateManager()->AddGlobalTrackObject(tracker_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1103,16 +1197,25 @@ void CefV8ValueImpl::Handle::SetWeakIfNecessary() {
|
|||||||
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
isolate_->AdjustAmountOfExternalAllocatedMemory(
|
||||||
static_cast<int>(sizeof(Handle)));
|
static_cast<int>(sizeof(Handle)));
|
||||||
|
|
||||||
// The added reference will be released in Destructor.
|
// The added reference will be released in SecondWeakCallback.
|
||||||
AddRef();
|
AddRef();
|
||||||
handle_.SetWeak(this, Destructor, v8::WeakCallbackType::kParameter);
|
handle_.SetWeak(this, FirstWeakCallback, v8::WeakCallbackType::kParameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void CefV8ValueImpl::Handle::Destructor(
|
void CefV8ValueImpl::Handle::FirstWeakCallback(
|
||||||
const v8::WeakCallbackInfo<Handle>& data) {
|
const v8::WeakCallbackInfo<Handle>& data) {
|
||||||
data.GetParameter()->Release();
|
Handle* wrapper = data.GetParameter();
|
||||||
|
wrapper->handle_.Reset();
|
||||||
|
data.SetSecondPassCallback(SecondWeakCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void CefV8ValueImpl::Handle::SecondWeakCallback(
|
||||||
|
const v8::WeakCallbackInfo<Handle>& data) {
|
||||||
|
Handle* wrapper = data.GetParameter();
|
||||||
|
wrapper->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1269,13 +1372,14 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8::Local<v8::External> function_data =
|
||||||
|
V8FunctionData::Create(isolate, name, handler.get());
|
||||||
|
|
||||||
// Create a new V8 function template.
|
// Create a new V8 function template.
|
||||||
v8::Local<v8::FunctionTemplate> tmpl = v8::FunctionTemplate::New(isolate);
|
v8::Local<v8::FunctionTemplate> tmpl =
|
||||||
|
v8::FunctionTemplate::New(isolate,
|
||||||
v8::Local<v8::Value> data = v8::External::New(isolate, handler.get());
|
FunctionCallbackImpl,
|
||||||
|
function_data);
|
||||||
// Set the function handler callback.
|
|
||||||
tmpl->SetCallHandler(FunctionCallbackImpl, data);
|
|
||||||
|
|
||||||
// Retrieve the function object and set the name.
|
// Retrieve the function object and set the name.
|
||||||
v8::Local<v8::Function> func = tmpl->GetFunction();
|
v8::Local<v8::Function> func = tmpl->GetFunction();
|
||||||
|
@ -303,8 +303,9 @@ class CefV8ValueImpl : public CefV8Value {
|
|||||||
~Handle() override;
|
~Handle() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Callback for weak persistent reference destruction.
|
// Callbacks for weak persistent reference destruction.
|
||||||
static void Destructor(const v8::WeakCallbackInfo<Handle>& data);
|
static void FirstWeakCallback(const v8::WeakCallbackInfo<Handle>& data);
|
||||||
|
static void SecondWeakCallback(const v8::WeakCallbackInfo<Handle>& data);
|
||||||
|
|
||||||
persistentType handle_;
|
persistentType handle_;
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
|
|||||||
#include "third_party/WebKit/public/web/WebNode.h"
|
#include "third_party/WebKit/public/web/WebNode.h"
|
||||||
#include "third_party/WebKit/public/web/WebViewClient.h"
|
#include "third_party/WebKit/public/web/WebViewClient.h"
|
||||||
|
|
||||||
#include "third_party/WebKit/Source/core/css/parser/CSSParser.h"
|
|
||||||
#include "third_party/WebKit/Source/core/dom/Element.h"
|
#include "third_party/WebKit/Source/core/dom/Element.h"
|
||||||
#include "third_party/WebKit/Source/core/dom/Node.h"
|
#include "third_party/WebKit/Source/core/dom/Node.h"
|
||||||
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
|
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
|
||||||
@ -160,23 +159,4 @@ blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializePartitionAlloc() {
|
|
||||||
WTF::Partitions::initialize(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ParseCSSColor(const blink::WebString& string,
|
|
||||||
bool strict, SkColor& color) {
|
|
||||||
blink::Color rgba_color =
|
|
||||||
blink::makeRGBA(SkColorGetR(color), SkColorGetG(color),
|
|
||||||
SkColorGetB(color), SkColorGetA(color));
|
|
||||||
if (!blink::CSSParser::parseColor(rgba_color, string, strict))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
color = SkColorSetARGB(rgba_color.alpha(),
|
|
||||||
rgba_color.red(),
|
|
||||||
rgba_color.green(),
|
|
||||||
rgba_color.blue());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // webkit_glue
|
} // webkit_glue
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "third_party/skia/include/core/SkColor.h"
|
|
||||||
|
|
||||||
#include "include/internal/cef_types.h"
|
#include "include/internal/cef_types.h"
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
@ -46,12 +44,6 @@ int64_t GetIdentifier(blink::WebFrame* frame);
|
|||||||
blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
|
blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
|
||||||
blink::WebFrame* relative_to_frame);
|
blink::WebFrame* relative_to_frame);
|
||||||
|
|
||||||
// Initialize PartitionAlloc before calling Blink functions from the browser
|
|
||||||
// process. Safe to call multiple times.
|
|
||||||
void InitializePartitionAlloc();
|
|
||||||
|
|
||||||
bool ParseCSSColor(const blink::WebString& string, bool strict, SkColor& color);
|
|
||||||
|
|
||||||
} // webkit_glue
|
} // webkit_glue
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||||
|
@ -23,9 +23,13 @@ namespace logging {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
#if defined(OS_POSIX)
|
#if defined(OS_POSIX)
|
||||||
// From base/safe_strerror_posix.cc.
|
// From base/posix/safe_strerror.cc
|
||||||
|
|
||||||
#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(OS_NACL))
|
#if defined(__GLIBC__) || defined(OS_NACL)
|
||||||
|
#define USE_HISTORICAL_STRERRO_R 1
|
||||||
|
#else
|
||||||
|
#define USE_HISTORICAL_STRERRO_R 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_HISTORICAL_STRERRO_R && defined(__GNUC__)
|
#if USE_HISTORICAL_STRERRO_R && defined(__GNUC__)
|
||||||
// GCC will complain about the unused second wrap function unless we tell it
|
// GCC will complain about the unused second wrap function unless we tell it
|
||||||
|
@ -597,36 +597,6 @@ CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
|
|||||||
return _retval.DetachToUserFree();
|
return _retval.DetachToUserFree();
|
||||||
}
|
}
|
||||||
|
|
||||||
CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict,
|
|
||||||
cef_color_t* color) {
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
// Verify param: string; type: string_byref_const
|
|
||||||
DCHECK(string);
|
|
||||||
if (!string)
|
|
||||||
return 0;
|
|
||||||
// Verify param: color; type: simple_byref
|
|
||||||
DCHECK(color);
|
|
||||||
if (!color)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Translate param: color; type: simple_byref
|
|
||||||
cef_color_t colorVal = color?*color:0;
|
|
||||||
|
|
||||||
// Execute
|
|
||||||
bool _retval = CefParseCSSColor(
|
|
||||||
CefString(string),
|
|
||||||
strict?true:false,
|
|
||||||
colorVal);
|
|
||||||
|
|
||||||
// Restore param: color; type: simple_byref
|
|
||||||
if (color)
|
|
||||||
*color = colorVal;
|
|
||||||
|
|
||||||
// Return type: bool
|
|
||||||
return _retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
|
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
|
||||||
cef_json_parser_options_t options) {
|
cef_json_parser_options_t options) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||||
|
@ -565,25 +565,6 @@ CEF_GLOBAL CefString CefURIDecode(const CefString& text, bool convert_to_utf8,
|
|||||||
return _retvalStr;
|
return _retvalStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
CEF_GLOBAL bool CefParseCSSColor(const CefString& string, bool strict,
|
|
||||||
cef_color_t& color) {
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
// Verify param: string; type: string_byref_const
|
|
||||||
DCHECK(!string.empty());
|
|
||||||
if (string.empty())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Execute
|
|
||||||
int _retval = cef_parse_csscolor(
|
|
||||||
string.GetStruct(),
|
|
||||||
strict,
|
|
||||||
&color);
|
|
||||||
|
|
||||||
// Return type: bool
|
|
||||||
return _retval?true:false;
|
|
||||||
}
|
|
||||||
|
|
||||||
CEF_GLOBAL CefRefPtr<CefValue> CefParseJSON(const CefString& json_string,
|
CEF_GLOBAL CefRefPtr<CefValue> CefParseJSON(const CefString& json_string,
|
||||||
cef_json_parser_options_t options) {
|
cef_json_parser_options_t options) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||||
index 6d4a181..952a058 100644
|
index a080567..8da4190 100644
|
||||||
--- render_widget_host_view_guest.cc
|
--- render_widget_host_view_guest.cc
|
||||||
+++ render_widget_host_view_guest.cc
|
+++ render_widget_host_view_guest.cc
|
||||||
@@ -218,6 +218,9 @@ void RenderWidgetHostViewGuest::Destroy() {
|
@@ -220,6 +220,9 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
|
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
||||||
index 33262a8..5da1220 100644
|
index 1855e5d..4e0cd1d 100644
|
||||||
--- browser/browser_plugin/browser_plugin_guest.cc
|
--- browser/browser_plugin/browser_plugin_guest.cc
|
||||||
+++ browser/browser_plugin/browser_plugin_guest.cc
|
+++ browser/browser_plugin/browser_plugin_guest.cc
|
||||||
@@ -27,7 +27,7 @@
|
@@ -27,7 +27,7 @@
|
||||||
@ -36,10 +36,10 @@ index 33262a8..5da1220 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
RendererPreferences* renderer_prefs =
|
RendererPreferences* renderer_prefs =
|
||||||
@@ -791,11 +790,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
@@ -792,11 +791,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||||
static_cast<RenderViewHostImpl*>(GetWebContents()->GetRenderViewHost())
|
|
||||||
->GetWidget()
|
->GetWidget()
|
||||||
->Init();
|
->Init();
|
||||||
|
GetWebContents()->GetMainFrame()->Init();
|
||||||
- WebContentsViewGuest* web_contents_view =
|
- WebContentsViewGuest* web_contents_view =
|
||||||
- static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
- static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git web_contents_impl.cc web_contents_impl.cc
|
diff --git web_contents_impl.cc web_contents_impl.cc
|
||||||
index ccadfb2..b70b8e4 100644
|
index 2af90ae..7580a73 100644
|
||||||
--- web_contents_impl.cc
|
--- web_contents_impl.cc
|
||||||
+++ web_contents_impl.cc
|
+++ web_contents_impl.cc
|
||||||
@@ -1388,32 +1388,40 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
@@ -1382,32 +1382,40 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||||
main_frame_widget_routing_id);
|
main_frame_widget_routing_id);
|
||||||
frame_tree_.root()->SetFrameName(params.main_frame_name);
|
frame_tree_.root()->SetFrameName(params.main_frame_name);
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ index ccadfb2..b70b8e4 100644
|
|||||||
CHECK(render_view_host_delegate_view_);
|
CHECK(render_view_host_delegate_view_);
|
||||||
CHECK(view_.get());
|
CHECK(view_.get());
|
||||||
|
|
||||||
@@ -1835,11 +1843,14 @@ void WebContentsImpl::CreateNewWindow(
|
@@ -1839,11 +1847,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ index ccadfb2..b70b8e4 100644
|
|||||||
if (route_id != MSG_ROUTING_NONE &&
|
if (route_id != MSG_ROUTING_NONE &&
|
||||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||||
// If the embedder didn't create a WebContents for this route, we need to
|
// If the embedder didn't create a WebContents for this route, we need to
|
||||||
@@ -1860,6 +1871,8 @@ void WebContentsImpl::CreateNewWindow(
|
@@ -1867,6 +1878,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||||
create_params.opener_render_process_id = render_process_id;
|
create_params.opener_render_process_id = render_process_id;
|
||||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||||
create_params.opener_suppressed = params.opener_suppressed;
|
create_params.opener_suppressed = params.opener_suppressed;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git common.gypi common.gypi
|
diff --git common.gypi common.gypi
|
||||||
index 514b129..036fe51 100644
|
index 846dc3a..700284e 100644
|
||||||
--- common.gypi
|
--- common.gypi
|
||||||
+++ common.gypi
|
+++ common.gypi
|
||||||
@@ -9,6 +9,9 @@
|
@@ -9,6 +9,9 @@
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git ui/browser.cc ui/browser.cc
|
diff --git ui/browser.cc ui/browser.cc
|
||||||
index 717381d..35f791b 100644
|
index 8ceee96..da77140 100644
|
||||||
--- ui/browser.cc
|
--- ui/browser.cc
|
||||||
+++ ui/browser.cc
|
+++ ui/browser.cc
|
||||||
@@ -1707,7 +1707,9 @@ bool Browser::ShouldCreateWebContents(
|
@@ -1726,7 +1726,9 @@ bool Browser::ShouldCreateWebContents(
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const std::string& partition_id,
|
const std::string& partition_id,
|
||||||
@ -14,10 +14,10 @@ index 717381d..35f791b 100644
|
|||||||
// If a BackgroundContents is created, suppress the normal WebContents.
|
// If a BackgroundContents is created, suppress the normal WebContents.
|
||||||
return !MaybeCreateBackgroundContents(
|
return !MaybeCreateBackgroundContents(
|
||||||
diff --git ui/browser.h ui/browser.h
|
diff --git ui/browser.h ui/browser.h
|
||||||
index 13ec6b4..6e8fffa 100644
|
index 37d23b3..37c9ea9 100644
|
||||||
--- ui/browser.h
|
--- ui/browser.h
|
||||||
+++ ui/browser.h
|
+++ ui/browser.h
|
||||||
@@ -599,7 +599,9 @@ class Browser : public TabStripModelObserver,
|
@@ -600,7 +600,9 @@ class Browser : public TabStripModelObserver,
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const std::string& partition_id,
|
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
|
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
index 874debf..ba26bdf 100644
|
index eccd9dc..d0908c6 100644
|
||||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
@@ -137,6 +137,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
@@ -132,6 +132,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
||||||
scoped_ptr<cc::SoftwareOutputDevice>
|
scoped_ptr<cc::SoftwareOutputDevice>
|
||||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||||
ui::Compositor* compositor) {
|
ui::Compositor* compositor) {
|
||||||
|
@ -39,10 +39,10 @@ index 45686b5..18548a0 100644
|
|||||||
// Returns true if we should fork a new process for the given navigation.
|
// 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
|
// 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
|
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||||
index 9b199d3..1a8b6fa 100644
|
index 0fc35cb..caed853 100644
|
||||||
--- renderer/render_frame_impl.cc
|
--- renderer/render_frame_impl.cc
|
||||||
+++ renderer/render_frame_impl.cc
|
+++ renderer/render_frame_impl.cc
|
||||||
@@ -4684,7 +4684,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
@@ -4750,7 +4750,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||||
(pending_navigation_params_ &&
|
(pending_navigation_params_ &&
|
||||||
!pending_navigation_params_->request_params.redirects.empty());
|
!pending_navigation_params_->request_params.redirects.empty());
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ index 9b199d3..1a8b6fa 100644
|
|||||||
// The handlenavigation API is deprecated and will be removed once
|
// The handlenavigation API is deprecated and will be removed once
|
||||||
// crbug.com/325351 is resolved.
|
// crbug.com/325351 is resolved.
|
||||||
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||||
@@ -4694,7 +4693,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
@@ -4760,7 +4759,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||||
is_redirect)) {
|
is_redirect)) {
|
||||||
return blink::WebNavigationPolicyIgnore;
|
return blink::WebNavigationPolicyIgnore;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
|
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
index f594ade..f71e7ed 100644
|
index a3d8c7c..1ad97bc 100644
|
||||||
--- browser/guest_view/extension_options/extension_options_guest.cc
|
--- browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
+++ browser/guest_view/extension_options/extension_options_guest.cc
|
+++ browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
@@ -202,7 +202,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
@@ -202,7 +202,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git font_family_cache.h font_family_cache.h
|
diff --git font_family_cache.h font_family_cache.h
|
||||||
index 306cbf0..6ca443c 100644
|
index 743448d..0a9f350 100644
|
||||||
--- font_family_cache.h
|
--- font_family_cache.h
|
||||||
+++ font_family_cache.h
|
+++ font_family_cache.h
|
||||||
@@ -20,6 +20,8 @@ class Profile;
|
@@ -20,6 +20,8 @@ class Profile;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git resource_ids resource_ids
|
diff --git resource_ids resource_ids
|
||||||
index c1f41e0..5ef46f2 100644
|
index 2943776..6d4b898 100644
|
||||||
--- resource_ids
|
--- resource_ids
|
||||||
+++ resource_ids
|
+++ resource_ids
|
||||||
@@ -14,6 +14,12 @@
|
@@ -14,6 +14,12 @@
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
|
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
|
||||||
index d8a45c7..3dd5518 100644
|
index 552b2f8..3d61233 100644
|
||||||
--- gyp/generator/ninja.py
|
--- gyp/generator/ninja.py
|
||||||
+++ gyp/generator/ninja.py
|
+++ gyp/generator/ninja.py
|
||||||
@@ -745,7 +745,16 @@ class NinjaWriter(object):
|
@@ -747,7 +747,16 @@ class NinjaWriter(object):
|
||||||
for path in copy['files']:
|
for path in copy['files']:
|
||||||
# Normalize the path so trailing slashes don't confuse us.
|
# Normalize the path so trailing slashes don't confuse us.
|
||||||
path = os.path.normpath(path)
|
path = os.path.normpath(path)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git hwnd_message_handler.cc hwnd_message_handler.cc
|
diff --git hwnd_message_handler.cc hwnd_message_handler.cc
|
||||||
index 0cacffe..847ce2b 100644
|
index f632827..b6c912c 100644
|
||||||
--- hwnd_message_handler.cc
|
--- hwnd_message_handler.cc
|
||||||
+++ hwnd_message_handler.cc
|
+++ hwnd_message_handler.cc
|
||||||
@@ -2387,8 +2387,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
@@ -2382,8 +2382,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||||
active_mouse_tracking_flags_ = 0;
|
active_mouse_tracking_flags_ = 0;
|
||||||
} else if (event.type() == ui::ET_MOUSEWHEEL) {
|
} else if (event.type() == ui::ET_MOUSEWHEEL) {
|
||||||
// Reroute the mouse wheel to the window under the pointer if applicable.
|
// Reroute the mouse wheel to the window under the pointer if applicable.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git input_method_win.cc input_method_win.cc
|
diff --git input_method_win.cc input_method_win.cc
|
||||||
index 56bbac1..3265c64 100644
|
index 6ac7e6f..ad372ce 100644
|
||||||
--- input_method_win.cc
|
--- input_method_win.cc
|
||||||
+++ input_method_win.cc
|
+++ input_method_win.cc
|
||||||
@@ -588,8 +588,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
@@ -614,8 +614,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||||
// receiving keyboard input as long as it is an active window. This works well
|
// receiving keyboard input as long as it is an active window. This works well
|
||||||
// even when the |attached_window_handle| becomes active but has not received
|
// even when the |attached_window_handle| becomes active but has not received
|
||||||
// WM_FOCUS yet.
|
// WM_FOCUS yet.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git message_loop.cc message_loop.cc
|
diff --git message_loop.cc message_loop.cc
|
||||||
index e84765a..560bd39 100644
|
index 88f75e9..7abb471 100644
|
||||||
--- message_loop.cc
|
--- message_loop.cc
|
||||||
+++ message_loop.cc
|
+++ message_loop.cc
|
||||||
@@ -139,12 +139,6 @@ MessageLoop::~MessageLoop() {
|
@@ -139,12 +139,6 @@ MessageLoop::~MessageLoop() {
|
||||||
|
@ -45,10 +45,10 @@ index e9df3db..768b7fc 100644
|
|||||||
friend class GZipUnitTest;
|
friend class GZipUnitTest;
|
||||||
friend class SdchFilterChainingTest;
|
friend class SdchFilterChainingTest;
|
||||||
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
|
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
|
||||||
index 55a4f51..937f163 100644
|
index e46d3f1..0c0430f 100644
|
||||||
--- url_request/url_request_job.cc
|
--- url_request/url_request_job.cc
|
||||||
+++ url_request/url_request_job.cc
|
+++ url_request/url_request_job.cc
|
||||||
@@ -447,6 +447,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
@@ -448,6 +448,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||||
if (request_->status().is_success())
|
if (request_->status().is_success())
|
||||||
filter_.reset(SetupFilter());
|
filter_.reset(SetupFilter());
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git fpdfsdk/src/fpdfview.cpp fpdfsdk/src/fpdfview.cpp
|
diff --git fpdfsdk/src/fpdfview.cpp fpdfsdk/src/fpdfview.cpp
|
||||||
index a6c1420..88c1b97 100644
|
index ba64709..02e1391 100644
|
||||||
--- fpdfsdk/src/fpdfview.cpp
|
--- fpdfsdk/src/fpdfview.cpp
|
||||||
+++ fpdfsdk/src/fpdfview.cpp
|
+++ fpdfsdk/src/fpdfview.cpp
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
||||||
index a9811c4..a43f9d1 100644
|
index 45a9516..419f17e 100644
|
||||||
--- public/common/common_param_traits_macros.h
|
--- public/common/common_param_traits_macros.h
|
||||||
+++ public/common/common_param_traits_macros.h
|
+++ public/common/common_param_traits_macros.h
|
||||||
@@ -193,6 +193,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
@@ -194,6 +194,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||||
@ -11,10 +11,10 @@ index a9811c4..a43f9d1 100644
|
|||||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||||
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
||||||
index 4a83a70..98781c0 100644
|
index 62af1ce..23e31de 100644
|
||||||
--- public/common/web_preferences.cc
|
--- public/common/web_preferences.cc
|
||||||
+++ public/common/web_preferences.cc
|
+++ public/common/web_preferences.cc
|
||||||
@@ -171,6 +171,7 @@ WebPreferences::WebPreferences()
|
@@ -172,6 +172,7 @@ WebPreferences::WebPreferences()
|
||||||
pinch_overlay_scrollbar_thickness(0),
|
pinch_overlay_scrollbar_thickness(0),
|
||||||
use_solid_color_scrollbars(false),
|
use_solid_color_scrollbars(false),
|
||||||
navigate_on_drag_drop(true),
|
navigate_on_drag_drop(true),
|
||||||
@ -23,10 +23,10 @@ index 4a83a70..98781c0 100644
|
|||||||
cookie_enabled(true),
|
cookie_enabled(true),
|
||||||
pepper_accelerated_video_decode_enabled(false),
|
pepper_accelerated_video_decode_enabled(false),
|
||||||
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
||||||
index de5a3c5..afdf03f 100644
|
index 7d6ca7d..ba38861 100644
|
||||||
--- public/common/web_preferences.h
|
--- public/common/web_preferences.h
|
||||||
+++ public/common/web_preferences.h
|
+++ public/common/web_preferences.h
|
||||||
@@ -172,6 +172,7 @@ struct CONTENT_EXPORT WebPreferences {
|
@@ -174,6 +174,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||||
int pinch_overlay_scrollbar_thickness;
|
int pinch_overlay_scrollbar_thickness;
|
||||||
bool use_solid_color_scrollbars;
|
bool use_solid_color_scrollbars;
|
||||||
bool navigate_on_drag_drop;
|
bool navigate_on_drag_drop;
|
||||||
@ -35,10 +35,10 @@ index de5a3c5..afdf03f 100644
|
|||||||
|
|
||||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||||
index 8e6b887..77ef5ad 100644
|
index 36d226c..ce8fd74 100644
|
||||||
--- renderer/render_view_impl.cc
|
--- renderer/render_view_impl.cc
|
||||||
+++ renderer/render_view_impl.cc
|
+++ renderer/render_view_impl.cc
|
||||||
@@ -938,6 +938,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
@@ -953,6 +953,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||||
settings->setCookieEnabled(prefs.cookie_enabled);
|
settings->setCookieEnabled(prefs.cookie_enabled);
|
||||||
settings->setNavigateOnDragDrop(prefs.navigate_on_drag_drop);
|
settings->setNavigateOnDragDrop(prefs.navigate_on_drag_drop);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
||||||
index ee406db..fc86170 100644
|
index 36d6fe9..a875d1e 100644
|
||||||
--- prefs_tab_helper.cc
|
--- prefs_tab_helper.cc
|
||||||
+++ prefs_tab_helper.cc
|
+++ prefs_tab_helper.cc
|
||||||
@@ -12,7 +12,7 @@
|
@@ -12,7 +12,7 @@
|
||||||
@ -9,8 +9,8 @@ index ee406db..fc86170 100644
|
|||||||
-#include "base/memory/singleton.h"
|
-#include "base/memory/singleton.h"
|
||||||
+#include "base/lazy_instance.h"
|
+#include "base/lazy_instance.h"
|
||||||
#include "base/metrics/field_trial.h"
|
#include "base/metrics/field_trial.h"
|
||||||
#include "base/prefs/overlay_user_pref_store.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/prefs/pref_change_registrar.h"
|
#include "base/strings/string_util.h"
|
||||||
@@ -431,12 +431,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
@@ -431,12 +431,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||||
GetInstance()->GetServiceForBrowserContext(profile, true));
|
GetInstance()->GetServiceForBrowserContext(profile, true));
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ index c3469fc..9fc71ac 100644
|
|||||||
}
|
}
|
||||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||||
diff --git printing/common/print_messages.h printing/common/print_messages.h
|
diff --git printing/common/print_messages.h printing/common/print_messages.h
|
||||||
index 372097f..ae8a227 100644
|
index 6060a1c..d051297 100644
|
||||||
--- printing/common/print_messages.h
|
--- printing/common/print_messages.h
|
||||||
+++ printing/common/print_messages.h
|
+++ printing/common/print_messages.h
|
||||||
@@ -70,7 +70,6 @@ struct PrintMsg_PrintPages_Params {
|
@@ -70,7 +70,6 @@ struct PrintMsg_PrintPages_Params {
|
||||||
@ -106,7 +106,7 @@ index 372097f..ae8a227 100644
|
|||||||
|
|
||||||
// Messages sent from the renderer to the browser.
|
// Messages sent from the renderer to the browser.
|
||||||
|
|
||||||
@@ -423,7 +413,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
|
@@ -415,7 +405,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
|
||||||
int /* fd in browser */) // Used only by Chrome OS.
|
int /* fd in browser */) // Used only by Chrome OS.
|
||||||
#endif // defined(OS_ANDROID)
|
#endif // defined(OS_ANDROID)
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ index 372097f..ae8a227 100644
|
|||||||
// Asks the browser to do print preview.
|
// Asks the browser to do print preview.
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
|
||||||
PrintHostMsg_RequestPrintPreview_Params /* params */)
|
PrintHostMsg_RequestPrintPreview_Params /* params */)
|
||||||
@@ -457,7 +446,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
|
@@ -449,7 +438,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
|
||||||
// The memory handle in this message is already valid in the browser process.
|
// The memory handle in this message is already valid in the browser process.
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
|
||||||
PrintHostMsg_DidPreviewDocument_Params /* params */)
|
PrintHostMsg_DidPreviewDocument_Params /* params */)
|
||||||
@ -122,7 +122,7 @@ index 372097f..ae8a227 100644
|
|||||||
|
|
||||||
// This is sent when there are invalid printer settings.
|
// This is sent when there are invalid printer settings.
|
||||||
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
||||||
@@ -466,7 +454,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
@@ -458,7 +446,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
|
||||||
int /* document cookie */)
|
int /* document cookie */)
|
||||||
|
|
||||||
@ -130,16 +130,16 @@ index 372097f..ae8a227 100644
|
|||||||
// Tell the browser print preview failed.
|
// Tell the browser print preview failed.
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
|
||||||
int /* document cookie */)
|
int /* document cookie */)
|
||||||
@@ -493,4 +480,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
|
@@ -485,4 +472,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
|
||||||
// Notify the browser to set print presets based on source PDF document.
|
// Notify the browser to set print presets based on source PDF document.
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
|
||||||
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
||||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||||
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
|
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
|
||||||
index ff97954..c93dabf 100644
|
index 6a8f1c3..f66469e 100644
|
||||||
--- printing/renderer/print_web_view_helper.cc
|
--- printing/renderer/print_web_view_helper.cc
|
||||||
+++ printing/renderer/print_web_view_helper.cc
|
+++ printing/renderer/print_web_view_helper.cc
|
||||||
@@ -80,6 +80,9 @@ const double kMinDpi = 1.0;
|
@@ -81,6 +81,9 @@ const double kMinDpi = 1.0;
|
||||||
|
|
||||||
#if defined(ENABLE_PRINT_PREVIEW)
|
#if defined(ENABLE_PRINT_PREVIEW)
|
||||||
bool g_is_preview_enabled = true;
|
bool g_is_preview_enabled = true;
|
||||||
@ -149,7 +149,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
const char kPageLoadScriptFormat[] =
|
const char kPageLoadScriptFormat[] =
|
||||||
"document.open(); document.write(%s); document.close();";
|
"document.open(); document.write(%s); document.close();";
|
||||||
@@ -94,9 +97,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
@@ -95,9 +98,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||||
std::string script = base::StringPrintf(script_format, json.c_str());
|
std::string script = base::StringPrintf(script_format, json.c_str());
|
||||||
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
|
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
int GetDPI(const PrintMsg_Print_Params* print_params) {
|
int GetDPI(const PrintMsg_Print_Params* print_params) {
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
@@ -306,7 +306,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
@@ -307,7 +307,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||||
return plugin && plugin->supportsPaginatedPrint();
|
return plugin && plugin->supportsPaginatedPrint();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ index ff97954..c93dabf 100644
|
|||||||
// Returns true if the current destination printer is PRINT_TO_PDF.
|
// Returns true if the current destination printer is PRINT_TO_PDF.
|
||||||
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
|
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
|
||||||
bool print_to_pdf = false;
|
bool print_to_pdf = false;
|
||||||
@@ -328,7 +327,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebFrame* frame,
|
@@ -329,7 +328,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebFrame* frame,
|
||||||
}
|
}
|
||||||
return frame_has_custom_page_size_style;
|
return frame_has_custom_page_size_style;
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
// Disable scaling when either:
|
// Disable scaling when either:
|
||||||
// - The PDF specifies disabling scaling.
|
// - The PDF specifies disabling scaling.
|
||||||
@@ -375,7 +373,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
@@ -376,7 +374,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ index ff97954..c93dabf 100644
|
|||||||
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
|
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
|
||||||
bool fit_to_paper_size = false;
|
bool fit_to_paper_size = false;
|
||||||
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
|
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
|
||||||
@@ -417,7 +414,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
@@ -418,7 +415,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
||||||
}
|
}
|
||||||
return blink::WebPrintScalingOptionFitToPrintableArea;
|
return blink::WebPrintScalingOptionFitToPrintableArea;
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
PrintMsg_Print_Params CalculatePrintParamsForCss(
|
PrintMsg_Print_Params CalculatePrintParamsForCss(
|
||||||
blink::WebFrame* frame,
|
blink::WebFrame* frame,
|
||||||
@@ -501,7 +497,6 @@ blink::WebView* FrameReference::view() {
|
@@ -502,7 +498,6 @@ blink::WebView* FrameReference::view() {
|
||||||
return view_;
|
return view_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ index ff97954..c93dabf 100644
|
|||||||
// static - Not anonymous so that platform implementations can use it.
|
// static - Not anonymous so that platform implementations can use it.
|
||||||
void PrintWebViewHelper::PrintHeaderAndFooter(
|
void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||||
blink::WebCanvas* canvas,
|
blink::WebCanvas* canvas,
|
||||||
@@ -557,7 +552,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
@@ -558,7 +553,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||||
web_view->close();
|
web_view->close();
|
||||||
frame->close();
|
frame->close();
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
// static - Not anonymous so that platform implementations can use it.
|
// static - Not anonymous so that platform implementations can use it.
|
||||||
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
|
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
|
||||||
@@ -830,6 +824,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
@@ -831,6 +825,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||||
print_for_preview_(false),
|
print_for_preview_(false),
|
||||||
delegate_(std::move(delegate)),
|
delegate_(std::move(delegate)),
|
||||||
print_node_in_progress_(false),
|
print_node_in_progress_(false),
|
||||||
@ -215,7 +215,7 @@ index ff97954..c93dabf 100644
|
|||||||
is_loading_(false),
|
is_loading_(false),
|
||||||
is_scripted_preview_delayed_(false),
|
is_scripted_preview_delayed_(false),
|
||||||
ipc_nesting_level_(0),
|
ipc_nesting_level_(0),
|
||||||
@@ -888,10 +883,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
|
@@ -889,10 +884,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_is_preview_enabled) {
|
if (g_is_preview_enabled) {
|
||||||
@ -226,7 +226,7 @@ index ff97954..c93dabf 100644
|
|||||||
} else {
|
} else {
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
Print(frame, blink::WebNode(), true);
|
Print(frame, blink::WebNode(), true);
|
||||||
@@ -915,14 +908,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
@@ -916,14 +909,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
|
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
|
||||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
|
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
|
||||||
#endif // defined(ENABLE_BASIC_PRINTING)
|
#endif // defined(ENABLE_BASIC_PRINTING)
|
||||||
@ -241,7 +241,7 @@ index ff97954..c93dabf 100644
|
|||||||
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
|
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
|
||||||
SetScriptedPrintBlocked)
|
SetScriptedPrintBlocked)
|
||||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||||
@@ -974,7 +963,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
@@ -975,7 +964,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||||
}
|
}
|
||||||
#endif // defined(ENABLE_BASIC_PRINTING)
|
#endif // defined(ENABLE_BASIC_PRINTING)
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ index ff97954..c93dabf 100644
|
|||||||
void PrintWebViewHelper::OnPrintForPrintPreview(
|
void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||||
const base::DictionaryValue& job_settings) {
|
const base::DictionaryValue& job_settings) {
|
||||||
CHECK_LE(ipc_nesting_level_, 1);
|
CHECK_LE(ipc_nesting_level_, 1);
|
||||||
@@ -1039,7 +1027,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
@@ -1040,7 +1028,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||||
DidFinishPrinting(FAIL_PRINT);
|
DidFinishPrinting(FAIL_PRINT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
|
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
|
||||||
const PageSizeMargins& page_layout_in_points,
|
const PageSizeMargins& page_layout_in_points,
|
||||||
@@ -1064,7 +1051,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
@@ -1065,7 +1052,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||||
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
|
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ index ff97954..c93dabf 100644
|
|||||||
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
||||||
if (ipc_nesting_level_ > 1)
|
if (ipc_nesting_level_ > 1)
|
||||||
return;
|
return;
|
||||||
@@ -1225,7 +1211,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
@@ -1226,7 +1212,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ index ff97954..c93dabf 100644
|
|||||||
bool PrintWebViewHelper::RenderPreviewPage(
|
bool PrintWebViewHelper::RenderPreviewPage(
|
||||||
int page_number,
|
int page_number,
|
||||||
const PrintMsg_Print_Params& print_params) {
|
const PrintMsg_Print_Params& print_params) {
|
||||||
@@ -1254,7 +1240,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
@@ -1255,7 +1241,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||||
}
|
}
|
||||||
return PreviewPageRendered(page_number, draft_metafile.get());
|
return PreviewPageRendered(page_number, draft_metafile.get());
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||||
DCHECK(!is_print_ready_metafile_sent_);
|
DCHECK(!is_print_ready_metafile_sent_);
|
||||||
@@ -1284,7 +1270,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
@@ -1285,7 +1271,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||||
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
|
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
void PrintWebViewHelper::OnPrintingDone(bool success) {
|
void PrintWebViewHelper::OnPrintingDone(bool success) {
|
||||||
if (ipc_nesting_level_ > 1)
|
if (ipc_nesting_level_ > 1)
|
||||||
@@ -1299,7 +1284,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
|
@@ -1300,7 +1285,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
|
||||||
is_scripted_printing_blocked_ = blocked;
|
is_scripted_printing_blocked_ = blocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ index ff97954..c93dabf 100644
|
|||||||
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||||
if (ipc_nesting_level_ > 1)
|
if (ipc_nesting_level_ > 1)
|
||||||
return;
|
return;
|
||||||
@@ -1310,7 +1294,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
@@ -1311,7 +1295,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||||
// that instead.
|
// that instead.
|
||||||
auto plugin = delegate_->GetPdfElement(frame);
|
auto plugin = delegate_->GetPdfElement(frame);
|
||||||
if (!plugin.isNull()) {
|
if (!plugin.isNull()) {
|
||||||
@ -309,7 +309,7 @@ index ff97954..c93dabf 100644
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print_preview_context_.InitWithFrame(frame);
|
print_preview_context_.InitWithFrame(frame);
|
||||||
@@ -1318,7 +1304,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
@@ -1319,7 +1305,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||||
? PRINT_PREVIEW_USER_INITIATED_SELECTION
|
? PRINT_PREVIEW_USER_INITIATED_SELECTION
|
||||||
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
|
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
|
||||||
}
|
}
|
||||||
@ -317,7 +317,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
bool PrintWebViewHelper::IsPrintingEnabled() {
|
bool PrintWebViewHelper::IsPrintingEnabled() {
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@@ -1344,11 +1329,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
@@ -1345,11 +1330,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||||
|
|
||||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
||||||
// its |context_menu_node_|.
|
// its |context_menu_node_|.
|
||||||
@ -330,7 +330,7 @@ index ff97954..c93dabf 100644
|
|||||||
} else {
|
} else {
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
blink::WebNode duplicate_node(node);
|
blink::WebNode duplicate_node(node);
|
||||||
@@ -1414,7 +1397,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
@@ -1415,7 +1398,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ index ff97954..c93dabf 100644
|
|||||||
case FAIL_PREVIEW:
|
case FAIL_PREVIEW:
|
||||||
int cookie =
|
int cookie =
|
||||||
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
||||||
@@ -1426,7 +1408,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
@@ -1427,7 +1409,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||||
}
|
}
|
||||||
print_preview_context_.Failed(notify_browser_of_print_failure_);
|
print_preview_context_.Failed(notify_browser_of_print_failure_);
|
||||||
break;
|
break;
|
||||||
@ -346,7 +346,7 @@ index ff97954..c93dabf 100644
|
|||||||
}
|
}
|
||||||
prep_frame_view_.reset();
|
prep_frame_view_.reset();
|
||||||
print_pages_params_.reset();
|
print_pages_params_.reset();
|
||||||
@@ -1558,7 +1539,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
@@ -1559,7 +1540,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ index ff97954..c93dabf 100644
|
|||||||
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
|
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
|
||||||
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
||||||
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
||||||
@@ -1667,7 +1647,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
@@ -1668,7 +1648,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
|
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
|
||||||
@@ -1759,11 +1738,14 @@ void PrintWebViewHelper::PrintPageInternal(
|
@@ -1760,11 +1739,14 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||||
gfx::Rect canvas_area =
|
gfx::Rect canvas_area =
|
||||||
params.params.display_header_footer ? gfx::Rect(page_size) : content_area;
|
params.params.display_header_footer ? gfx::Rect(page_size) : content_area;
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ index ff97954..c93dabf 100644
|
|||||||
// TODO(thestig) GetVectorCanvasForNewPage() and RenderPageContent() take a
|
// TODO(thestig) GetVectorCanvasForNewPage() and RenderPageContent() take a
|
||||||
// different scale factor vs Windows. Figure out why and combine the two.
|
// different scale factor vs Windows. Figure out why and combine the two.
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
@@ -1779,14 +1761,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
@@ -1780,14 +1762,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||||
|
|
||||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ index ff97954..c93dabf 100644
|
|||||||
|
|
||||||
float webkit_scale_factor =
|
float webkit_scale_factor =
|
||||||
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
||||||
@@ -1841,7 +1821,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
@@ -1836,7 +1816,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||||
#endif // defined(OS_WIN)
|
#endif // defined(OS_WIN)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ index ff97954..c93dabf 100644
|
|||||||
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
||||||
if (is_scripted_preview_delayed_) {
|
if (is_scripted_preview_delayed_) {
|
||||||
is_scripted_preview_delayed_ = false;
|
is_scripted_preview_delayed_ = false;
|
||||||
@@ -1969,7 +1948,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
@@ -1964,7 +1943,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||||
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
|
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -507,7 +507,7 @@ index ca10384..7aacfbc 100644
|
|||||||
bool is_loading_;
|
bool is_loading_;
|
||||||
bool is_scripted_preview_delayed_;
|
bool is_scripted_preview_delayed_;
|
||||||
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
|
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
|
||||||
index e94f21e..e148860 100644
|
index 08a1c10..4a80a2d 100644
|
||||||
--- printing/renderer/print_web_view_helper_mac.mm
|
--- printing/renderer/print_web_view_helper_mac.mm
|
||||||
+++ printing/renderer/print_web_view_helper_mac.mm
|
+++ printing/renderer/print_web_view_helper_mac.mm
|
||||||
@@ -69,7 +69,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
@@ -69,7 +69,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||||
|
@ -14,7 +14,7 @@ index 1b6d8a6..b606a30 100644
|
|||||||
WebContents::CreateParams::~CreateParams() {
|
WebContents::CreateParams::~CreateParams() {
|
||||||
}
|
}
|
||||||
diff --git web_contents.h web_contents.h
|
diff --git web_contents.h web_contents.h
|
||||||
index a96ed1c..d0a6772 100644
|
index 5260b91..4495078 100644
|
||||||
--- web_contents.h
|
--- web_contents.h
|
||||||
+++ web_contents.h
|
+++ web_contents.h
|
||||||
@@ -54,9 +54,11 @@ class PageState;
|
@@ -54,9 +54,11 @@ class PageState;
|
||||||
@ -41,7 +41,7 @@ index a96ed1c..d0a6772 100644
|
|||||||
|
|
||||||
// Creates a new WebContents.
|
// Creates a new WebContents.
|
||||||
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
||||||
index 0a1d3f1..1d03511 100644
|
index 71c3075..7abcac3 100644
|
||||||
--- web_contents_delegate.cc
|
--- web_contents_delegate.cc
|
||||||
+++ web_contents_delegate.cc
|
+++ web_contents_delegate.cc
|
||||||
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||||
@ -56,7 +56,7 @@ index 0a1d3f1..1d03511 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git web_contents_delegate.h web_contents_delegate.h
|
diff --git web_contents_delegate.h web_contents_delegate.h
|
||||||
index ed46e43..9ffeee9 100644
|
index b6015b0..75b53d4 100644
|
||||||
--- web_contents_delegate.h
|
--- web_contents_delegate.h
|
||||||
+++ web_contents_delegate.h
|
+++ web_contents_delegate.h
|
||||||
@@ -41,9 +41,11 @@ class DownloadItem;
|
@@ -41,9 +41,11 @@ class DownloadItem;
|
||||||
@ -71,7 +71,7 @@ index ed46e43..9ffeee9 100644
|
|||||||
struct ColorSuggestion;
|
struct ColorSuggestion;
|
||||||
struct ContextMenuParams;
|
struct ContextMenuParams;
|
||||||
struct DropData;
|
struct DropData;
|
||||||
@@ -305,7 +307,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
@@ -309,7 +311,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const std::string& partition_id,
|
const std::string& partition_id,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||||
index ef38d30..00fb343 100644
|
index acc1c8a..c07cb49 100644
|
||||||
--- render_widget_host_view_mac.mm
|
--- render_widget_host_view_mac.mm
|
||||||
+++ render_widget_host_view_mac.mm
|
+++ render_widget_host_view_mac.mm
|
||||||
@@ -530,9 +530,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
@@ -530,9 +530,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
|
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
|
||||||
index a6498fc..4bf2cf91 100644
|
index 2fff3f3..86c7f0c 100644
|
||||||
--- renderer_preferences_util.cc
|
--- renderer_preferences_util.cc
|
||||||
+++ renderer_preferences_util.cc
|
+++ renderer_preferences_util.cc
|
||||||
@@ -27,7 +27,8 @@
|
@@ -27,7 +27,8 @@
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git spellcheck_factory.cc spellcheck_factory.cc
|
diff --git spellcheck_factory.cc spellcheck_factory.cc
|
||||||
index 87b5b9e..8e6dfff 100644
|
index 3fd085b..b2705bf 100644
|
||||||
--- spellcheck_factory.cc
|
--- spellcheck_factory.cc
|
||||||
+++ spellcheck_factory.cc
|
+++ spellcheck_factory.cc
|
||||||
@@ -16,6 +16,13 @@
|
@@ -16,6 +16,13 @@
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git supports_user_data.h supports_user_data.h
|
diff --git supports_user_data.h supports_user_data.h
|
||||||
index 5c1c7e9..77c9253 100644
|
index ab40c1b..2b145e8 100644
|
||||||
--- supports_user_data.h
|
--- supports_user_data.h
|
||||||
+++ supports_user_data.h
|
+++ supports_user_data.h
|
||||||
@@ -33,9 +33,9 @@ class BASE_EXPORT SupportsUserData {
|
@@ -33,9 +33,9 @@ class BASE_EXPORT SupportsUserData {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||||
index c5494d9..6515181 100644
|
index d06fde4..329432e 100644
|
||||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||||
@@ -774,6 +774,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
|
@@ -776,6 +776,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
|
||||||
::SetFocus(host->GetAcceleratedWidget());
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
+#if defined(OS_LINUX)
|
+#if defined(OS_LINUX)
|
||||||
@ -17,10 +17,10 @@ index c5494d9..6515181 100644
|
|||||||
set_focus_on_mouse_down_or_key_event_ = false;
|
set_focus_on_mouse_down_or_key_event_ = false;
|
||||||
host_->Focus();
|
host_->Focus();
|
||||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||||
index a2a0884..c6eef9d 100644
|
index 780ced5..9409858 100644
|
||||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||||
@@ -375,6 +375,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
|
@@ -376,6 +376,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
|
||||||
current_device_scale_factor_(0),
|
current_device_scale_factor_(0),
|
||||||
current_display_rotation_(gfx::Display::ROTATE_0),
|
current_display_rotation_(gfx::Display::ROTATE_0),
|
||||||
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
|
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
|
||||||
@ -40,18 +40,18 @@ index a2a0884..c6eef9d 100644
|
|||||||
return renderer_frame_number_;
|
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
|
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
|
||||||
index d714137..9d17d2f 100644
|
index 9a2e25b..dd753a5 100644
|
||||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||||
@@ -87,6 +87,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
@@ -95,6 +95,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||||
void BeginFrameSubscription(
|
void BeginFrameSubscription(
|
||||||
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
|
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
|
||||||
void EndFrameSubscription() override;
|
void EndFrameSubscription() override;
|
||||||
+ void SetHasExternalParent(bool val) override;
|
+ void SetHasExternalParent(bool val) override;
|
||||||
|
|
||||||
// IPC::Listener implementation:
|
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||||
bool OnMessageReceived(const IPC::Message& msg) override;
|
// that handle content embedded within other RenderWidgetHostViews.
|
||||||
@@ -438,6 +439,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
@@ -445,6 +446,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||||
// renderer.
|
// renderer.
|
||||||
bool pinch_zoom_enabled_;
|
bool pinch_zoom_enabled_;
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ index d714137..9d17d2f 100644
|
|||||||
void FlushInput();
|
void FlushInput();
|
||||||
|
|
||||||
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
|
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
|
||||||
index 9b48ddb..0314569 100644
|
index 7c749a2..df2a254 100644
|
||||||
--- content/public/browser/render_widget_host_view.h
|
--- content/public/browser/render_widget_host_view.h
|
||||||
+++ content/public/browser/render_widget_host_view.h
|
+++ content/public/browser/render_widget_host_view.h
|
||||||
@@ -146,6 +146,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
@@ -159,6 +159,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||||
// deleted after this call.
|
// deleted after this call.
|
||||||
virtual void EndFrameSubscription() = 0;
|
virtual void EndFrameSubscription() = 0;
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ index a8e088c..838b6a0 100644
|
|||||||
return host ? host->GetAcceleratedWidget() : NULL;
|
return host ? host->GetAcceleratedWidget() : NULL;
|
||||||
}
|
}
|
||||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||||
index c354154..c6f0fc9 100644
|
index f79b3c4..f585bea 100644
|
||||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||||
@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||||
@ -102,7 +102,7 @@ index c354154..c6f0fc9 100644
|
|||||||
tooltip_(NULL) {
|
tooltip_(NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,8 +134,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
@@ -134,8 +135,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
||||||
native_widget_delegate_);
|
native_widget_delegate_);
|
||||||
|
|
||||||
HWND parent_hwnd = NULL;
|
HWND parent_hwnd = NULL;
|
||||||
@ -116,7 +116,7 @@ index c354154..c6f0fc9 100644
|
|||||||
|
|
||||||
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
||||||
|
|
||||||
@@ -799,11 +804,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
@@ -800,11 +805,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||||
@ -135,7 +135,7 @@ index c354154..c6f0fc9 100644
|
|||||||
|
|
||||||
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
|
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
|
||||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||||
index ad82485..13e74b9 100644
|
index 963658a..36c8d63 100644
|
||||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||||
@@ -244,6 +244,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
@@ -244,6 +244,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||||
@ -150,10 +150,10 @@ index ad82485..13e74b9 100644
|
|||||||
// a reference.
|
// a reference.
|
||||||
corewm::TooltipWin* tooltip_;
|
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
|
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 f7495f0..3d9b9a2 100644
|
index e2eaf14..0652daa 100644
|
||||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||||
@@ -168,6 +168,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
@@ -167,6 +167,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||||
use_native_frame_(false),
|
use_native_frame_(false),
|
||||||
should_maximize_after_map_(false),
|
should_maximize_after_map_(false),
|
||||||
use_argb_visual_(false),
|
use_argb_visual_(false),
|
||||||
@ -161,17 +161,17 @@ index f7495f0..3d9b9a2 100644
|
|||||||
drag_drop_client_(NULL),
|
drag_drop_client_(NULL),
|
||||||
native_widget_delegate_(native_widget_delegate),
|
native_widget_delegate_(native_widget_delegate),
|
||||||
desktop_native_widget_aura_(desktop_native_widget_aura),
|
desktop_native_widget_aura_(desktop_native_widget_aura),
|
||||||
@@ -177,7 +178,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
@@ -175,7 +176,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||||
|
custom_window_shape_(false),
|
||||||
urgency_hint_set_(false),
|
urgency_hint_set_(false),
|
||||||
activatable_(true),
|
activatable_(true),
|
||||||
modal_dialog_xid_(0),
|
|
||||||
- close_widget_factory_(this) {
|
- close_widget_factory_(this) {
|
||||||
+ close_widget_factory_(this),
|
+ close_widget_factory_(this),
|
||||||
+ xwindow_destroyed_(false) {
|
+ xwindow_destroyed_(false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
|
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
|
||||||
@@ -388,7 +390,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
@@ -386,7 +388,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||||
// Actually free our native resources.
|
// Actually free our native resources.
|
||||||
if (ui::PlatformEventSource::GetInstance())
|
if (ui::PlatformEventSource::GetInstance())
|
||||||
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
||||||
@ -181,7 +181,7 @@ index f7495f0..3d9b9a2 100644
|
|||||||
xwindow_ = None;
|
xwindow_ = None;
|
||||||
|
|
||||||
desktop_native_widget_aura_->OnHostClosed();
|
desktop_native_widget_aura_->OnHostClosed();
|
||||||
@@ -537,6 +540,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
@@ -535,6 +538,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
|
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
|
||||||
@ -190,7 +190,7 @@ index f7495f0..3d9b9a2 100644
|
|||||||
return ToDIPRect(bounds_in_pixels_);
|
return ToDIPRect(bounds_in_pixels_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -974,6 +979,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
@@ -972,6 +977,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
|
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
|
||||||
@ -199,7 +199,7 @@ index f7495f0..3d9b9a2 100644
|
|||||||
return bounds_in_pixels_;
|
return bounds_in_pixels_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1031,6 +1038,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
@@ -1029,6 +1036,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||||
@ -208,7 +208,7 @@ index f7495f0..3d9b9a2 100644
|
|||||||
return bounds_in_pixels_.origin();
|
return bounds_in_pixels_.origin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1139,9 +1148,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
@@ -1137,9 +1146,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||||
use_argb_visual_ = true;
|
use_argb_visual_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ index f7495f0..3d9b9a2 100644
|
|||||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||||
bounds_in_pixels_.height(),
|
bounds_in_pixels_.height(),
|
||||||
0, // border width
|
0, // border width
|
||||||
@@ -1770,6 +1785,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
@@ -1767,6 +1782,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -237,12 +237,12 @@ index f7495f0..3d9b9a2 100644
|
|||||||
if (xev->xfocus.mode != NotifyGrab) {
|
if (xev->xfocus.mode != NotifyGrab) {
|
||||||
ReleaseCapture();
|
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
|
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 1036152..7b2b426 100644
|
index 759194f..13af979 100644
|
||||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||||
@@ -98,6 +98,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
@@ -87,6 +87,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||||
// there is no dialog on the host window.
|
// internal list of open windows.
|
||||||
XID GetModalDialog();
|
static void CleanUpWindowList(void (*func)(aura::Window* window));
|
||||||
|
|
||||||
+ void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; }
|
+ void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; }
|
||||||
+
|
+
|
||||||
@ -253,7 +253,7 @@ index 1036152..7b2b426 100644
|
|||||||
protected:
|
protected:
|
||||||
// Overridden from DesktopWindowTreeHost:
|
// Overridden from DesktopWindowTreeHost:
|
||||||
void Init(aura::Window* content_window,
|
void Init(aura::Window* content_window,
|
||||||
@@ -274,6 +280,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
@@ -263,6 +269,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||||
// The bounds of |xwindow_|.
|
// The bounds of |xwindow_|.
|
||||||
gfx::Rect bounds_in_pixels_;
|
gfx::Rect bounds_in_pixels_;
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ index 1036152..7b2b426 100644
|
|||||||
// Whenever the bounds are set, we keep the previous set of bounds around so
|
// Whenever the bounds are set, we keep the previous set of bounds around so
|
||||||
// we can have a better chance of getting the real
|
// we can have a better chance of getting the real
|
||||||
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
|
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
|
||||||
@@ -310,6 +319,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
@@ -299,6 +308,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||||
// Whether we used an ARGB visual for our window.
|
// Whether we used an ARGB visual for our window.
|
||||||
bool use_argb_visual_;
|
bool use_argb_visual_;
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ index 1036152..7b2b426 100644
|
|||||||
DesktopDragDropClientAuraX11* drag_drop_client_;
|
DesktopDragDropClientAuraX11* drag_drop_client_;
|
||||||
|
|
||||||
scoped_ptr<ui::EventHandler> x11_non_client_event_filter_;
|
scoped_ptr<ui::EventHandler> x11_non_client_event_filter_;
|
||||||
@@ -366,6 +379,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
@@ -351,6 +364,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||||
|
|
||||||
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
|
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ index 1036152..7b2b426 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
diff --git ui/views/widget/desktop_aura/x11_desktop_handler.cc ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
diff --git ui/views/widget/desktop_aura/x11_desktop_handler.cc ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||||
index 9b20295..20b1aec 100644
|
index 5ab84f9..c4095fa 100644
|
||||||
--- ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
--- ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||||
+++ 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;
|
@@ -31,6 +31,30 @@ views::X11DesktopHandler* g_handler = NULL;
|
||||||
@ -346,26 +346,18 @@ index 9b20295..20b1aec 100644
|
|||||||
x_active_window_ = None;
|
x_active_window_ = None;
|
||||||
}
|
}
|
||||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||||
index 18aa4c6..147c5a7 100644
|
index 88a68da..faf4da6 100644
|
||||||
--- ui/views/widget/widget.cc
|
--- ui/views/widget/widget.cc
|
||||||
+++ ui/views/widget/widget.cc
|
+++ ui/views/widget/widget.cc
|
||||||
@@ -126,6 +126,7 @@ Widget::InitParams::InitParams()
|
@@ -128,6 +128,7 @@ Widget::InitParams::InitParams(Type type)
|
||||||
use_system_default_icon(false),
|
use_system_default_icon(false),
|
||||||
show_state(ui::SHOW_STATE_DEFAULT),
|
show_state(ui::SHOW_STATE_DEFAULT),
|
||||||
parent(nullptr),
|
parent(nullptr),
|
||||||
+ parent_widget(gfx::kNullAcceleratedWidget),
|
+ parent_widget(gfx::kNullAcceleratedWidget),
|
||||||
native_widget(nullptr),
|
native_widget(nullptr),
|
||||||
native_theme(nullptr),
|
|
||||||
desktop_window_tree_host(nullptr),
|
desktop_window_tree_host(nullptr),
|
||||||
@@ -151,6 +152,7 @@ Widget::InitParams::InitParams(Type type)
|
layer_type(ui::LAYER_TEXTURED),
|
||||||
use_system_default_icon(false),
|
@@ -303,7 +304,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||||
show_state(ui::SHOW_STATE_DEFAULT),
|
|
||||||
parent(nullptr),
|
|
||||||
+ parent_widget(gfx::kNullAcceleratedWidget),
|
|
||||||
native_widget(nullptr),
|
|
||||||
native_theme(nullptr),
|
|
||||||
desktop_window_tree_host(nullptr),
|
|
||||||
@@ -328,7 +330,7 @@ void Widget::Init(const InitParams& in_params) {
|
|
||||||
InitParams params = in_params;
|
InitParams params = in_params;
|
||||||
|
|
||||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||||
@ -374,7 +366,7 @@ index 18aa4c6..147c5a7 100644
|
|||||||
|
|
||||||
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
|
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
|
||||||
params.type != views::Widget::InitParams::TYPE_WINDOW &&
|
params.type != views::Widget::InitParams::TYPE_WINDOW &&
|
||||||
@@ -391,7 +393,12 @@ void Widget::Init(const InitParams& in_params) {
|
@@ -365,7 +366,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||||
Minimize();
|
Minimize();
|
||||||
} else if (params.delegate) {
|
} else if (params.delegate) {
|
||||||
SetContentsView(params.delegate->GetContentsView());
|
SetContentsView(params.delegate->GetContentsView());
|
||||||
@ -389,10 +381,10 @@ index 18aa4c6..147c5a7 100644
|
|||||||
// This must come after SetContentsView() or it might not be able to find
|
// This must come after SetContentsView() or it might not be able to find
|
||||||
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
||||||
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
||||||
index 80aadde..c278b84 100644
|
index 8c92b90..869a7b8 100644
|
||||||
--- ui/views/widget/widget.h
|
--- ui/views/widget/widget.h
|
||||||
+++ ui/views/widget/widget.h
|
+++ ui/views/widget/widget.h
|
||||||
@@ -234,6 +234,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
@@ -233,6 +233,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||||
// Whether the widget should be maximized or minimized.
|
// Whether the widget should be maximized or minimized.
|
||||||
ui::WindowShowState show_state;
|
ui::WindowShowState show_state;
|
||||||
gfx::NativeView parent;
|
gfx::NativeView parent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||||
index e728623..e0f051e 100644
|
index 02bb02e..eca142e 100644
|
||||||
--- Source/web/ChromeClientImpl.cpp
|
--- Source/web/ChromeClientImpl.cpp
|
||||||
+++ Source/web/ChromeClientImpl.cpp
|
+++ Source/web/ChromeClientImpl.cpp
|
||||||
@@ -825,7 +825,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
@@ -834,7 +834,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||||
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
||||||
{
|
{
|
||||||
notifyPopupOpeningObservers();
|
notifyPopupOpeningObservers();
|
||||||
@ -12,7 +12,7 @@ index e728623..e0f051e 100644
|
|||||||
|
|
||||||
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
|
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||||
index 416f9d8..43934e3 100644
|
index 25425db..26aac0f 100644
|
||||||
--- Source/web/WebViewImpl.cpp
|
--- Source/web/WebViewImpl.cpp
|
||||||
+++ Source/web/WebViewImpl.cpp
|
+++ Source/web/WebViewImpl.cpp
|
||||||
@@ -476,6 +476,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
@@ -476,6 +476,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||||
@ -23,7 +23,7 @@ index 416f9d8..43934e3 100644
|
|||||||
, m_doingDragAndDrop(false)
|
, m_doingDragAndDrop(false)
|
||||||
, m_ignoreInputEvents(false)
|
, m_ignoreInputEvents(false)
|
||||||
, m_compositorDeviceScaleFactorOverride(0)
|
, m_compositorDeviceScaleFactorOverride(0)
|
||||||
@@ -4138,9 +4139,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
@@ -4148,9 +4149,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||||
m_client->pageScaleFactorChanged();
|
m_client->pageScaleFactorChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ index 416f9d8..43934e3 100644
|
|||||||
|
|
||||||
void WebViewImpl::startDragging(LocalFrame* frame,
|
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||||
index cc4c325..b709524 100644
|
index 9ee6613..74e5494 100644
|
||||||
--- Source/web/WebViewImpl.h
|
--- Source/web/WebViewImpl.h
|
||||||
+++ Source/web/WebViewImpl.h
|
+++ Source/web/WebViewImpl.h
|
||||||
@@ -395,7 +395,8 @@ public:
|
@@ -395,7 +395,8 @@ public:
|
||||||
@ -53,7 +53,7 @@ index cc4c325..b709524 100644
|
|||||||
|
|
||||||
bool shouldAutoResize() const
|
bool shouldAutoResize() const
|
||||||
{
|
{
|
||||||
@@ -692,6 +693,8 @@ private:
|
@@ -691,6 +692,8 @@ private:
|
||||||
float m_fakePageScaleAnimationPageScaleFactor;
|
float m_fakePageScaleAnimationPageScaleFactor;
|
||||||
bool m_fakePageScaleAnimationUseAnchor;
|
bool m_fakePageScaleAnimationUseAnchor;
|
||||||
|
|
||||||
|
@ -14,6 +14,27 @@ namespace {
|
|||||||
// The default URL to load in a browser window.
|
// The default URL to load in a browser window.
|
||||||
const char kDefaultUrl[] = "http://www.google.com";
|
const char kDefaultUrl[] = "http://www.google.com";
|
||||||
|
|
||||||
|
// Returns the ARGB value for |color|.
|
||||||
|
cef_color_t ParseColor(const std::string& color) {
|
||||||
|
std::string colorToLower;
|
||||||
|
colorToLower.resize(color.size());
|
||||||
|
std::transform(color.begin(), color.end(), colorToLower.begin(), ::tolower);
|
||||||
|
|
||||||
|
if (colorToLower == "black")
|
||||||
|
return CefColorSetARGB(255, 0, 0, 0);
|
||||||
|
else if (colorToLower == "blue")
|
||||||
|
return CefColorSetARGB(255, 0, 0, 255);
|
||||||
|
else if (colorToLower == "green")
|
||||||
|
return CefColorSetARGB(255, 0, 255, 0);
|
||||||
|
else if (colorToLower == "red")
|
||||||
|
return CefColorSetARGB(255, 255, 0, 0);
|
||||||
|
else if (colorToLower == "white")
|
||||||
|
return CefColorSetARGB(255, 255, 255, 255);
|
||||||
|
|
||||||
|
// Use the default color.
|
||||||
|
return 0U;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
||||||
@ -33,8 +54,8 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
|||||||
|
|
||||||
if (command_line_->HasSwitch(switches::kBackgroundColor)) {
|
if (command_line_->HasSwitch(switches::kBackgroundColor)) {
|
||||||
// Parse the background color value.
|
// Parse the background color value.
|
||||||
CefParseCSSColor(command_line_->GetSwitchValue(switches::kBackgroundColor),
|
background_color_ =
|
||||||
false, background_color_);
|
ParseColor(command_line_->GetSwitchValue(switches::kBackgroundColor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const char* kTestOrigin = "http://tests/";
|
// Geolocation access is now restricted to "secure" origins.
|
||||||
const char* kTestUrl = "http://tests/GeolocationTestHandler";
|
const char* kTestOrigin = "https://tests/";
|
||||||
const char* kTestAllowUrl = "http://tests/GeolocationTestHandler.Allow";
|
const char* kTestUrl = "https://tests/GeolocationTestHandler";
|
||||||
const char* kTestDenyUrl = "http://tests/GeolocationTestHandler.Deny";
|
const char* kTestAllowUrl = "https://tests/GeolocationTestHandler.Allow";
|
||||||
const char* kTestCancelUrl = "http://tests/GeolocationTestHandler.Cancel";
|
const char* kTestDenyUrl = "https://tests/GeolocationTestHandler.Deny";
|
||||||
|
const char* kTestCancelUrl = "https://tests/GeolocationTestHandler.Cancel";
|
||||||
|
|
||||||
enum TestMode {
|
enum TestMode {
|
||||||
TEST_ALLOW,
|
TEST_ALLOW,
|
||||||
|
@ -88,7 +88,6 @@ const CefRect kSelectRect(461, 21, 87, 26);
|
|||||||
const CefRect kExpandedSelectRect(463, 42, 78, 286);
|
const CefRect kExpandedSelectRect(463, 42, 78, 286);
|
||||||
const CefRect kDropDivRect(9, 330, 52, 52);
|
const CefRect kDropDivRect(9, 330, 52, 52);
|
||||||
const CefRect kDragDivRect(60, 330, 52, 52);
|
const CefRect kDragDivRect(60, 330, 52, 52);
|
||||||
const int kVerticalScrollbarWidth = 15;
|
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
const CefRect kEditBoxRect(434, 246, 60, 20);
|
const CefRect kEditBoxRect(434, 246, 60, 20);
|
||||||
const CefRect kNavigateButtonRect(380, 271, 140, 22);
|
const CefRect kNavigateButtonRect(380, 271, 140, 22);
|
||||||
@ -537,11 +536,11 @@ class OSRTestHandler : public RoutingTestHandler,
|
|||||||
case OSR_TEST_RESIZE:
|
case OSR_TEST_RESIZE:
|
||||||
if (StartTest()) {
|
if (StartTest()) {
|
||||||
browser->GetHost()->WasResized();
|
browser->GetHost()->WasResized();
|
||||||
} else {
|
// There may be some partial repaints before the full repaint.
|
||||||
|
} else if (IsFullRepaint(dirtyRects[0], width, height)) {
|
||||||
EXPECT_EQ(GetScaledInt(kOsrWidth) * 2, width);
|
EXPECT_EQ(GetScaledInt(kOsrWidth) * 2, width);
|
||||||
EXPECT_EQ(GetScaledInt(kOsrHeight) * 2, height);
|
EXPECT_EQ(GetScaledInt(kOsrHeight) * 2, height);
|
||||||
EXPECT_EQ(dirtyRects.size(), 1U);
|
EXPECT_EQ(dirtyRects.size(), 1U);
|
||||||
EXPECT_TRUE(IsFullRepaint(dirtyRects[0], width, height));
|
|
||||||
DestroySucceededTestSoon();
|
DestroySucceededTestSoon();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -616,20 +615,11 @@ class OSRTestHandler : public RoutingTestHandler,
|
|||||||
browser->GetHost()->SendMouseWheelEvent(mouse_event, 0, - deltaY);
|
browser->GetHost()->SendMouseWheelEvent(mouse_event, 0, - deltaY);
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(dirtyRects.size(), 1U);
|
EXPECT_EQ(dirtyRects.size(), 1U);
|
||||||
#if defined(OS_MACOSX)
|
|
||||||
const CefRect& expected_rect1 =
|
|
||||||
GetScaledRect(CefRect(0, 0, kOsrWidth, kOsrHeight));
|
|
||||||
const CefRect& expected_rect2 =
|
|
||||||
GetScaledRect(CefRect(0, 0, kOsrWidth - kVerticalScrollbarWidth,
|
|
||||||
kOsrHeight));
|
|
||||||
EXPECT_TRUE(dirtyRects[0] == expected_rect1 ||
|
|
||||||
dirtyRects[0] == expected_rect2);
|
|
||||||
#else
|
|
||||||
const CefRect& expected_rect =
|
const CefRect& expected_rect =
|
||||||
GetScaledRect(CefRect(0, 0, kOsrWidth, kOsrHeight));
|
GetScaledRect(CefRect(0, 0, kOsrWidth, kOsrHeight));
|
||||||
EXPECT_EQ(expected_rect, dirtyRects[0]);
|
// There may be some partial repaints before the full repaint.
|
||||||
#endif
|
if (dirtyRects[0] == expected_rect)
|
||||||
DestroySucceededTestSoon();
|
DestroySucceededTestSoon();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -303,42 +303,6 @@ TEST(ParserTest, URIDecode) {
|
|||||||
EXPECT_STREQ(test_str_decoded.c_str(), decoded_value.ToString().c_str());
|
EXPECT_STREQ(test_str_decoded.c_str(), decoded_value.ToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ParserTest, ParseCSSColor) {
|
|
||||||
std::string value;
|
|
||||||
cef_color_t color;
|
|
||||||
|
|
||||||
// Color by name.
|
|
||||||
value = "red";
|
|
||||||
color = 0;
|
|
||||||
EXPECT_TRUE(CefParseCSSColor(value, false, color));
|
|
||||||
EXPECT_EQ(CefColorSetARGB(255, 255, 0, 0), color);
|
|
||||||
|
|
||||||
// Color by RGB.
|
|
||||||
value = "rgb(1,2,3)";
|
|
||||||
color = 0;
|
|
||||||
EXPECT_TRUE(CefParseCSSColor(value, false, color));
|
|
||||||
EXPECT_EQ(CefColorSetARGB(255, 1, 2, 3), color);
|
|
||||||
|
|
||||||
// Color by RGBA.
|
|
||||||
value = "rgba(1,2,3,0.0)";
|
|
||||||
color = 0;
|
|
||||||
EXPECT_TRUE(CefParseCSSColor(value, false, color));
|
|
||||||
EXPECT_EQ(CefColorSetARGB(0, 1, 2, 3), color);
|
|
||||||
|
|
||||||
// Color by hex code.
|
|
||||||
value = "#FFAACC";
|
|
||||||
color = 0;
|
|
||||||
EXPECT_TRUE(CefParseCSSColor(value, false, color));
|
|
||||||
EXPECT_EQ(CefColorSetARGB(255, 0xFF, 0xAA, 0xCC), color);
|
|
||||||
|
|
||||||
// Invalid color.
|
|
||||||
value = "not_a_color";
|
|
||||||
color = 0;
|
|
||||||
EXPECT_FALSE(CefParseCSSColor(value, false, color));
|
|
||||||
EXPECT_EQ(0U, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TEST(ParserTest, ParseJSONInvalid) {
|
TEST(ParserTest, ParseJSONInvalid) {
|
||||||
const char data[] = "This is my test data";
|
const char data[] = "This is my test data";
|
||||||
CefRefPtr<CefValue> value = CefParseJSON(data, JSON_PARSER_RFC);
|
CefRefPtr<CefValue> value = CefParseJSON(data, JSON_PARSER_RFC);
|
||||||
|
Reference in New Issue
Block a user