commit
6fc6aae62d
19 changed files with 62 additions and 61 deletions
|
@ -32,23 +32,23 @@ struct Converter<std::set<T> > {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct Converter<base::debug::CategoryFilter> {
|
||||
struct Converter<base::trace_event::CategoryFilter> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Handle<v8::Value> val,
|
||||
base::debug::CategoryFilter* out) {
|
||||
base::trace_event::CategoryFilter* out) {
|
||||
std::string filter;
|
||||
if (!ConvertFromV8(isolate, val, &filter))
|
||||
return false;
|
||||
*out = base::debug::CategoryFilter(filter);
|
||||
*out = base::trace_event::CategoryFilter(filter);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Converter<base::debug::TraceOptions> {
|
||||
struct Converter<base::trace_event::TraceOptions> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Handle<v8::Value> val,
|
||||
base::debug::TraceOptions* out) {
|
||||
base::trace_event::TraceOptions* out) {
|
||||
std::string options;
|
||||
if (!ConvertFromV8(isolate, val, &options))
|
||||
return false;
|
||||
|
|
|
@ -315,12 +315,11 @@ content::WebContents* WebContents::GetOwnerWebContents() const {
|
|||
return embedder_web_contents_;
|
||||
}
|
||||
|
||||
void WebContents::GuestSizeChanged(const gfx::Size& old_size,
|
||||
const gfx::Size& new_size) {
|
||||
void WebContents::GuestSizeChanged(const gfx::Size& new_size) {
|
||||
if (!auto_size_enabled_)
|
||||
return;
|
||||
GuestSizeChangedDueToAutoSize(guest_size_, new_size);
|
||||
guest_size_ = new_size;
|
||||
GuestSizeChangedDueToAutoSize(old_size, new_size);
|
||||
}
|
||||
|
||||
void WebContents::RegisterDestructionCallback(
|
||||
|
|
|
@ -180,8 +180,7 @@ class WebContents : public mate::EventEmitter,
|
|||
void DidAttach(int guest_proxy_routing_id) final;
|
||||
void ElementSizeChanged(const gfx::Size& size) final;
|
||||
content::WebContents* GetOwnerWebContents() const final;
|
||||
void GuestSizeChanged(const gfx::Size& old_size,
|
||||
const gfx::Size& new_size) final;
|
||||
void GuestSizeChanged(const gfx::Size& new_size) final;
|
||||
void RegisterDestructionCallback(const DestructionCallback& callback) final;
|
||||
void SetGuestSizer(content::GuestSizer* guest_sizer) final;
|
||||
void WillAttach(content::WebContents* embedder_web_contents,
|
||||
|
|
|
@ -79,7 +79,6 @@ void AtomBrowserClient::ResourceDispatcherHostCreated() {
|
|||
|
||||
void AtomBrowserClient::OverrideWebkitPrefs(
|
||||
content::RenderViewHost* render_view_host,
|
||||
const GURL& url,
|
||||
content::WebPreferences* prefs) {
|
||||
prefs->javascript_enabled = true;
|
||||
prefs->web_security_enabled = true;
|
||||
|
@ -99,7 +98,9 @@ void AtomBrowserClient::OverrideWebkitPrefs(
|
|||
prefs->allow_running_insecure_content = false;
|
||||
|
||||
// Turn off web security for devtools.
|
||||
if (url.SchemeIs("chrome-devtools")) {
|
||||
auto web_contents = content::WebContents::FromRenderViewHost(
|
||||
render_view_host);
|
||||
if (web_contents && web_contents->GetURL().SchemeIs("chrome-devtools")) {
|
||||
prefs->web_security_enabled = false;
|
||||
return;
|
||||
}
|
||||
|
@ -115,7 +116,7 @@ void AtomBrowserClient::OverrideWebkitPrefs(
|
|||
NativeWindow* window = NativeWindow::FromRenderView(
|
||||
process->GetID(), render_view_host->GetRoutingID());
|
||||
if (window)
|
||||
window->OverrideWebkitPrefs(url, prefs);
|
||||
window->OverrideWebkitPrefs(prefs);
|
||||
}
|
||||
|
||||
bool AtomBrowserClient::ShouldSwapBrowsingInstancesForNavigation(
|
||||
|
|
|
@ -26,7 +26,6 @@ class AtomBrowserClient : public brightray::BrowserClient {
|
|||
content::AccessTokenStore* CreateAccessTokenStore() override;
|
||||
void ResourceDispatcherHostCreated() override;
|
||||
void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
|
||||
const GURL& url,
|
||||
content::WebPreferences* prefs) override;
|
||||
bool ShouldSwapBrowsingInstancesForNavigation(
|
||||
content::SiteInstance* site_instance,
|
||||
|
|
|
@ -435,8 +435,7 @@ void NativeWindow::AppendExtraCommandLineSwitches(
|
|||
}
|
||||
}
|
||||
|
||||
void NativeWindow::OverrideWebkitPrefs(const GURL& url,
|
||||
content::WebPreferences* prefs) {
|
||||
void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
|
||||
if (web_preferences_.IsEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
// Called when renderer process is going to be started.
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id);
|
||||
void OverrideWebkitPrefs(const GURL& url, content::WebPreferences* prefs);
|
||||
void OverrideWebkitPrefs(content::WebPreferences* prefs);
|
||||
|
||||
// Public API used by platform-dependent delegates and observers to send UI
|
||||
// related notifications.
|
||||
|
|
|
@ -42,7 +42,8 @@ void WebViewManager::AddGuest(int guest_instance_id,
|
|||
webview_info_map_[guest_process_id] = info;
|
||||
|
||||
// Map the element in embedder to guest.
|
||||
ElementInstanceKey key(embedder, element_instance_id);
|
||||
int owner_process_id = embedder->GetRenderProcessHost()->GetID();
|
||||
ElementInstanceKey key(owner_process_id, element_instance_id);
|
||||
element_instance_id_to_guest_map_[key] = guest_instance_id;
|
||||
}
|
||||
|
||||
|
@ -76,9 +77,9 @@ bool WebViewManager::GetInfo(int guest_process_id, WebViewInfo* webview_info) {
|
|||
}
|
||||
|
||||
content::WebContents* WebViewManager::GetGuestByInstanceID(
|
||||
content::WebContents* embedder,
|
||||
int owner_process_id,
|
||||
int element_instance_id) {
|
||||
ElementInstanceKey key(embedder, element_instance_id);
|
||||
ElementInstanceKey key(owner_process_id, element_instance_id);
|
||||
if (!ContainsKey(element_instance_id_to_guest_map_, key))
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -50,9 +50,8 @@ class WebViewManager : public content::BrowserPluginGuestManager {
|
|||
|
||||
protected:
|
||||
// content::BrowserPluginGuestManager:
|
||||
content::WebContents* GetGuestByInstanceID(
|
||||
content::WebContents* embedder_web_contents,
|
||||
int element_instance_id) override;
|
||||
content::WebContents* GetGuestByInstanceID(int owner_process_id,
|
||||
int element_instance_id) override;
|
||||
bool ForEachGuest(content::WebContents* embedder,
|
||||
const GuestCallback& callback) override;
|
||||
|
||||
|
@ -65,26 +64,25 @@ class WebViewManager : public content::BrowserPluginGuestManager {
|
|||
std::map<int, WebContentsWithEmbedder> web_contents_embdder_map_;
|
||||
|
||||
struct ElementInstanceKey {
|
||||
content::WebContents* owner_web_contents;
|
||||
int embedder_process_id;
|
||||
int element_instance_id;
|
||||
|
||||
ElementInstanceKey(content::WebContents* owner_web_contents,
|
||||
int element_instance_id)
|
||||
: owner_web_contents(owner_web_contents),
|
||||
ElementInstanceKey(int embedder_process_id, int element_instance_id)
|
||||
: embedder_process_id(embedder_process_id),
|
||||
element_instance_id(element_instance_id) {}
|
||||
|
||||
bool operator<(const ElementInstanceKey& other) const {
|
||||
if (owner_web_contents != other.owner_web_contents)
|
||||
return owner_web_contents < other.owner_web_contents;
|
||||
if (embedder_process_id != other.embedder_process_id)
|
||||
return embedder_process_id < other.embedder_process_id;
|
||||
return element_instance_id < other.element_instance_id;
|
||||
}
|
||||
|
||||
bool operator==(const ElementInstanceKey& other) const {
|
||||
return (owner_web_contents == other.owner_web_contents) &&
|
||||
return (embedder_process_id == other.embedder_process_id) &&
|
||||
(element_instance_id == other.element_instance_id);
|
||||
}
|
||||
};
|
||||
// (web_contents, element_instance_id) => guest_instance_id
|
||||
// (embedder_process_id, element_instance_id) => guest_instance_id
|
||||
std::map<ElementInstanceKey, int> element_instance_id_to_guest_map_;
|
||||
|
||||
typedef std::map<int, WebViewInfo> WebViewInfoMap;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef ATOM_COMMON_CHROME_VERSION_H_
|
||||
#define ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
||||
#define CHROME_VERSION_STRING "41.0.2272.76"
|
||||
#define CHROME_VERSION_STRING "42.0.2311.107"
|
||||
#define CHROME_VERSION "v" CHROME_VERSION_STRING
|
||||
|
||||
#endif // ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
@ -128,7 +129,10 @@ void ShowItemInFolder(const base::FilePath& full_path) {
|
|||
}
|
||||
|
||||
void OpenItem(const base::FilePath& full_path) {
|
||||
ui::win::OpenItemViaShell(full_path);
|
||||
if (base::DirectoryExists(full_path))
|
||||
ui::win::OpenFolderViaShell(full_path);
|
||||
else
|
||||
ui::win::OpenFileViaShell(full_path);
|
||||
}
|
||||
|
||||
void OpenExternal(const GURL& url) {
|
||||
|
|
|
@ -425,8 +425,10 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
|||
virtual void didStopLoading();
|
||||
|
||||
// blink::WebFrameClient override:
|
||||
virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent,
|
||||
const blink::WebString& name);
|
||||
virtual blink::WebFrame* createChildFrame(
|
||||
blink::WebLocalFrame* parent,
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags);
|
||||
virtual void frameDetached(blink::WebFrame* frame);
|
||||
|
||||
private:
|
||||
|
@ -571,7 +573,8 @@ void PrepareFrameAndViewForPrint::didStopLoading() {
|
|||
|
||||
blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
|
||||
blink::WebLocalFrame* parent,
|
||||
const blink::WebString& name) {
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags) {
|
||||
blink::WebFrame* frame = blink::WebLocalFrame::create(this);
|
||||
parent->appendChild(frame);
|
||||
return frame;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "printing/page_size_margins.h"
|
||||
#include "printing/pdf_metafile_skia.h"
|
||||
#include "skia/ext/platform_device.h"
|
||||
#include "skia/ext/vector_canvas.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
|
||||
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "printing/metafile_skia_wrapper.h"
|
||||
#include "printing/page_size_margins.h"
|
||||
#include "skia/ext/platform_device.h"
|
||||
#include "skia/ext/vector_canvas.h"
|
||||
#include "third_party/WebKit/public/platform/WebCanvas.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "printing/pdf_metafile_skia.h"
|
||||
#include "printing/units.h"
|
||||
#include "skia/ext/platform_device.h"
|
||||
#include "skia/ext/vector_canvas.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
|
||||
|
||||
|
|
39
common.gypi
39
common.gypi
|
@ -115,28 +115,29 @@
|
|||
'conditions': [
|
||||
['target_arch=="ia32"', {
|
||||
'reference_symbols': [
|
||||
'_u_errorName_52',
|
||||
'_ubidi_setPara_52',
|
||||
'_ucsdet_getName_52',
|
||||
'_ulocdata_close_52',
|
||||
'_uregex_matches_52',
|
||||
'_uscript_getCode_52',
|
||||
'_usearch_setPattern_52',
|
||||
'?createInstance@Transliterator@icu_52@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
|
||||
'?nameToUnicodeUTF8@IDNA@icu_52@@UBEXABVStringPiece@2@AAVByteSink@2@AAVIDNAInfo@2@AAW4UErrorCode@@@Z',
|
||||
'?kLineOffsetNotFound@Function@v8@@2HB',
|
||||
'_u_errorName_54',
|
||||
'_ubidi_setPara_54',
|
||||
'_ucsdet_getName_54',
|
||||
'_uidna_openUTS46_54',
|
||||
'_ulocdata_close_54',
|
||||
'_unorm_normalize_54',
|
||||
'_uregex_matches_54',
|
||||
'_uscript_getCode_54',
|
||||
'_usearch_setPattern_54',
|
||||
'?createInstance@Transliterator@icu_54@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
|
||||
],
|
||||
}, {
|
||||
'reference_symbols': [
|
||||
'u_errorName_52',
|
||||
'ubidi_setPara_52',
|
||||
'ucsdet_getName_52',
|
||||
'uidna_openUTS46_52',
|
||||
'ulocdata_close_52',
|
||||
'uregex_matches_52',
|
||||
'uscript_getCode_52',
|
||||
'usearch_setPattern_52',
|
||||
'?createInstance@Transliterator@icu_52@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z'
|
||||
'u_errorName_54',
|
||||
'ubidi_setPara_54',
|
||||
'ucsdet_getName_54',
|
||||
'uidna_openUTS46_54',
|
||||
'ulocdata_close_54',
|
||||
'unorm_normalize_54',
|
||||
'uregex_matches_54',
|
||||
'uscript_getCode_54',
|
||||
'usearch_setPattern_54',
|
||||
'?createInstance@Transliterator@icu_54@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z',
|
||||
],
|
||||
}],
|
||||
],
|
||||
|
|
|
@ -7,7 +7,7 @@ import sys
|
|||
|
||||
|
||||
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
|
||||
LIBCHROMIUMCONTENT_COMMIT = 'f1ad1412461ba3345a27cfe935ffc872dba0ac5b'
|
||||
LIBCHROMIUMCONTENT_COMMIT = '0529dc17ca2f950b671cf12f82260cc397b4cebb'
|
||||
|
||||
PLATFORM = {
|
||||
'cygwin': 'win32',
|
||||
|
|
|
@ -22,4 +22,4 @@ describe 'app module', ->
|
|||
assert.equal app.getName(), 'Electron Test'
|
||||
app.setName 'test-name'
|
||||
assert.equal app.getName(), 'test-name'
|
||||
app.setName 'Electron Test App'
|
||||
app.setName 'Electron Test'
|
||||
|
|
2
vendor/brightray
vendored
2
vendor/brightray
vendored
|
@ -1 +1 @@
|
|||
Subproject commit e2539f3550ddc58f1f4e826b5ff9691485003d39
|
||||
Subproject commit 685435ae679affcfcb095c546b3e884cbbc9f898
|
Loading…
Reference in a new issue