Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b1eede3
WIP: chrome 54 update
groundwater Nov 9, 2016
8337c46
update atom_browser_client.h
groundwater Nov 11, 2016
123d532
Update brightray and libchromiumcontent to Chrome 54
zcbenz Nov 29, 2016
0f21f81
Update crashpad
zcbenz Nov 29, 2016
1e8e7c9
Update files for Chrome 54 API changes
zcbenz Nov 30, 2016
5266c56
Fix wrong library paths
zcbenz Nov 30, 2016
5d2a7e2
Fix linking errors on Mac
zcbenz Dec 1, 2016
36d48ae
Linking path to libffmpeg.dylib has changed
zcbenz Dec 1, 2016
166f0dd
Fix compilation errors for Linux
zcbenz Dec 2, 2016
cdb4d4d
Fix linking problem with libgtk2ui
zcbenz Dec 2, 2016
9c5d361
Fix linking error for x64 Linux build
zcbenz Dec 6, 2016
f415353
Update libchromiumcontent for the rebase
zcbenz Dec 11, 2016
6aadeea
Fix building on Windows
zcbenz Dec 12, 2016
59e6685
Fix linking for Windows
zcbenz Dec 12, 2016
250eeea
Fix building error for arm linux
zcbenz Dec 15, 2016
c90f209
Fix linking for arm build
zcbenz Dec 15, 2016
4b61800
gyp does not allow empty lists in variables
zcbenz Dec 15, 2016
c9182b2
Update to latest libchromiumcontent
zcbenz Dec 16, 2016
9bcbdae
Append form to body before submitting
kevinsawicki Dec 19, 2016
c745736
Update type to level in debugger message spec
kevinsawicki Dec 19, 2016
6d7eb73
Add spec for midi without sysex permission
kevinsawicki Dec 19, 2016
561458a
Implement RequestPermissions using request handler
kevinsawicki Dec 19, 2016
5d0c9f0
Add spec for denying perm requests when handler is cleared
kevinsawicki Dec 19, 2016
4c067ba
Add failing spec for insertCSS
kevinsawicki Dec 19, 2016
75b6bf7
Implement insertCSS on webFrame
kevinsawicki Dec 19, 2016
a4522a5
Call InspectElement directly on InspectableWebContents
kevinsawicki Dec 20, 2016
7d2ba2a
Use === in specs
kevinsawicki Dec 20, 2016
6ee34ee
Only remove webview when non-null
kevinsawicki Dec 20, 2016
184b6bd
Implement SetNeedsBeginFrames
kevinsawicki Dec 20, 2016
a76ea8f
Implement GetScreenInfo
kevinsawicki Dec 20, 2016
5ecfb42
Use SetNeedsBeginFrames from IPC handler
kevinsawicki Dec 20, 2016
4561f85
:art:
kevinsawicki Dec 20, 2016
be0028f
Add basic inspectElement spec
kevinsawicki Dec 20, 2016
8caa8b6
Upgrade to Chrome 54.0.2840.101
kevinsawicki Jan 12, 2017
1a63b1a
Upgrade brightray for latest chrome 54 changes
kevinsawicki Jan 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update files for Chrome 54 API changes
  • Loading branch information
zcbenz authored and kevinsawicki committed Jan 14, 2017
commit 1e8e7c940cba8e91cfc08a3f8f7f2ca32b51a20e
2 changes: 1 addition & 1 deletion 2 atom/app/node_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int NodeMain(int argc, char *argv[]) {
// Start our custom debugger implementation.
NodeDebugger node_debugger(gin_env.isolate());
if (node_debugger.IsRunning())
env->AssignToContext(v8::Debug::GetDebugContext());
env->AssignToContext(v8::Debug::GetDebugContext(gin_env.isolate()));

#if defined(OS_WIN)
mate::Dictionary process(gin_env.isolate(), env->process_object());
Expand Down
21 changes: 17 additions & 4 deletions 21 atom/browser/api/atom_api_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,21 @@ struct Converter<Browser::LoginItemSettings> {
return dict.GetHandle();
}
};
} // namespace mate

template<>
struct Converter<content::CertificateRequestResultType> {
static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,
content::CertificateRequestResultType* out) {
bool b;
if (!ConvertFromV8(isolate, val, &b))
return false;
*out = b ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
return true;
}
};

} // namespace mate

