Merge pull request #272 from electron/chrome56

Upgrade to Chrome 56
This commit is contained in:
Kevin Sawicki 2017-02-06 11:16:18 -08:00 committed by GitHub
commit 17e94cd8dc
23 changed files with 110 additions and 172 deletions

View file

@ -1,7 +1,7 @@
{
'variables': {
# The libraries brightray will be compiled to.
'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss'
'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss'
},
'includes': [
'filenames.gypi',
@ -14,6 +14,7 @@
'.',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
@ -26,6 +27,7 @@
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/gpu',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
'<(libchromiumcontent_src_dir)/third_party/skia/include/config',
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
@ -67,7 +69,7 @@
},
'cflags': [
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
# Needed by using libgtk2ui:
# Needed by using libgtkui:
'-Wno-deprecated-register',
'-Wno-sentinel',
],
@ -86,9 +88,7 @@
'link_settings': {
'libraries': [
# Following libraries are always linked statically.
'<(libchromiumcontent_dir)/libgtk2ui.a',
'<(libchromiumcontent_dir)/libdevtools_discovery.a',
'<(libchromiumcontent_dir)/libdevtools_http_handler.a',
'<(libchromiumcontent_dir)/libgtkui.a',
'<(libchromiumcontent_dir)/libhttp_server.a',
'<(libchromiumcontent_dir)/libdesktop_capture.a',
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
@ -142,8 +142,6 @@
'link_settings': {
'libraries': [
# Following libraries are always linked statically.
'<(libchromiumcontent_dir)/libdevtools_discovery.a',
'<(libchromiumcontent_dir)/libdevtools_http_handler.a',
'<(libchromiumcontent_dir)/libhttp_server.a',
'<(libchromiumcontent_dir)/libdesktop_capture.a',
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
@ -193,6 +191,8 @@
'-lsandbox',
# bluetooth.gyp:
'$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
# components/wifi/BUILD.gn:
'$(SDKROOT)/System/Library/Frameworks/CoreWLAN.framework',
],
},
}],
@ -210,8 +210,6 @@
'<(libchromiumcontent_dir)/base_static.lib',
'<(libchromiumcontent_dir)/sandbox.lib',
'<(libchromiumcontent_dir)/sandbox_helper_win.lib',
'<(libchromiumcontent_dir)/devtools_discovery.lib',
'<(libchromiumcontent_dir)/devtools_http_handler.lib',
'<(libchromiumcontent_dir)/http_server.lib',
'<(libchromiumcontent_dir)/desktop_capture.lib',
'<(libchromiumcontent_dir)/dom_keycode_converter.lib',
@ -296,12 +294,15 @@
# net_common.gypi:
'crypt32.lib',
'dhcpcsvc.lib',
'ncrypt.lib',
'rpcrt4.lib',
'secur32.lib',
'urlmon.lib',
'winhttp.lib',
# ui/gfx/BUILD.gn:
'dwrite.lib',
# skia/BUILD.gn:
'fontsub.lib',
],
'DelayLoadDLLs': [
'wtsapi32.dll',

View file

@ -140,8 +140,8 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
static_cast<NetLog*>(BrowserClient::Get()->GetNetLog()),
GetPath(),
in_memory_,
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
protocol_handlers,
std::move(protocol_interceptors));
resource_context_->set_url_request_context_getter(url_request_getter_.get());

View file

