Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
upgrade to chromium 53.0.2785.116
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Sep 19, 2016
1 parent 1c09ed9 commit e6fed34
Show file tree
Hide file tree
Showing 51 changed files with 224 additions and 218 deletions.
5 changes: 5 additions & 0 deletions atom/browser/api/atom_api_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/browser.h"
#include "atom/browser/login_handler.h"
#include "atom/browser/net/atom_network_delegate.h"
#include "atom/browser/relauncher.h"
#include "atom/common/atom_command_line.h"
#include "atom/common/native_mate_converters/callback.h"
Expand Down Expand Up @@ -646,6 +647,10 @@ void App::AllowCertificateError(
request_url,
net::ErrorToString(cert_error),
ssl_info.cert,
ResourceTypeToString(resource_type),
overridable,
strict_enforcement,
expired_previous_decision,
callback);

// Deny the certificate by default.
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#include "atom/browser/extensions/tab_helper.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/native_mate_converters/v8_value_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "base/files/file_path.h"
#include "components/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "components/prefs/pref_service.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "base/memory/singleton.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "extensions/common/manifest.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"

namespace base {
class FilePath;
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "content/public/browser/child_process_security_policy.h"
#include "native_mate/dictionary.h"
#include "url/url_util.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"

namespace mate {

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#include "atom/browser/net/atom_url_request_job_factory.h"
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "chrome/common/custom_handlers/protocol_handler.h"
#include "content/public/browser/browser_thread.h"
#include "native_mate/arguments.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "net/url_request/url_request_context.h"
#include "chrome/common/custom_handlers/protocol_handler.h"

namespace base {
class DictionaryValue;
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include "atom/common/node_includes.h"
#include "base/files/file_path.h"
#include "base/guid.h"
#include "brave/browser/brave_content_browser_client.h"
#include "brave/browser/brave_permission_manager.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brave/browser/brave_content_browser_client.h"
#include "brave/browser/brave_permission_manager.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "chrome/common/pref_names.h"
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_user_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "content/public/browser/browser_thread.h"

#if defined(ENABLE_EXTENSIONS)
#include "components/syncable_prefs/pref_service_syncable.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/syncable_prefs/pref_service_syncable.h"
#endif

#include "atom/common/native_mate_converters/v8_value_converter.h"
Expand Down
98 changes: 45 additions & 53 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,18 @@
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_preview_message_handler.h"
#include "chrome/browser/printing/print_view_manager_basic.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "chrome/browser/printing/print_preview_message_handler.h"
#include "chrome/browser/printing/print_view_manager_basic.h"
#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/ui/zoom/page_zoom.h"
#include "components/ui/zoom/zoom_controller.h"
#include "components/zoom/page_zoom.h"
#include "components/zoom/zoom_controller.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/browser_plugin_guest_manager.h"
#include "content/public/browser/memory_pressure_controller.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/memory_pressure_controller.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
Expand All @@ -84,8 +83,8 @@
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/display/screen.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/display/screen.h"

#if !defined(OS_MACOSX)
#include "ui/aura/window.h"
Expand Down Expand Up @@ -343,7 +342,7 @@ WebContents::WebContents(v8::Isolate* isolate,
// Intialize security state client.
AtomSecurityStateModelClient::CreateForWebContents(web_contents);
// Initialize zoom state controller
ui_zoom::ZoomController::CreateForWebContents(web_contents);
zoom::ZoomController::CreateForWebContents(web_contents);
brave::RendererPreferencesHelper::CreateForWebContents(web_contents);
// Initialize autofill client
autofill::AtomAutofillClient::CreateForWebContents(web_contents);
Expand Down Expand Up @@ -804,26 +803,6 @@ void WebContents::DocumentLoadedInFrame(
Emit("dom-ready");
}

void WebContents::DidStartProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
bool is_error_page,
bool is_iframe_srcdoc) {
bool is_main_frame = !render_frame_host->GetParent();
Emit("did-start-provisional-load", validated_url, is_error_page,
is_iframe_srcdoc, is_main_frame);
}

void WebContents::DidCommitProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& url,
ui::PageTransition transition_type) {
bool is_main_frame = !render_frame_host->GetParent();
// TODO(bridiver) convert transition type to a string
Emit("did-commit-provisional-load", url,
static_cast<int>(transition_type), is_main_frame);
}

void WebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) {
bool is_main_frame = !render_frame_host->GetParent();
Expand All @@ -833,17 +812,6 @@ void WebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
Emit("did-finish-load");
}

void WebContents::DidFailProvisionalLoad(
content::RenderFrameHost* render_frame_host,
const GURL& url,
int code,
const base::string16& description,
bool was_ignored_by_handler) {
bool is_main_frame = !render_frame_host->GetParent();
Emit("did-fail-provisional-load", code, description, url,
is_main_frame, was_ignored_by_handler);
}

void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& url,
int error_code,
Expand Down Expand Up @@ -888,13 +856,37 @@ void WebContents::DidGetRedirectForResourceRequest(
details.headers.get());
}

void WebContents::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
if (details.is_navigation_to_different_page())
Emit("did-navigate", params.url);
else if (details.is_in_page)
Emit("did-navigate-in-page", params.url);
void WebContents::DidStartNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage())
return;