namespace atom {

Expand Down Expand Up @@ -573,8 +586,8 @@ void App::AllowCertificateError(
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) {
const base::Callback<void(content::CertificateRequestResultType)>&
callback) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
bool prevent_default = Emit("certificate-error",
Expand All @@ -586,7 +599,7 @@ void App::AllowCertificateError(

// Deny the certificate by default.
if (!prevent_default)
*request = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY;
callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
}

void App::SelectClientCertificate(
Expand Down
4 changes: 2 additions & 2 deletions 4 atom/browser/api/atom_api_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class App : public AtomBrowserClient::Delegate,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) override;
const base::Callback<void(content::CertificateRequestResultType)>&
callback) override;
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
Expand Down
5 changes: 3 additions & 2 deletions 5 atom/browser/api/atom_api_download_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "native_mate/dictionary.h"
#include "net/base/filename_util.h"

Expand Down Expand Up @@ -80,7 +80,8 @@ void DownloadItem::OnDownloadUpdated(content::DownloadItem* item) {
Emit("done", item->GetState());

// Destroy the item once item is downloaded.
base::MessageLoop::current()->PostTask(FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
} else {
Emit("updated", item->GetState());
}
Expand Down
8 changes: 4 additions & 4 deletions 8 atom/browser/api/atom_api_power_save_blocker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "atom/common/node_includes.h"

using content::BrowserThread;

namespace mate {

template<>
Expand Down Expand Up @@ -76,10 +78,8 @@ void PowerSaveBlocker::UpdatePowerSaveBlocker() {
new_blocker_type,
device::PowerSaveBlocker::kReasonOther,
ATOM_PRODUCT_NAME,
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE)));
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
power_save_blocker_.swap(new_blocker);
current_blocker_type_ = new_blocker_type;
}
Expand Down
4 changes: 2 additions & 2 deletions 4 atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ class ResolveProxyHelper {

// Start the request.
int result = proxy_service->ResolveProxy(
url, "GET", net::LOAD_NORMAL, &proxy_info_, completion_callback,
&pac_req_, nullptr, net::BoundNetLog());
url, "GET", &proxy_info_, completion_callback, &pac_req_, nullptr,
net::BoundNetLog());

