Merge branch 'master' of https://github.com/electron/electron into restore-issue

This commit is contained in:
liusi 2016-07-25 22:53:18 +08:00
commit 8129c27a4a
127 changed files with 603 additions and 479 deletions

View file

@ -19,7 +19,6 @@
#include "base/win/windows_version.h"
#include "content/public/app/sandbox_helper_win.h"
#include "sandbox/win/src/sandbox_types.h"
#include "ui/gfx/win/dpi.h"
#elif defined(OS_LINUX) // defined(OS_WIN)
#include "atom/app/atom_main_delegate.h" // NOLINT
#include "content/public/app/content_main.h"

View file

@ -7,14 +7,15 @@
#include "atom/app/uv_task_runner.h"
#include "atom/browser/javascript_environment.h"
#include "atom/browser/node_debugger.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
#include "gin/v8_initializer.h"
#include "atom/common/node_includes.h"
namespace atom {
int NodeMain(int argc, char *argv[]) {
@ -69,7 +70,7 @@ int NodeMain(int argc, char *argv[]) {
exit_code = node::EmitExit(env);
node::RunAtExit(env);
env->Dispose();
node::FreeEnvironment(env);
}
v8::V8::Dispose();

View file

@ -4,6 +4,7 @@
#include "atom/browser/api/atom_api_cookies.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
@ -204,8 +205,8 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
} // namespace
Cookies::Cookies(v8::Isolate* isolate,
content::BrowserContext* browser_context)
: request_context_getter_(browser_context->GetRequestContext()) {
AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->url_request_context_getter()) {
Init(isolate);
}
@ -241,7 +242,7 @@ void Cookies::Set(const base::DictionaryValue& details,
// static
mate::Handle<Cookies> Cookies::Create(
v8::Isolate* isolate,
content::BrowserContext* browser_context) {
AtomBrowserContext* browser_context) {
return mate::CreateHandle(isolate, new Cookies(isolate, browser_context));
}

View file

@ -16,16 +16,14 @@ namespace base {
class DictionaryValue;
}
namespace content {
class BrowserContext;
}
namespace net {
class URLRequestContextGetter;
}
namespace atom {
class AtomBrowserContext;
namespace api {
class Cookies : public mate::TrackableObject<Cookies> {
@ -39,14 +37,14 @@ class Cookies : public mate::TrackableObject<Cookies> {
using SetCallback = base::Callback<void(Error)>;
static mate::Handle<Cookies> Create(v8::Isolate* isolate,
content::BrowserContext* browser_context);
AtomBrowserContext* browser_context);
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
protected:
Cookies(v8::Isolate* isolate, content::BrowserContext* browser_context);
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
~Cookies() override;
void Get(const base::DictionaryValue& filter, const GetCallback& callback);

View file

@ -5,13 +5,13 @@
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_H_
#include <memory>
#include <string>
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/ui/atom_menu_model.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
namespace atom {

View file

@ -7,7 +7,7 @@
#include "atom/browser/native_window_views.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
@ -31,7 +31,7 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
// (-1, -1) means showing on mouse location.
gfx::Point location;
if (x == -1 || y == -1) {
location = gfx::Screen::GetScreen()->GetCursorScreenPoint();
location = display::Screen::GetScreen()->GetCursorScreenPoint();
} else {
gfx::Point origin = view->GetViewBounds().origin();
location = gfx::Point(origin.x() + x, origin.y() + y);

View file

@ -6,7 +6,7 @@
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include "atom/browser/api/atom_api_menu.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
namespace atom {

View file

@ -6,9 +6,9 @@
#define ATOM_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
#include <map>
#include <memory>
#include "atom/browser/api/trackable_object.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/power_save_blocker.h"
#include "native_mate/handle.h"

View file

@ -40,8 +40,7 @@ void ClearJobFactoryInIO(
} // namespace
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: request_context_getter_(static_cast<brightray::URLRequestContextGetter*>(
browser_context->GetRequestContext())),
: request_context_getter_(browser_context->GetRequestContext()),
weak_factory_(this) {
Init(isolate);
}

View file

@ -12,7 +12,9 @@
#include "base/bind.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "ui/gfx/screen.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
#include "atom/common/node_includes.h"
@ -34,20 +36,20 @@ typename T::iterator FindById(T* container, int id) {
// Convert the changed_metrics bitmask to string array.
std::vector<std::string> MetricsToArray(uint32_t metrics) {
std::vector<std::string> array;
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_BOUNDS)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_BOUNDS)
array.push_back("bounds");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_WORK_AREA)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_WORK_AREA)
array.push_back("workArea");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR)
array.push_back("scaleFactor");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_ROTATION)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_ROTATION)
array.push_back("rotation");
return array;
}
} // namespace
Screen::Screen(v8::Isolate* isolate, gfx::Screen* screen)
Screen::Screen(v8::Isolate* isolate, display::Screen* screen)
: screen_(screen) {
screen_->AddObserver(this);
Init(isolate);
@ -61,31 +63,31 @@ gfx::Point Screen::GetCursorScreenPoint() {
return screen_->GetCursorScreenPoint();
}
gfx::Display Screen::GetPrimaryDisplay() {
display::Display Screen::GetPrimaryDisplay() {
return screen_->GetPrimaryDisplay();
}
std::vector<gfx::Display> Screen::GetAllDisplays() {
std::vector<display::Display> Screen::GetAllDisplays() {
return screen_->GetAllDisplays();
}
gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
display::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
return screen_->GetDisplayNearestPoint(point);
}
gfx::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
display::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
return screen_->GetDisplayMatching(match_rect);
}
void Screen::OnDisplayAdded(const gfx::Display& new_display) {
void Screen::OnDisplayAdded(const display::Display& new_display) {
Emit("display-added", new_display);
}
void Screen::OnDisplayRemoved(const gfx::Display& old_display) {
void Screen::OnDisplayRemoved(const display::Display& old_display) {
Emit("display-removed", old_display);
}
void Screen::OnDisplayMetricsChanged(const gfx::Display& display,
void Screen::OnDisplayMetricsChanged(const display::Display& display,
uint32_t changed_metrics) {
Emit("display-metrics-changed", display, MetricsToArray(changed_metrics));
}
@ -99,7 +101,7 @@ v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
return v8::Null(isolate);
}
gfx::Screen* screen = gfx::Screen::GetScreen();
display::Screen* screen = display::Screen::GetScreen();
if (!screen) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Failed to get screen information")));

View file

@ -9,7 +9,8 @@
#include "atom/browser/api/event_emitter.h"
#include "native_mate/handle.h"
#include "ui/gfx/display_observer.h"
#include "ui/display/display_observer.h"
#include "ui/display/screen.h"
namespace gfx {
class Point;
@ -22,7 +23,7 @@ namespace atom {
namespace api {
class Screen : public mate::EventEmitter<Screen>,
public gfx::DisplayObserver {
public display::DisplayObserver {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
@ -30,23 +31,23 @@ class Screen : public mate::EventEmitter<Screen>,
v8::Local<v8::ObjectTemplate> prototype);
protected:
Screen(v8::Isolate* isolate, gfx::Screen* screen);
Screen(v8::Isolate* isolate, display::Screen* screen);
~Screen() override;
gfx::Point GetCursorScreenPoint();
gfx::Display GetPrimaryDisplay();
std::vector<gfx::Display> GetAllDisplays();
gfx::Display GetDisplayNearestPoint(const gfx::Point& point);
gfx::Display GetDisplayMatching(const gfx::Rect& match_rect);
display::Display GetPrimaryDisplay();
std::vector<display::Display> GetAllDisplays();
display::Display GetDisplayNearestPoint(const gfx::Point& point);
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
// gfx::DisplayObserver:
void OnDisplayAdded(const gfx::Display& new_display) override;
void OnDisplayRemoved(const gfx::Display& old_display) override;
void OnDisplayMetricsChanged(const gfx::Display& display,
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplayRemoved(const display::Display& old_display) override;
void OnDisplayMetricsChanged(const display::Display& display,
uint32_t changed_metrics) override;
private:
gfx::Screen* screen_;
display::Screen* screen_;
DISALLOW_COPY_AND_ASSIGN(Screen);
};

View file

@ -28,7 +28,7 @@
#include "components/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "chrome/common/pref_names.h"
@ -133,7 +133,7 @@ struct Converter<net::ProxyConfig> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
net::ProxyConfig* out) {
std::string proxy_rules;
std::string proxy_rules, proxy_bypass_rules;
GURL pac_url;
mate::Dictionary options;
// Fallback to previous API when passed String.
@ -143,6 +143,7 @@ struct Converter<net::ProxyConfig> {
} else if (ConvertFromV8(isolate, val, &options)) {
options.Get("pacScript", &pac_url);
options.Get("proxyRules", &proxy_rules);
options.Get("proxyBypassRules", &proxy_bypass_rules);
} else {
return false;
}
@ -152,6 +153,7 @@ struct Converter<net::ProxyConfig> {
out->set_pac_url(pac_url);
} else {
out->proxy_rules().ParseFromString(proxy_rules);
out->proxy_rules().bypass_rules.ParseFromString(proxy_bypass_rules);
}
return true;
}
@ -179,7 +181,7 @@ class ResolveProxyHelper {
: callback_(callback),
original_thread_(base::ThreadTaskRunnerHandle::Get()) {
scoped_refptr<net::URLRequestContextGetter> context_getter =
browser_context->GetRequestContext();
browser_context->url_request_context_getter();
context_getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&ResolveProxyHelper::ResolveProxy,
@ -282,7 +284,7 @@ void SetProxyInIO(net::URLRequestContextGetter* getter,
const net::ProxyConfig& config,
const base::Closure& callback) {
auto proxy_service = getter->GetURLRequestContext()->proxy_service();
proxy_service->ResetConfigService(make_scoped_ptr(
proxy_service->ResetConfigService(base::WrapUnique(
new net::ProxyConfigServiceFixed(config)));
// Refetches and applies the new pac script if provided.
proxy_service->ForceReloadProxyConfig();

View file

@ -5,12 +5,12 @@
#ifndef ATOM_BROWSER_API_ATOM_API_TRAY_H_
#define ATOM_BROWSER_API_ATOM_API_TRAY_H_
#include <memory>
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/ui/tray_icon_observer.h"
#include "base/memory/scoped_ptr.h"
#include "native_mate/handle.h"
namespace gfx {

View file

@ -66,7 +66,7 @@
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "atom/common/node_includes.h"
@ -733,6 +733,7 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(AtomViewHostMsg_Message, OnRendererMessage)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AtomViewHostMsg_Message_Sync,
OnRendererMessageSync)
IPC_MESSAGE_HANDLER(AtomViewHostMsg_DidCommitCompositorFrame, OnViewPainted)
IPC_MESSAGE_HANDLER_CODE(ViewHostMsg_SetCursor, OnCursorChange,
handled = false)
IPC_MESSAGE_UNHANDLED(handled = false)
@ -1274,7 +1275,7 @@ void WebContents::CapturePage(mate::Arguments* args) {
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view->GetNativeView();
const float scale =
gfx::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
display::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
.device_scale_factor();
if (scale > 1.0f)
bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
@ -1298,6 +1299,10 @@ void WebContents::OnCursorChange(const content::WebCursor& cursor) {
}
}
void WebContents::OnViewPainted() {
Emit("view-painted");
}
void WebContents::SetSize(const SetSizeParams& params) {
if (guest_delegate_)
guest_delegate_->SetSize(params);

View file

@ -294,6 +294,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
const base::ListValue& args,
IPC::Message* message);
// Called when the hosted view gets graphical updates.
void OnViewPainted();
v8::Global<v8::Value> session_;
v8::Global<v8::Value> devtools_web_contents_;
v8::Global<v8::Value> debugger_;

View file

@ -10,7 +10,6 @@
#include "atom/browser/api/event_emitter.h"
#include "atom/common/key_weak_map.h"
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "native_mate/object_template_builder.h"

View file

@ -202,7 +202,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
void AtomBrowserClient::DidCreatePpapiPlugin(
content::BrowserPpapiHost* host) {
host->GetPpapiHost()->AddHostFactoryFilter(
make_scoped_ptr(new chrome::ChromeBrowserPepperHostFactory(host)));
base::WrapUnique(new chrome::ChromeBrowserPepperHostFactory(host)));
}
content::QuotaPermissionContext*

View file

@ -117,29 +117,29 @@ AtomBrowserContext::CreateURLRequestJobFactory(
protocol_handlers->clear();
job_factory->SetProtocolHandler(
url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler));
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
job_factory->SetProtocolHandler(
url::kFileScheme, make_scoped_ptr(new asar::AsarProtocolHandler(
url::kFileScheme, base::WrapUnique(new asar::AsarProtocolHandler(
BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
job_factory->SetProtocolHandler(
url::kHttpScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kHttpScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kHttpScheme)));
job_factory->SetProtocolHandler(
url::kHttpsScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kHttpsScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kHttpsScheme)));
job_factory->SetProtocolHandler(
url::kWsScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kWsScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kWsScheme)));
job_factory->SetProtocolHandler(
url::kWssScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kWssScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kWssScheme)));
auto host_resolver =
url_request_context_getter()->GetURLRequestContext()->host_resolver();
job_factory->SetProtocolHandler(
url::kFtpScheme,
make_scoped_ptr(new net::FtpProtocolHandler(
base::WrapUnique(new net::FtpProtocolHandler(
new net::FtpNetworkLayer(host_resolver))));
return std::move(job_factory);
@ -178,7 +178,7 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
}
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
return std::unique_ptr<net::CertVerifier>(new AtomCertVerifier);
return base::WrapUnique(new AtomCertVerifier);
}
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {

View file

@ -15,7 +15,7 @@
#include "atom/common/node_bindings.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "v8/include/v8-debug.h"

View file

@ -91,8 +91,14 @@ void AtomSecurityStateModelClient::GetVisibleSecurityState(
state->connection_status = ssl.connection_status;
state->security_bits = ssl.security_bits;
state->sct_verify_statuses.clear();
for (const auto& sct : ssl.signed_certificate_timestamp_ids)
state->sct_verify_statuses.push_back(sct.status);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_unknown_scts,
net::ct::SCT_STATUS_LOG_UNKNOWN);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_invalid_scts,
net::ct::SCT_STATUS_INVALID);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_valid_scts, net::ct::SCT_STATUS_OK);
state->displayed_mixed_content =
(ssl.content_status & content::SSLStatus::DISPLAYED_INSECURE_CONTENT)
? true

View file

@ -50,11 +50,6 @@ void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id, float volume, float noise_volume) {
}
void AtomSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
bool* can_report_metrics, std::string* hardware_info) {
*can_report_metrics = false;
}
void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) {

View file

@ -36,8 +36,6 @@ class AtomSpeechRecognitionManagerDelegate
float noise_volume) override;
// content::SpeechRecognitionManagerDelegate:
void GetDiagnosticInformation(bool* can_report_metrics,
std::string* hardware_info) override;
void CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) override;

View file

@ -13,7 +13,6 @@
#include "base/base_paths.h"
#include "base/file_version_info.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"

View file

@ -5,9 +5,9 @@
#ifndef ATOM_BROWSER_MAC_DICT_UTIL_H_
#define ATOM_BROWSER_MAC_DICT_UTIL_H_
#import <Foundation/Foundation.h>
#include <memory>
#include "base/memory/scoped_ptr.h"
#import <Foundation/Foundation.h>
namespace base {
class ListValue;

View file

@ -356,7 +356,7 @@ void NativeWindow::RequestToClosePage() {
ScheduleUnresponsiveEvent(5000);
if (web_contents()->NeedToFireBeforeUnload())
web_contents()->DispatchBeforeUnload(false);
web_contents()->DispatchBeforeUnload();
else
web_contents()->Close();
}

View file

@ -6,6 +6,7 @@
#define ATOM_BROWSER_NATIVE_WINDOW_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
@ -13,7 +14,6 @@
#include "atom/browser/ui/accelerator_util.h"
#include "atom/browser/ui/atom_menu_model.h"
#include "base/cancelable_callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/supports_user_data.h"

View file

@ -23,7 +23,6 @@
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/screen.h"
#include "ui/views/background.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h"
@ -52,7 +51,9 @@
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
#include "skia/ext/skia_utils_win.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/win/dpi.h"
#include "ui/display/win/screen_win.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif
@ -348,6 +349,10 @@ void NativeWindowViews::CloseImmediately() {
}
void NativeWindowViews::Focus(bool focus) {
// For hidden window focus() should do nothing.
if (!IsVisible())
return;
if (focus) {
#if defined(OS_WIN)
window_->Activate();
@ -424,7 +429,7 @@ void NativeWindowViews::Maximize() {
if (!thick_frame_) {
restore_bounds_ = GetBounds();
auto display =
gfx::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
SetBounds(display.work_area(), false);
return;
}
@ -487,7 +492,7 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
if (fullscreen) {
restore_bounds_ = GetBounds();
auto display =
gfx::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
SetBounds(display.bounds(), false);
} else {
SetBounds(restore_bounds_, false);
@ -1147,9 +1152,11 @@ gfx::Size NativeWindowViews::ContentSizeToWindowSize(const gfx::Size& size) {
gfx::Size window_size(size);
#if defined(OS_WIN)
gfx::Rect dpi_bounds =
gfx::Rect(gfx::Point(), gfx::win::DIPToScreenSize(size));
gfx::Rect window_bounds = gfx::win::ScreenToDIPRect(
HWND hwnd = GetAcceleratedWidget();
gfx::Rect dpi_bounds = gfx::Rect(
gfx::Point(), display::win::ScreenWin::DIPToScreenSize(hwnd, size));
gfx::Rect window_bounds = display::win::ScreenWin::ScreenToDIPRect(
hwnd,
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
window_size = window_bounds.size();
#endif
@ -1165,16 +1172,16 @@ gfx::Size NativeWindowViews::WindowSizeToContentSize(const gfx::Size& size) {
gfx::Size content_size(size);
#if defined(OS_WIN)
content_size = gfx::win::DIPToScreenSize(content_size);
HWND hwnd = GetAcceleratedWidget();
content_size = display::win::ScreenWin::DIPToScreenSize(hwnd, content_size);
RECT rect;
SetRectEmpty(&rect);
HWND hwnd = GetAcceleratedWidget();
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
AdjustWindowRectEx(&rect, style, FALSE, ex_style);
content_size.set_width(content_size.width() - (rect.right - rect.left));
content_size.set_height(content_size.height() - (rect.bottom - rect.top));
content_size = gfx::win::ScreenToDIPSize(content_size);
content_size = display::win::ScreenWin::ScreenToDIPSize(hwnd, content_size);
#endif
if (menu_bar_ && menu_bar_visible_)

View file

@ -180,7 +180,7 @@ bool URLRequestAsarJob::IsRedirectResponse(GURL* location,
#endif
}
net::Filter* URLRequestAsarJob::SetupFilter() const {
std::unique_ptr<net::Filter> URLRequestAsarJob::SetupFilter() const {
// Bug 9936 - .svgz files needs to be decompressed.
return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
? net::Filter::GZipFactory() : nullptr;

View file

@ -56,7 +56,7 @@ class URLRequestAsarJob : public net::URLRequestJob {
void Kill() override;
int ReadRawData(net::IOBuffer* buf, int buf_size) override;
bool IsRedirectResponse(GURL* location, int* http_status_code) override;
net::Filter* SetupFilter() const override;
std::unique_ptr<net::Filter> SetupFilter() const override;
bool GetMimeType(std::string* mime_type) const override;
void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override;
int GetResponseCode() const override;

View file

@ -7,6 +7,7 @@
#include <algorithm>
#include <string>
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "native_mate/dictionary.h"
#include "net/base/io_buffer.h"
@ -132,7 +133,7 @@ void URLRequestFetchJob::StartAsync(std::unique_ptr<base::Value> options) {
request_type = GetRequestType(method);
fetcher_ = net::URLFetcher::Create(formated_url, request_type, this);
fetcher_->SaveResponseWithWriter(make_scoped_ptr(new ResponsePiper(this)));
fetcher_->SaveResponseWithWriter(base::WrapUnique(new ResponsePiper(this)));
// A request context getter is passed by the user.
if (url_request_context_getter_)

View file

@ -5,9 +5,9 @@
#ifndef ATOM_BROWSER_NODE_DEBUGGER_H_
#define ATOM_BROWSER_NODE_DEBUGGER_H_
#include <memory>
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
#include "net/test/embedded_test_server/stream_listen_socket.h"

View file

@ -79,8 +79,16 @@ void RelauncherSynchronizeWithParent() {
int LaunchProgram(const StringVector& relauncher_args,
const StringVector& argv) {
// Redirect the stdout of child process to /dev/null, otherwise after
// relaunch the child process will raise exception when writing to stdout.
base::ScopedFD devnull(HANDLE_EINTR(open("/dev/null", O_WRONLY)));
base::FileHandleMappingVector no_stdout;
no_stdout.push_back(std::make_pair(devnull.get(), STDERR_FILENO));
no_stdout.push_back(std::make_pair(devnull.get(), STDOUT_FILENO));
base::LaunchOptions options;
options.new_process_group = true; // detach
options.fds_to_remap = &no_stdout;
base::Process process = base::LaunchProcess(argv, options);
return process.IsValid() ? 0 : 1;
}

View file

@ -17,9 +17,9 @@
<key>CFBundleIconFile</key>
<string>electron.icns</string>
<key>CFBundleVersion</key>
<string>1.2.7</string>
<string>1.3.0</string>
<key>CFBundleShortVersionString</key>
<string>1.2.7</string>
<string>1.3.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>

View file

@ -56,8 +56,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,7,0
PRODUCTVERSION 1,2,7,0
FILEVERSION 1,3,0,0
PRODUCTVERSION 1,3,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -74,12 +74,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GitHub, Inc."
VALUE "FileDescription", "Electron"
VALUE "FileVersion", "1.2.7"
VALUE "FileVersion", "1.3.0"
VALUE "InternalName", "electron.exe"
VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved."
VALUE "OriginalFilename", "electron.exe"
VALUE "ProductName", "Electron"
VALUE "ProductVersion", "1.2.7"
VALUE "ProductVersion", "1.3.0"
VALUE "SquirrelAwareVersion", "1"
END
END

View file

@ -10,7 +10,7 @@
#include "ui/base/dragdrop/file_info.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/public/drag_drop_client.h"
@ -34,7 +34,7 @@ void DragFileItems(const std::vector<base::FilePath>& files,
if (!root_window || !aura::client::GetDragDropClient(root_window))
return;
gfx::Point location = gfx::Screen::GetScreen()->GetCursorScreenPoint();
gfx::Point location = display::Screen::GetScreen()->GetCursorScreenPoint();
// TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below.
aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
data,

View file

@ -9,7 +9,7 @@
#include "ui/events/cocoa/cocoa_event_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/mac/coordinate_conversion.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
namespace {

View file

@ -5,8 +5,9 @@
#ifndef ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
#define ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
#include <memory>
#include "atom/browser/ui/atom_menu_model.h"
#include "base/memory/scoped_ptr.h"
#include "ui/views/controls/menu/menu_delegate.h"
namespace views {

View file

@ -12,8 +12,8 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/win/dpi.h"
#include "ui/display/screen.h"
#include "ui/display/win/screen_win.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
@ -145,7 +145,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
// Show menu at mouse's position by default.
gfx::Rect rect(pos, gfx::Size());
if (pos.IsOrigin())
rect.set_origin(gfx::Screen::GetScreen()->GetCursorScreenPoint());
rect.set_origin(display::Screen::GetScreen()->GetCursorScreenPoint());
views::MenuRunner menu_runner(
menu_model != nullptr ? menu_model : menu_model_,
@ -167,7 +167,7 @@ gfx::Rect NotifyIcon::GetBounds() {
RECT rect = { 0 };
Shell_NotifyIconGetRect(&icon_id, &rect);
return gfx::win::ScreenToDIPRect(gfx::Rect(rect));
return display::win::ScreenWin::ScreenToDIPRect(window_, gfx::Rect(rect));
}
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {

View file

@ -13,7 +13,6 @@
#include "atom/browser/ui/tray_icon.h"
#include "base/macros.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_gdi_object.h"
namespace gfx {

View file

@ -79,12 +79,6 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
base::DictionaryValue& web_preferences = self->web_preferences_;
bool b;
#if defined(OS_WIN)
// Check if DirectWrite is disabled.
if (web_preferences.GetBoolean(options::kDirectWrite, &b) && !b)
command_line->AppendSwitch(::switches::kDisableDirectWrite);
#endif
// Check if plugins are enabled.
if (web_preferences.GetBoolean("plugins", &b) && b)
command_line->AppendSwitch(switches::kEnablePlugins);

View file

@ -39,5 +39,7 @@ IPC_MESSAGE_ROUTED3(AtomViewMsg_Message,
IPC_MESSAGE_ROUTED1(AtomViewHostMsg_UpdateDraggableRegions,
std::vector<atom::DraggableRegion> /* regions */)
IPC_MESSAGE_ROUTED0(AtomViewHostMsg_DidCommitCompositorFrame)
// Update renderer process preferences.
IPC_MESSAGE_CONTROL1(AtomMsg_UpdatePreferences, base::ListValue)

View file

@ -81,7 +81,7 @@ bool AddImageSkiaRep(gfx::ImageSkia* image,
// Try PNG first.
if (!gfx::PNGCodec::Decode(data, size, decoded.get()))
// Try JPEG.
decoded.reset(gfx::JPEGCodec::Decode(data, size));
decoded = gfx::JPEGCodec::Decode(data, size);
if (!decoded)
return false;

View file

@ -6,7 +6,6 @@
#include "atom/common/api/locker.h"
#include "atom/common/node_includes.h"
#include "base/memory/scoped_ptr.h"
namespace mate {

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_ASAR_ARCHIVE_H_
#define ATOM_COMMON_ASAR_ARCHIVE_H_
#include <memory>
#include <vector>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
namespace base {
class DictionaryValue;

View file

@ -6,8 +6,8 @@
#define ATOM_VERSION_H
#define ATOM_MAJOR_VERSION 1
#define ATOM_MINOR_VERSION 2
#define ATOM_PATCH_VERSION 7
#define ATOM_MINOR_VERSION 3
#define ATOM_PATCH_VERSION 0
#define ATOM_VERSION_IS_RELEASE 1

View file

@ -8,7 +8,7 @@
#ifndef ATOM_COMMON_CHROME_VERSION_H_
#define ATOM_COMMON_CHROME_VERSION_H_
#define CHROME_VERSION_STRING "51.0.2704.106"
#define CHROME_VERSION_STRING "52.0.2743.82"
#define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#include <memory>
#include <string>
#include "atom/common/crash_reporter/crash_reporter.h"
#include "atom/common/crash_reporter/linux/crash_dump_handler.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;

View file

@ -10,7 +10,6 @@
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "vendor/crashpad/client/simple_string_dictionary.h"

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
#include <memory>
#include <string>
#include <vector>
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "vendor/breakpad/src/client/windows/handler/exception_handler.h"
namespace base {

View file

@ -7,8 +7,9 @@
#include "native_mate/dictionary.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/geometry/size.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
namespace mate {
@ -35,7 +36,7 @@ bool Converter<gfx::Point>::FromV8(v8::Isolate* isolate,
}
v8::Local<v8::Value> Converter<gfx::Size>::ToV8(v8::Isolate* isolate,
const gfx::Size& val) {
const gfx::Size& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("width", val.width());
@ -82,13 +83,13 @@ bool Converter<gfx::Rect>::FromV8(v8::Isolate* isolate,
}
template<>
struct Converter<gfx::Display::TouchSupport> {
struct Converter<display::Display::TouchSupport> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display::TouchSupport& val) {
const display::Display::TouchSupport& val) {
switch (val) {
case gfx::Display::TOUCH_SUPPORT_AVAILABLE:
case display::Display::TOUCH_SUPPORT_AVAILABLE:
return StringToV8(isolate, "available");
case gfx::Display::TOUCH_SUPPORT_UNAVAILABLE:
case display::Display::TOUCH_SUPPORT_UNAVAILABLE:
return StringToV8(isolate, "unavailable");
default:
return StringToV8(isolate, "unknown");
@ -96,8 +97,8 @@ struct Converter<gfx::Display::TouchSupport> {
}
};
v8::Local<v8::Value> Converter<gfx::Display>::ToV8(v8::Isolate* isolate,
const gfx::Display& val) {
v8::Local<v8::Value> Converter<display::Display>::ToV8(
v8::Isolate* isolate, const display::Display& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("id", val.id());

View file

@ -7,11 +7,14 @@
#include "native_mate/converter.h"
namespace display {
class Display;
}
namespace gfx {
class Point;
class Size;
class Rect;
class Display;
}
namespace mate {
@ -44,12 +47,12 @@ struct Converter<gfx::Rect> {
};
template<>
struct Converter<gfx::Display> {
struct Converter<display::Display> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display& val);
const display::Display& val);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
gfx::Display* out);
display::Display* out);
};
} // namespace mate

View file

@ -11,6 +11,7 @@
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "base/values.h"
#include "base/strings/string_number_conversions.h"
#include "native_mate/dictionary.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
@ -47,7 +48,8 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
dict.Set("data", buffer);
dict.Set("issuerName", val->issuer().GetDisplayName());
dict.Set("subjectName", val->subject().GetDisplayName());
dict.Set("serialNumber", val->serial_number());
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),
val->serial_number().size()));
dict.Set("validStart", val->valid_start().ToDoubleT());
dict.Set("validExpiry", val->valid_expiry().ToDoubleT());
dict.Set("fingerprint",

View file

@ -5,14 +5,15 @@
#include "atom/common/native_mate_converters/v8_value_converter.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "native_mate/dictionary.h"
#include "vendor/node/src/node_buffer.h"
#include "atom/common/node_includes.h"
namespace atom {
@ -110,32 +111,31 @@ base::Value* V8ValueConverter::FromV8Value(
v8::Local<v8::Value> V8ValueConverter::ToV8ValueImpl(
v8::Isolate* isolate, const base::Value* value) const {
CHECK(value);
switch (value->GetType()) {
case base::Value::TYPE_NULL:
return v8::Null(isolate);
case base::Value::TYPE_BOOLEAN: {
bool val = false;
CHECK(value->GetAsBoolean(&val));
value->GetAsBoolean(&val);
return v8::Boolean::New(isolate, val);
}
case base::Value::TYPE_INTEGER: {
int val = 0;
CHECK(value->GetAsInteger(&val));
value->GetAsInteger(&val);
return v8::Integer::New(isolate, val);
}
case base::Value::TYPE_DOUBLE: {
double val = 0.0;
CHECK(value->GetAsDouble(&val));
value->GetAsDouble(&val);
return v8::Number::New(isolate, val);
}
case base::Value::TYPE_STRING: {
std::string val;
CHECK(value->GetAsString(&val));
value->GetAsString(&val);
return v8::String::NewFromUtf8(
isolate, val.c_str(), v8::String::kNormalString, val.length());
}
@ -163,10 +163,9 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
for (size_t i = 0; i < val->GetSize(); ++i) {
const base::Value* child = nullptr;
CHECK(val->Get(i, &child));
val->Get(i, &child);
v8::Local<v8::Value> child_v8 = ToV8ValueImpl(isolate, child);
CHECK(!child_v8.IsEmpty());
v8::TryCatch try_catch;
result->Set(static_cast<uint32_t>(i), child_v8);
@ -186,7 +185,6 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Object(
!iter.IsAtEnd(); iter.Advance()) {
const std::string& key = iter.key();
v8::Local<v8::Value> child_v8 = ToV8ValueImpl(isolate, &iter.value());
CHECK(!child_v8.IsEmpty());
v8::TryCatch try_catch;
result.Set(key, child_v8);
@ -210,8 +208,6 @@ base::Value* V8ValueConverter::FromV8ValueImpl(
FromV8ValueState* state,
v8::Local<v8::Value> val,
v8::Isolate* isolate) const {
CHECK(!val.IsEmpty());
FromV8ValueState::Level state_level(state);
if (state->HasReachedMaxRecursionDepth())
return nullptr;

View file

@ -11,7 +11,6 @@
#include "atom/common/api/locker.h"
#include "atom/common/atom_command_line.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/base_paths.h"
#include "base/environment.h"
@ -22,6 +21,8 @@
#include "content/public/common/content_paths.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
using content::BrowserThread;
// Force all builtin modules to be referenced so they can actually run their
@ -216,7 +217,6 @@ void NodeBindings::UvRunOnce() {
DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));
node::Environment* env = uv_env();
CHECK(env);
// Use Locker in browser process.
mate::Locker locker(env->isolate());

View file

@ -19,6 +19,7 @@
#undef CHECK_GT
#undef CHECK_LE
#undef CHECK_LT
#undef UNLIKELY
#undef DISALLOW_COPY_AND_ASSIGN
#undef NO_RETURN
#undef arraysize

View file

@ -96,9 +96,6 @@ const char kNodeIntegration[] = "nodeIntegration";
// Instancd ID of guest WebContents.
const char kGuestInstanceID[] = "guestInstanceId";
// Enable DirectWrite on Windows.
const char kDirectWrite[] = "directWrite";
// Web runtime features.
const char kExperimentalFeatures[] = "experimentalFeatures";
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";

View file

@ -48,7 +48,6 @@ extern const char kFocusable[];
extern const char kWebPreferences[];
// WebPreferences.
extern const char kDirectWrite[];
extern const char kZoomFactor[];
extern const char kPreloadScript[];
extern const char kPreloadURL[];

View file

@ -7,8 +7,6 @@
#include <windows.h>
#include "node_extern.h"
namespace node {
// The _open_osfhandle and _close functions on Windows are provided by the
@ -20,8 +18,8 @@ namespace node {
// we always create fd in one instance of VC++ library.
// Followings wrappers are compiled in node.dll, and all code in electron.exe
// should call these wrappers instead of calling _open_osfhandle directly.
NODE_EXTERN int open_osfhandle(intptr_t osfhandle, int flags);
NODE_EXTERN int close(int fd);
__declspec(dllexport) int open_osfhandle(intptr_t osfhandle, int flags);
__declspec(dllexport) int close(int fd);
} // namespace node

View file

@ -5,10 +5,10 @@
#ifndef ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
#define ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
#include <memory>
#include <string>
#include "atom/renderer/guest_view_container.h"
#include "base/memory/scoped_ptr.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
#include "third_party/WebKit/public/web/WebCache.h"

View file

@ -141,6 +141,10 @@ void AtomRenderViewObserver::DraggableRegionsChanged(blink::WebFrame* frame) {
Send(new AtomViewHostMsg_UpdateDraggableRegions(routing_id(), regions));
}
void AtomRenderViewObserver::DidCommitCompositorFrame() {
Send(new AtomViewHostMsg_DidCommitCompositorFrame(routing_id()));
}
bool AtomRenderViewObserver::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AtomRenderViewObserver, message)

View file

@ -28,6 +28,7 @@ class AtomRenderViewObserver : public content::RenderViewObserver {
// content::RenderViewObserver implementation.
void DidCreateDocumentElement(blink::WebLocalFrame* frame) override;
void DraggableRegionsChanged(blink::WebFrame* frame) override;
void DidCommitCompositorFrame() override;
bool OnMessageReceived(const IPC::Message& message) override;
void OnBrowserMessage(bool send_to_all,

View file

@ -315,8 +315,8 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
}
}
void AtomRendererClient::AddKeySystems(
std::vector<media::KeySystemInfo>* key_systems) {
void AtomRendererClient::AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
AddChromeKeySystems(key_systems);
}

View file

@ -57,7 +57,9 @@ class AtomRendererClient : public content::ContentRendererClient {
content::RenderFrame* render_frame,
const std::string& mime_type,
const GURL& original_url) override;
void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) override;
void AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems)
override;
std::unique_ptr<NodeBindings> node_bindings_;
std::unique_ptr<AtomBindings> atom_bindings_;

View file

@ -8,11 +8,11 @@
#include <memory>
#include "base/values.h"
#include "content/public/renderer/render_process_observer.h"
#include "content/public/renderer/render_thread_observer.h"
namespace atom {
class PreferencesManager : public content::RenderProcessObserver {
class PreferencesManager : public content::RenderThreadObserver {
public:
PreferencesManager();
~PreferencesManager() override;