@ -13,7 +13,6 @@
#include "base/feature_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/devtools_http_handler/devtools_http_handler.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "media/base/media_resources.h"
@ -37,7 +36,7 @@
#include "base/nix/xdg_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "browser/brightray_paths.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
#include "chrome/browser/ui/libgtkui/gtk_ui.h"
#include "ui/base/x/x11_util.h"
#include "ui/base/x/x11_util_internal.h"
#include "ui/views/linux_ui/linux_ui.h"
@ -216,7 +215,7 @@ void BrowserMainParts::PreMainMessageLoopRun() {
// --remote-debugging-port
auto command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kRemoteDebuggingPort))
devtools_http_handler_.reset(DevToolsManagerDelegate::CreateHttpHandler());
DevToolsManagerDelegate::StartHttpHandler();
}
void BrowserMainParts::PostMainMessageLoopStart() {
@ -245,8 +244,7 @@ int BrowserMainParts::PreCreateThreads() {
display::Screen* screen = views::CreateDesktopScreen();
display::Screen::SetScreenInstance(screen);
#if defined(USE_X11)
views::LinuxUI::instance()->UpdateDeviceScaleFactor(
screen->GetPrimaryDisplay().device_scale_factor());
views::LinuxUI::instance()->UpdateDeviceScaleFactor();
#endif
#endif
return 0;

View file

@ -9,10 +9,6 @@
#include "base/memory/ref_counted.h"
#include "content/public/browser/browser_main_parts.h"
namespace devtools_http_handler {
class DevToolsHttpHandler;
}
#if defined(TOOLKIT_VIEWS)
namespace brightray {
class ViewsDelegate;
@ -48,8 +44,6 @@ class BrowserMainParts : public content::BrowserMainParts {
void InitializeMainNib();
#endif
std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> devtools_http_handler_;
#if defined(TOOLKIT_VIEWS)
std::unique_ptr<ViewsDelegate> views_delegate_;
#endif

View file

@ -15,11 +15,9 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "common/content_client.h"
#include "components/devtools_discovery/basic_target_descriptor.h"
#include "components/devtools_discovery/devtools_discovery_manager.h"
#include "components/devtools_http_handler/devtools_http_handler.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/devtools_socket_factory.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/common/content_switches.h"
@ -36,23 +34,26 @@ namespace brightray {
namespace {
class TCPServerSocketFactory
: public devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory {
class TCPServerSocketFactory : public content::DevToolsSocketFactory {
public:
TCPServerSocketFactory(const std::string& address, int port)
: address_(address), port_(port) {
}
private:
// content::DevToolsHttpHandler::ServerSocketFactory.
// content::ServerSocketFactory.
std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
std::unique_ptr<net::ServerSocket> socket(
new net::TCPServerSocket(nullptr, net::NetLog::Source()));
new net::TCPServerSocket(nullptr, net::NetLogSource()));
if (socket->ListenWithAddressAndPort(address_, port_, 10) != net::OK)
return std::unique_ptr<net::ServerSocket>();
return socket;
}
std::unique_ptr<net::ServerSocket> CreateForTethering(
std::string* name) override {
return std::unique_ptr<net::ServerSocket>();
}
std::string address_;
uint16_t port_;
@ -60,7 +61,7 @@ class TCPServerSocketFactory
DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
};
std::unique_ptr<devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory>
std::unique_ptr<content::DevToolsSocketFactory>
CreateSocketFactory() {
auto& command_line = *base::CommandLine::ForCurrentProcess();
// See if the user specified a port on the command line (useful for
@ -77,55 +78,8 @@ CreateSocketFactory() {
DLOG(WARNING) << "Invalid http debugger port number " << temp_port;
}
}
return std::unique_ptr<
devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory>(
new TCPServerSocketFactory("127.0.0.1", port));
}
// DevToolsDelegate --------------------------------------------------------
class DevToolsDelegate :
public devtools_http_handler::DevToolsHttpHandlerDelegate {
public:
DevToolsDelegate();
~DevToolsDelegate() override;
// devtools_http_handler::DevToolsHttpHandlerDelegate.
std::string GetDiscoveryPageHTML() override;
std::string GetFrontendResource(const std::string& path) override;
std::string GetPageThumbnailData(const GURL& url) override;
content::DevToolsExternalAgentProxyDelegate* HandleWebSocketConnection(
const std::string& path) override;
private:
DISALLOW_COPY_AND_ASSIGN(DevToolsDelegate);
};
DevToolsDelegate::DevToolsDelegate() {
}
DevToolsDelegate::~DevToolsDelegate() {
}
std::string DevToolsDelegate::GetDiscoveryPageHTML() {
return ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
}
std::string DevToolsDelegate::GetFrontendResource(
const std::string& path) {
return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
}
std::string DevToolsDelegate::GetPageThumbnailData(const GURL& url) {
return std::string();
}
content::DevToolsExternalAgentProxyDelegate*
DevToolsDelegate::HandleWebSocketConnection(const std::string& path) {
return nullptr;
return std::unique_ptr<content::DevToolsSocketFactory>(
new TCPServerSocketFactory("127.0.0.1", port));
}
} // namespace
@ -133,12 +87,10 @@ DevToolsDelegate::HandleWebSocketConnection(const std::string& path) {
// DevToolsManagerDelegate ---------------------------------------------------
// static
devtools_http_handler::DevToolsHttpHandler*
DevToolsManagerDelegate::CreateHttpHandler() {
return new devtools_http_handler::DevToolsHttpHandler(
void DevToolsManagerDelegate::StartHttpHandler() {
content::DevToolsAgentHost::StartRemoteDebuggingServer(
CreateSocketFactory(),
std::string(),
new DevToolsDelegate,
base::FilePath(),
base::FilePath(),
std::string(),
@ -147,21 +99,12 @@ DevToolsManagerDelegate::CreateHttpHandler() {
DevToolsManagerDelegate::DevToolsManagerDelegate()
: handler_(new DevToolsNetworkProtocolHandler) {
// NB(zcbenz): This call does nothing, the only purpose is to make sure the
// devtools_discovery module is linked into the final executable on Linux.
// Though it is possible to achieve this by modifying the gyp settings, it
// would greatly increase gyp file's complexity, so I chose to instead do
// this hack.
devtools_discovery::DevToolsDiscoveryManager::GetInstance();
}
DevToolsManagerDelegate::~DevToolsManagerDelegate() {
}
void DevToolsManagerDelegate::DevToolsAgentStateChanged(
content::DevToolsAgentHost* agent_host,
bool attached) {
handler_->DevToolsAgentStateChanged(agent_host, attached);
void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {
}
base::DictionaryValue* DevToolsManagerDelegate::HandleCommand(
@ -170,4 +113,19 @@ base::DictionaryValue* DevToolsManagerDelegate::HandleCommand(
return handler_->HandleCommand(agent_host, command);
}
scoped_refptr<content::DevToolsAgentHost>
DevToolsManagerDelegate::CreateNewTarget(const GURL& url) {
return nullptr;
}
std::string DevToolsManagerDelegate::GetDiscoveryPageHTML() {
return ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
}
std::string DevToolsManagerDelegate::GetFrontendResource(
const std::string& path) {
return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
}
} // namespace brightray

View file

@ -7,31 +7,29 @@
#include "base/macros.h"
#include "base/compiler_specific.h"
#include "components/devtools_http_handler/devtools_http_handler_delegate.h"
#include "content/browser/devtools/devtools_http_handler.h"
#include "content/public/browser/devtools_manager_delegate.h"
namespace devtools_http_handler {
class DevToolsHttpHandler;
}
namespace brightray {
class DevToolsNetworkProtocolHandler;
class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
public:
static devtools_http_handler::DevToolsHttpHandler* CreateHttpHandler();
static void StartHttpHandler();
DevToolsManagerDelegate();
virtual ~DevToolsManagerDelegate();
// DevToolsManagerDelegate implementation.
void Inspect(content::BrowserContext* browser_context,
content::DevToolsAgentHost* agent_host) override {}
void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
bool attached) override;
base::DictionaryValue* HandleCommand(content::DevToolsAgentHost* agent_host,
base::DictionaryValue* command) override;
void Inspect(content::DevToolsAgentHost* agent_host) override;
base::DictionaryValue* HandleCommand(
content::DevToolsAgentHost* agent_host,
base::DictionaryValue* command) override;
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(
const GURL& url) override;
std::string GetDiscoveryPageHTML() override;
std::string GetFrontendResource(const std::string& path) override;
private:
std::unique_ptr<DevToolsNetworkProtocolHandler> handler_;

View file

@ -14,7 +14,6 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
namespace brightray {
namespace {
@ -62,19 +61,21 @@ class BundledDataSource : public content::URLDataSource {
return kChromeUIDevToolsHost;
}
void StartDataRequest(const std::string& path,
int render_process_id,
int render_frame_id,
const GotDataCallback& callback) override {
void StartDataRequest(
const std::string& path,
const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
const GotDataCallback& callback) override {
// Serve request from local bundle.
std::string bundled_path_prefix(kChromeUIDevToolsBundledPath);
bundled_path_prefix += "/";
if (base::StartsWith(path, bundled_path_prefix,
base::CompareCase::INSENSITIVE_ASCII)) {
StartBundledDataRequest(path.substr(bundled_path_prefix.length()),
render_process_id, render_frame_id, callback);
callback);
return;
}
// We do not handle remote and custom requests.
callback.Run(nullptr);
}
@ -94,11 +95,8 @@ class BundledDataSource : public content::URLDataSource {
return true;
}
void StartBundledDataRequest(
const std::string& path,
int render_process_id,
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) {
void StartBundledDataRequest(const std::string& path,
const GotDataCallback& callback) {
std::string filename = PathWithoutParams(path);
base::StringPiece resource =
content::DevToolsFrontendHost::GetFrontendResource(filename);

View file

@ -144,7 +144,7 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
int Write(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) override;
int Finish(const net::CompletionCallback& callback) override;
int Finish(int net_error, const net::CompletionCallback& callback) override;
private:
base::WeakPtr<InspectableWebContentsImpl> bindings_;
@ -181,7 +181,8 @@ int ResponseWriter::Write(net::IOBuffer* buffer,
return num_bytes;
}
int ResponseWriter::Finish(const net::CompletionCallback& callback) {
int ResponseWriter::Finish(int net_error,
const net::CompletionCallback& callback) {
return net::OK;
}
@ -394,7 +395,7 @@ void InspectableWebContentsImpl::LoadCompleted() {
base::RemoveChars(current_dock_state, "\"", &dock_state_);
}
base::string16 javascript = base::UTF8ToUTF16(
"WebInspector.dockController.setDockSide(\"" + dock_state_ + "\");");
"Components.dockController.setDockSide(\"" + dock_state_ + "\");");
devtools_web_contents_->GetMainFrame()->ExecuteJavaScript(javascript);
}
@ -654,7 +655,7 @@ void InspectableWebContentsImpl::WebContentsDestroyed() {
view_->GetDelegate()->DevToolsClosed();
}
bool InspectableWebContentsImpl::AddMessageToConsole(
bool InspectableWebContentsImpl::DidAddMessageToConsole(
content::WebContents* source,
int32_t level,
const base::string16& message,
@ -726,7 +727,7 @@ void InspectableWebContentsImpl::OnWebContentsFocused() {
void InspectableWebContentsImpl::DidStartNavigationToPendingEntry(
const GURL& url,
content::NavigationController::ReloadType reload_type) {
content::ReloadType reload_type) {
frontend_host_.reset(
content::DevToolsFrontendHost::Create(
web_contents()->GetMainFrame(),

View file

@ -133,14 +133,14 @@ class InspectableWebContentsImpl :
void OnWebContentsFocused() override;
void DidStartNavigationToPendingEntry(
const GURL& url,
content::NavigationController::ReloadType reload_type) override;
content::ReloadType reload_type) override;
// content::WebContentsDelegate:
bool AddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
bool DidAddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
bool ShouldCreateWebContents(
content::WebContents* web_contents,
int32_t route_id,

View file

@ -8,7 +8,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "browser/notification_delegate.h"
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
#include "common/application_info.h"
#include "third_party/skia/include/core/SkBitmap.h"
@ -111,7 +111,7 @@ void LibnotifyNotification::Show(const base::string16& title,
}
if (!icon.drawsNothing()) {
GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(icon);
GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(icon);
libnotify_loader_.notify_notification_set_image_from_pixbuf(
notification_, pixbuf);
libnotify_loader_.notify_notification_set_timeout(

View file

@ -137,10 +137,6 @@ void MediaStreamDevicesController::Accept() {
webcam_requested_,
&devices);
break;
case content::MEDIA_ENUMERATE_DEVICES:
// Do nothing.
NOTREACHED();
break;
}
}

View file

@ -103,10 +103,9 @@ bool DevToolsNetworkTransaction::CheckFailed() {
return false;
}
int DevToolsNetworkTransaction::Start(
const net::HttpRequestInfo* request,
const net::CompletionCallback& callback,
const net::BoundNetLog& net_log) {
int DevToolsNetworkTransaction::Start(const net::HttpRequestInfo* request,
const net::CompletionCallback& callback,
const net::NetLogWithSource& net_log) {
DCHECK(request);
request_ = request;
@ -129,7 +128,8 @@ int DevToolsNetworkTransaction::Start(
request_ = custom_request_.get();
}
DevToolsNetworkInterceptor* interceptor = controller_->GetInterceptor(client_id);
DevToolsNetworkInterceptor* interceptor =
controller_->GetInterceptor(client_id);
if (interceptor) {
interceptor_ = interceptor->GetWeakPtr();
if (custom_upload_data_stream_)
@ -246,10 +246,6 @@ net::LoadState DevToolsNetworkTransaction::GetLoadState() const {
return transaction_->GetLoadState();
}
net::UploadProgress DevToolsNetworkTransaction::GetUploadProgress() const {
return transaction_->GetUploadProgress();
}
void DevToolsNetworkTransaction::SetQuicServerInfo(
net::QuicServerInfo* info) {
transaction_->SetQuicServerInfo(info);

View file

@ -32,7 +32,7 @@ class DevToolsNetworkTransaction : public net::HttpTransaction {
// HttpTransaction methods:
int Start(const net::HttpRequestInfo* request,
const net::CompletionCallback& callback,
const net::BoundNetLog& net_log) override;
const net::NetLogWithSource& net_log) override;
int RestartIgnoringLastError(
const net::CompletionCallback& callback) override;
int RestartWithCertificate(net::X509Certificate* client_cert,
@ -52,7 +52,6 @@ class DevToolsNetworkTransaction : public net::HttpTransaction {
void DoneReading() override;
const net::HttpResponseInfo* GetResponseInfo() const override;
net::LoadState GetLoadState() const override;
net::UploadProgress GetUploadProgress() const override;
void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override;
bool GetLoadTimingInfo(net::LoadTimingInfo* load_timing_info) const override;
bool GetRemoteEndpoint(net::IPEndPoint* endpoint) const override;

View file

@ -35,11 +35,13 @@ bool DevToolsNetworkUploadDataStream::IsInMemory() const {
return false;
}
int DevToolsNetworkUploadDataStream::InitInternal(const net::BoundNetLog& net_log) {
int DevToolsNetworkUploadDataStream::InitInternal(
const net::NetLogWithSource& net_log) {
throttled_byte_count_ = 0;
int result = upload_data_stream_->Init(
base::Bind(&DevToolsNetworkUploadDataStream::StreamInitCallback,
base::Unretained(this)), net_log);
base::Unretained(this)),
net_log);
if (result == net::OK && !is_chunked())
SetSize(upload_data_stream_->size());
return result;

View file

@ -27,7 +27,7 @@ class DevToolsNetworkUploadDataStream : public net::UploadDataStream {
private:
// net::UploadDataStream implementation.
bool IsInMemory() const override;
int InitInternal(const net::BoundNetLog& net_log) override;
int InitInternal(const net::NetLogWithSource& net_log) override;
int ReadInternal(net::IOBuffer* buf, int buf_len) override;
void ResetInternal() override;

View file

@ -62,6 +62,7 @@ blink::mojom::PermissionStatus PlatformNotificationService::CheckPermissionOnIOT
void PlatformNotificationService::DisplayNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const content::PlatformNotificationData& notification_data,
const content::NotificationResources& notification_resources,
@ -85,8 +86,8 @@ void PlatformNotificationService::DisplayNotification(
void PlatformNotificationService::DisplayPersistentNotification(
content::BrowserContext* browser_context,
int64_t persistent_notification_id,
const GURL& service_worker_origin,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const content::PlatformNotificationData& notification_data,
const content::NotificationResources& notification_resources) {
@ -94,7 +95,7 @@ void PlatformNotificationService::DisplayPersistentNotification(
void PlatformNotificationService::ClosePersistentNotification(
content::BrowserContext* browser_context,
int64_t persistent_notification_id) {
const std::string& notification_id) {
}
bool PlatformNotificationService::GetDisplayedPersistentNotifications(

View file

@ -28,7 +28,9 @@ class PlatformNotificationService
content::ResourceContext* resource_context,
const GURL& origin,
int render_process_id) override;
void DisplayNotification(content::BrowserContext* browser_context,
void DisplayNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const content::PlatformNotificationData& notification_data,
const content::NotificationResources& notification_resources,
@ -36,14 +38,13 @@ class PlatformNotificationService
base::Closure* cancel_callback) override;
void DisplayPersistentNotification(
content::BrowserContext* browser_context,
int64_t persistent_notification_id,
const GURL& service_worker_origin,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const content::PlatformNotificationData& notification_data,
const content::NotificationResources& notification_resources) override;
void ClosePersistentNotification(
content::BrowserContext* browser_context,
int64_t persistent_notification_id) override;
void ClosePersistentNotification(content::BrowserContext* browser_context,
const std::string& notification_id) override;
bool GetDisplayedPersistentNotifications(
content::BrowserContext* browser_context,
std::set<std::string>* displayed_notifications) override;

View file

@ -118,8 +118,8 @@ URLRequestContextGetter::URLRequestContextGetter(
NetLog* net_log,
const base::FilePath& base_path,
bool in_memory,
base::MessageLoop* io_loop,
base::MessageLoop* file_loop,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector protocol_interceptors)
: delegate_(delegate),
@ -127,8 +127,8 @@ URLRequestContextGetter::URLRequestContextGetter(
net_log_(net_log),
base_path_(base_path),
in_memory_(in_memory),
io_loop_(io_loop),
file_loop_(file_loop),
io_task_runner_(io_task_runner),
file_task_runner_(file_task_runner),
protocol_interceptors_(std::move(protocol_interceptors)),
job_factory_(nullptr) {
// Must first be created on the UI thread.
@ -144,7 +144,7 @@ URLRequestContextGetter::URLRequestContextGetter(
// must synchronously run on the glib message loop. This will be passed to
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService(
io_loop_->task_runner(), file_loop_->task_runner());
io_task_runner_, file_task_runner_);
}
URLRequestContextGetter::~URLRequestContextGetter() {

View file

@ -67,8 +67,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
NetLog* net_log,
const base::FilePath& base_path,
bool in_memory,
base::MessageLoop* io_loop,
base::MessageLoop* file_loop,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector protocol_interceptors);
virtual ~URLRequestContextGetter();
@ -90,8 +90,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
NetLog* net_log_;
base::FilePath base_path_;
bool in_memory_;
base::MessageLoop* io_loop_;
base::MessageLoop* file_loop_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
std::string user_agent_;

View file

@ -100,10 +100,6 @@ void ViewsDelegate::OnBeforeWidgetInit(
}
base::TimeDelta ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
return base::TimeDelta();
}
bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
#if defined(OS_LINUX)
// On Ubuntu Unity, the system always provides a title bar for maximized

View file

@ -51,7 +51,6 @@ class ViewsDelegate : public views::ViewsDelegate {
void OnBeforeWidgetInit(
views::Widget::InitParams* params,
views::internal::NativeWidgetDelegate* delegate) override;
base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() override;
bool WindowManagerProvidesTitleBar(bool maximized) override;
private:

View file

@ -56,7 +56,7 @@ bool NotificationPresenterWin::Init() {
base::string16 NotificationPresenterWin::SaveIconToFilesystem(
const SkBitmap& icon, const GURL& origin) {
std::string filename = base::MD5String(origin.spec()) + ".png";
base::FilePath path = temp_dir_.path().Append(base::UTF8ToUTF16(filename));
base::FilePath path = temp_dir_.GetPath().Append(base::UTF8ToUTF16(filename));
if (base::PathExists(path))
return path.value();
if (SaveIconToPath(icon, path))

@ -1 +1 @@
Subproject commit 25ec31e58d23002a02dc85dd4b8200b72d50a6c7
Subproject commit e0da1e9caa7c8f3da3519963a9ea32abba43c7c8