// Completed synchronously.
if (result != net::ERR_IO_PENDING)
Expand Down
4 changes: 3 additions & 1 deletion 4 atom/browser/api/atom_api_tray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "atom/common/native_mate_converters/image_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/node_includes.h"
#include "base/threading/thread_task_runner_handle.h"
#include "native_mate/constructor.h"
#include "native_mate/dictionary.h"
#include "ui/gfx/image/image.h"
Expand Down Expand Up @@ -71,7 +72,8 @@ Tray::Tray(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,

Tray::~Tray() {
// Destroy the native tray in next tick.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, tray_icon_.release());
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(
FROM_HERE, tray_icon_.release());
}

// static
Expand Down
9 changes: 6 additions & 3 deletions 9 atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "chrome/browser/printing/print_preview_message_handler.h"
Expand Down Expand Up @@ -830,7 +831,8 @@ void WebContents::WebContentsDestroyed() {
Emit("destroyed");

// Destroy the native class in next tick.
base::MessageLoop::current()->PostTask(FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
}

void WebContents::NavigationEntryCommitted(
Expand Down Expand Up @@ -976,7 +978,7 @@ std::string WebContents::GetUserAgent() {
}

void WebContents::InsertCSS(const std::string& css) {
web_contents()->InsertCSS(css);
// FIXME(zcbenz): Redirect this method to webFrame.
}

bool WebContents::SavePage(const base::FilePath& full_file_path,
Expand Down Expand Up @@ -1066,7 +1068,8 @@ void WebContents::InspectElement(int x, int y) {
OpenDevTools(nullptr);
scoped_refptr<content::DevToolsAgentHost> agent(
content::DevToolsAgentHost::GetOrCreateFor(web_contents()));
agent->InspectElement(x, y);
// FIXME(zcbenz): Figure out how to implement this for Chrome 54.
agent->InspectElement(nullptr, x, y);
}

void WebContents::InspectServiceWorker() {
Expand Down
6 changes: 4 additions & 2 deletions 6 atom/browser/api/atom_api_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h"
#include "native_mate/constructor.h"
Expand Down Expand Up @@ -152,7 +153,7 @@ Window::~Window() {

// Destroy the native window in next tick because the native code might be
// iterating all windows.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, window_.release());
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, window_.release());
}

void Window::WillCloseWindow(bool* prevent_default) {
Expand Down Expand Up @@ -185,7 +186,8 @@ void Window::OnWindowClosed() {
RemoveFromParentChildWindows();

// Destroy the native class when window is closed.
base::MessageLoop::current()->PostTask(FROM_HERE, GetDestroyClosure());
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, GetDestroyClosure());
}

void Window::OnWindowBlur() {
Expand Down
2 changes: 1 addition & 1 deletion 2 atom/browser/atom_blob_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void AtomBlobReader::StartReading(

auto blob_reader = blob_data_handle->CreateReader(
file_system_context_.get(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get());
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get());
BlobReadHelper* blob_read_helper =
new BlobReadHelper(std::move(blob_reader), callback);
blob_read_helper->Read();
Expand Down
30 changes: 5 additions & 25 deletions 30 atom/browser/atom_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "atom/browser/api/atom_api_app.h"
#include "atom/browser/api/atom_api_protocol.h"
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_quota_permission_context.h"
Expand All @@ -33,7 +32,6 @@
#include "content/common/resource_request_body_impl.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/geolocation_delegate.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
Expand All @@ -56,19 +54,6 @@ bool g_suppress_renderer_process_restart = false;
// Custom schemes to be registered to handle service worker.
std::string g_custom_service_worker_schemes = "";

// A provider of Geolocation services to override AccessTokenStore.
class AtomGeolocationDelegate : public content::GeolocationDelegate {
public:
AtomGeolocationDelegate() = default;

content::AccessTokenStore* CreateAccessTokenStore() final {
return new AtomAccessTokenStore();
}

private:
DISALLOW_COPY_AND_ASSIGN(AtomGeolocationDelegate);
};

void Noop(scoped_refptr<content::SiteInstance>) {
}

Expand All @@ -93,7 +78,7 @@ AtomBrowserClient::~AtomBrowserClient() {
content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
int process_id) {
// If the process is a pending process, we should use the old one.
if (ContainsKey(pending_processes_, process_id))
if (base::ContainsKey(pending_processes_, process_id))
process_id = pending_processes_[process_id];

// Certain render process will be created with no associated render view,
Expand Down Expand Up @@ -160,11 +145,6 @@ content::SpeechRecognitionManagerDelegate*
return new AtomSpeechRecognitionManagerDelegate;
}

content::GeolocationDelegate*
AtomBrowserClient::CreateGeolocationDelegate() {
return new AtomGeolocationDelegate();
}

void AtomBrowserClient::OverrideWebkitPrefs(
content::RenderViewHost* host, content::WebPreferences* prefs) {
prefs->javascript_enabled = true;
Expand Down Expand Up @@ -283,13 +263,13 @@ void AtomBrowserClient::AllowCertificateError(
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) {
const base::Callback<void(content::CertificateRequestResultType)>&
callback) {
if (delegate_) {
delegate_->AllowCertificateError(
web_contents, cert_error, ssl_info, request_url,
resource_type, overridable, strict_enforcement,
expired_previous_decision, callback, request);
expired_previous_decision, callback);
}
}

Expand All @@ -315,9 +295,9 @@ bool AtomBrowserClient::CanCreateWindow(
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const std::string& frame_name,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
const std::vector<base::string16>& additional_features,
Expand Down
7 changes: 3 additions & 4 deletions 7 atom/browser/atom_browser_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class AtomBrowserClient : public brightray::BrowserClient,
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
content::SpeechRecognitionManagerDelegate*
CreateSpeechRecognitionManagerDelegate() override;
device::GeolocationDelegate* CreateGeolocationDelegate() override;
void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
content::WebPreferences* prefs) override;
std::string GetApplicationLocale() override;
Expand All @@ -72,8 +71,8 @@ class AtomBrowserClient : public brightray::BrowserClient,
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* request) override;
const base::Callback<void(content::CertificateRequestResultType)>&
callback) override;
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
Expand All @@ -84,9 +83,9 @@ class AtomBrowserClient : public brightray::BrowserClient,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const std::string& frame_name,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
const std::vector<base::string16>& additional_features,
Expand Down
24 changes: 23 additions & 1 deletion 24 atom/browser/atom_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "atom/browser/atom_browser_main_parts.h"

#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/bridge_task_runner.h"
Expand All @@ -18,6 +19,8 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "content/public/browser/child_process_security_policy.h"
#include "device/geolocation/geolocation_delegate.h"
#include "device/geolocation/geolocation_provider.h"
#include "v8/include/v8-debug.h"

#if defined(USE_X11)
Expand All @@ -27,11 +30,28 @@

namespace atom {

namespace {

// A provider of Geolocation services to override AccessTokenStore.
class AtomGeolocationDelegate : public device::GeolocationDelegate {
public:
AtomGeolocationDelegate() = default;

scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final {
return new AtomAccessTokenStore();
}

private:
DISALLOW_COPY_AND_ASSIGN(AtomGeolocationDelegate);
};

template<typename T>
void Erase(T* container, typename T::iterator iter) {
container->erase(iter);
}

} // namespace

// static
AtomBrowserMainParts* AtomBrowserMainParts::self_ = nullptr;

Expand Down Expand Up @@ -115,7 +135,7 @@ void AtomBrowserMainParts::PostEarlyInitialization() {

// Make sure node can get correct environment when debugging.
if (node_debugger_->IsRunning())
env->AssignToContext(v8::Debug::GetDebugContext());
env->AssignToContext(v8::Debug::GetDebugContext(js_env_->isolate()));

// Add Electron extended APIs.
atom_bindings_->BindTo(js_env_->isolate(), env->process_object());
Expand Down Expand Up @@ -171,6 +191,8 @@ void AtomBrowserMainParts::PostMainMessageLoopStart() {
#if defined(OS_POSIX)
HandleShutdownSignals();
#endif
device::GeolocationProvider::SetGeolocationDelegate(
new AtomGeolocationDelegate());
}

void AtomBrowserMainParts::PostMainMessageLoopRun() {
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.