auto url = navigation_handle->GetURL();
bool is_main_frame = navigation_handle->IsInMainFrame();
bool is_error_page = navigation_handle->IsErrorPage();
bool is_src_doc = navigation_handle->IsSrcdoc();
Emit("load-start", url, is_main_frame, is_error_page, is_src_doc);
}

void WebContents::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
bool is_main_frame = navigation_handle->IsInMainFrame();
auto url = navigation_handle->GetURL();
if (navigation_handle->HasCommitted() && !navigation_handle->IsErrorPage()) {
bool is_in_page = navigation_handle->IsSamePage();
if (!is_in_page) {
Emit("load-commit", url, is_main_frame);
}
if (is_main_frame && !is_in_page) {
Emit("did-navigate", url);
} else if (is_in_page) {
Emit("did-navigate-in-page", url, is_main_frame);
}
} else {
int code = navigation_handle->GetNetErrorCode();
auto description = net::ErrorToShortString(code);
Emit("did-fail-provisional-load", code, description, url, is_main_frame);
}
}

void WebContents::TitleWasSet(content::NavigationEntry* entry,
Expand Down Expand Up @@ -1836,32 +1828,32 @@ v8::Local<v8::Value> WebContents::GetOwnerBrowserWindow() {
}

void WebContents::SetZoomLevel(double zoom) {
ui_zoom::ZoomController* zoom_controller =
ui_zoom::ZoomController::FromWebContents(web_contents());
zoom::ZoomController* zoom_controller =
zoom::ZoomController::FromWebContents(web_contents());
if (!zoom_controller)
return;

zoom_controller->SetZoomLevel(zoom);
}

void WebContents::ZoomIn() {
ui_zoom::PageZoom::Zoom(web_contents(),
zoom::PageZoom::Zoom(web_contents(),
content::PAGE_ZOOM_IN);
}

void WebContents::ZoomOut() {
ui_zoom::PageZoom::Zoom(web_contents(),
zoom::PageZoom::Zoom(web_contents(),
content::PAGE_ZOOM_OUT);
}

void WebContents::ZoomReset() {
ui_zoom::PageZoom::Zoom(web_contents(),
zoom::PageZoom::Zoom(web_contents(),
content::PAGE_ZOOM_RESET);
}

int WebContents::GetZoomPercent() {
ui_zoom::ZoomController* zoom_controller =
ui_zoom::ZoomController::FromWebContents(web_contents());
zoom::ZoomController* zoom_controller =
zoom::ZoomController::FromWebContents(web_contents());
if (!zoom_controller)
return 100;

Expand Down
21 changes: 4 additions & 17 deletions atom/browser/api/atom_api_web_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,37 +351,24 @@ class WebContents : public mate::TrackableObject<WebContents>,
void DocumentOnLoadCompletedInMainFrame() override;
void DocumentLoadedInFrame(
content::RenderFrameHost* render_frame_host) override;
void DidStartProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
bool is_error_page,
bool is_iframe_srcdoc) override;
void DidCommitProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& url,
ui::PageTransition transition_type) override;
void DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) override;
void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) override;
void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) override;
void DidStartLoading() override;
void DidStopLoading() override;
void DidGetResourceResponseStart(
const content::ResourceRequestDetails& details) override;
void DidGetRedirectForResourceRequest(
content::RenderFrameHost* render_frame_host,
const content::ResourceRedirectDetails& details) override;
void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) override;
void DidStartNavigation(
content::NavigationHandle* navigation_handle) override;
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override;
bool OnMessageReceived(const IPC::Message& message) override;
void WebContentsDestroyed() override;
void NavigationEntryCommitted(
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/atom_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/browser_context_keyed_service_factories.h"
#include "atom/browser/bridge_task_runner.h"
#include "atom/browser/browser.h"
#include "atom/browser/browser_context_keyed_service_factories.h"
#include "atom/browser/javascript_environment.h"
#include "atom/browser/node_debugger.h"
#include "atom/common/api/atom_bindings.h"
Expand All @@ -18,8 +18,8 @@
#include "base/allocator/allocator_extension.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/memory/memory_pressure_monitor.h"
#include "base/path_service.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/brightray_paths.h"
#include "chrome/browser/browser_process.h"
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/autofill/atom_autofill_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "atom/browser/autofill/atom_autofill_client.h"

#include "atom/browser/autofill/personal_data_manager_factory.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/autofill/personal_data_manager_factory.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/strings/utf_string_conversions.h"
#include "brave/browser/brave_browser_context.h"
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/browser_context_keyed_service_factories.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
#include "extensions/browser/api/audio/audio_api.h"
#include "extensions/browser/api/idle/idle_manager_factory.h"
#include "extensions/browser/api/management/management_api.h"
#include "extensions/browser/api/runtime/runtime_api.h"
#include "extensions/browser/api/socket/socket.h"
#include "extensions/browser/api/socket/tcp_socket.h"
#include "extensions/browser/api/socket/udp_socket.h"
#include "extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h"
#include "extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h"
#include "extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h"
#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/api/runtime/runtime_api.h"
#include "extensions/browser/api/web_request/web_request_api.h"
#include "extensions/browser/declarative_user_script_manager_factory.h"
#include "extensions/browser/event_router_factory.h"
Expand Down
Loading

0 comments on commit e6fed34

Please sign in to comment.