Merge branch 'master' of https://github.com/electron/electron into restore-issue
This commit is contained in:
commit
8129c27a4a
127 changed files with 603 additions and 479 deletions
|
@ -1 +1 @@
|
|||
v6.1.0
|
||||
v6.3.0
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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*
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -356,7 +356,7 @@ void NativeWindow::RequestToClosePage() {
|
|||
ScheduleUnresponsiveEvent(5000);
|
||||
|
||||
if (web_contents()->NeedToFireBeforeUnload())
|
||||
web_contents()->DispatchBeforeUnload(false);
|
||||
web_contents()->DispatchBeforeUnload();
|
||||
else
|
||||
web_contents()->Close();
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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_)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "atom/common/api/locker.h"
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace mate {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,158 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright 2006 The Android Open Source Project
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SkUserConfig_DEFINED
|
||||
#define SkUserConfig_DEFINED
|
||||
|
||||
/* SkTypes.h, the root of the public header files, does the following trick:
|
||||
|
||||
#include "SkPreConfig.h"
|
||||
#include "SkUserConfig.h"
|
||||
#include "SkPostConfig.h"
|
||||
|
||||
SkPreConfig.h runs first, and it is responsible for initializing certain
|
||||
skia defines.
|
||||
|
||||
SkPostConfig.h runs last, and its job is to just check that the final
|
||||
defines are consistent (i.e. that we don't have mutually conflicting
|
||||
defines).
|
||||
|
||||
SkUserConfig.h (this file) runs in the middle. It gets to change or augment
|
||||
the list of flags initially set in preconfig, and then postconfig checks
|
||||
that everything still makes sense.
|
||||
|
||||
Below are optional defines that add, subtract, or change default behavior
|
||||
in Skia. Your port can locally edit this file to enable/disable flags as
|
||||
you choose, or these can be delared on your command line (i.e. -Dfoo).
|
||||
|
||||
By default, this include file will always default to having all of the flags
|
||||
commented out, so including it will have no effect.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Skia has lots of debug-only code. Often this is just null checks or other
|
||||
parameter checking, but sometimes it can be quite intrusive (e.g. check that
|
||||
each 32bit pixel is in premultiplied form). This code can be very useful
|
||||
during development, but will slow things down in a shipping product.
|
||||
|
||||
By default, these mutually exclusive flags are defined in SkPreConfig.h,
|
||||
based on the presence or absence of NDEBUG, but that decision can be changed
|
||||
here.
|
||||
*/
|
||||
//#define SK_DEBUG
|
||||
//#define SK_RELEASE
|
||||
|
||||
/* Skia has certain debug-only code that is extremely intensive even for debug
|
||||
builds. This code is useful for diagnosing specific issues, but is not
|
||||
generally applicable, therefore it must be explicitly enabled to avoid
|
||||
the performance impact. By default these flags are undefined, but can be
|
||||
enabled by uncommenting them below.
|
||||
*/
|
||||
//#define SK_DEBUG_GLYPH_CACHE
|
||||
//#define SK_DEBUG_PATH
|
||||
|
||||
/* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger)
|
||||
it will call SK_CRASH(). If this is not defined it, it is defined in
|
||||
SkPostConfig.h to write to an illegal address
|
||||
*/
|
||||
//#define SK_CRASH() *(int *)(uintptr_t)0 = 0
|
||||
|
||||
|
||||
/* preconfig will have attempted to determine the endianness of the system,
|
||||
but you can change these mutually exclusive flags here.
|
||||
*/
|
||||
//#define SK_CPU_BENDIAN
|
||||
//#define SK_CPU_LENDIAN
|
||||
|
||||
/* Most compilers use the same bit endianness for bit flags in a byte as the
|
||||
system byte endianness, and this is the default. If for some reason this
|
||||
needs to be overridden, specify which of the mutually exclusive flags to
|
||||
use. For example, some atom processors in certain configurations have big
|
||||
endian byte order but little endian bit orders.
|
||||
*/
|
||||
//#define SK_UINT8_BITFIELD_BENDIAN
|
||||
//#define SK_UINT8_BITFIELD_LENDIAN
|
||||
|
||||
|
||||
/* To write debug messages to a console, skia will call SkDebugf(...) following
|
||||
printf conventions (e.g. const char* format, ...). If you want to redirect
|
||||
this to something other than printf, define yours here
|
||||
*/
|
||||
// Log the file and line number for assertions.
|
||||
#define SkDebugf(...)
|
||||
|
||||
/*
|
||||
* To specify a different default font cache limit, define this. If this is
|
||||
* undefined, skia will use a built-in value.
|
||||
*/
|
||||
//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
|
||||
|
||||
/*
|
||||
* To specify the default size of the image cache, undefine this and set it to
|
||||
* the desired value (in bytes). SkGraphics.h as a runtime API to set this
|
||||
* value as well. If this is undefined, a built-in value will be used.
|
||||
*/
|
||||
//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
|
||||
|
||||
/* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow
|
||||
them, but modern PDF interpreters should handle them just fine.
|
||||
*/
|
||||
//#define SK_ALLOW_LARGE_PDF_SCALARS
|
||||
|
||||
/* Define this to provide font subsetter in PDF generation.
|
||||
*/
|
||||
//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
|
||||
|
||||
/* Define this to set the upper limit for text to support LCD. Values that
|
||||
are very large increase the cost in the font cache and draw slower, without
|
||||
improving readability. If this is undefined, Skia will use its default
|
||||
value (e.g. 48)
|
||||
*/
|
||||
//#define SK_MAX_SIZE_FOR_LCDTEXT 48
|
||||
|
||||
/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
|
||||
which will run additional self-tests at startup. These can take a long time,
|
||||
so this flag is optional.
|
||||
*/
|
||||
#ifdef SK_DEBUG
|
||||
//#define SK_SUPPORT_UNITTEST
|
||||
#endif
|
||||
|
||||
/* Change the ordering to work in X windows.
|
||||
*/
|
||||
#ifdef SK_SAMPLES_FOR_X
|
||||
#define SK_R32_SHIFT 16
|
||||
#define SK_G32_SHIFT 8
|
||||
#define SK_B32_SHIFT 0
|
||||
#define SK_A32_SHIFT 24
|
||||
#endif
|
||||
|
||||
|
||||
/* Determines whether to build code that supports the GPU backend. Some classes
|
||||
that are not GPU-specific, such as SkShader subclasses, have optional code
|
||||
that is used allows them to interact with the GPU backend. If you'd like to
|
||||
omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
|
||||
directories from your include search path when you're not building the GPU
|
||||
backend. Defaults to 1 (build the GPU code).
|
||||
*/
|
||||
//#define SK_SUPPORT_GPU 1
|
||||
|
||||
|
||||
/* The PDF generation code uses Path Ops to handle complex clipping paths,
|
||||
* but at this time, Path Ops is not release ready yet. So, the code is
|
||||
* hidden behind this #define guard. If you are feeling adventurous and
|
||||
* want the latest and greatest PDF generation code, uncomment the #define.
|
||||
* When Path Ops is release ready, the define guards and this user config
|
||||
* define should be removed entirely.
|
||||
*/
|
||||
//#define SK_PDF_USE_PATHOPS_CLIPPING
|
||||
|
||||
#endif
|
||||
|
|
@ -10,10 +10,10 @@
|
|||
#ifndef CHROME_BROWSER_BROWSER_PROCESS_H_
|
||||
#define CHROME_BROWSER_BROWSER_PROCESS_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace printing {
|
||||
class PrintJobManager;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
#define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "net/cert/nss_cert_database.h"
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
#ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
|
||||
#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "chrome/browser/extensions/global_shortcut_listener.h"
|
||||
#include "ui/gfx/win/singleton_hwnd.h"
|
||||
#include "ui/gfx/win/singleton_hwnd_observer.h"
|
||||
|
|
|
@ -97,7 +97,6 @@ class NativeDesktopMediaList::Worker
|
|||
typedef std::map<DesktopMediaID, uint32> ImageHashesMap;
|
||||
|
||||
// webrtc::DesktopCapturer::Callback interface.
|
||||
webrtc::SharedMemory* CreateSharedMemory(size_t size) override;
|
||||
void OnCaptureCompleted(webrtc::DesktopFrame* frame) override;
|
||||
|
||||
base::WeakPtr<NativeDesktopMediaList> media_list_;
|
||||
|
@ -218,11 +217,6 @@ void NativeDesktopMediaList::Worker::Refresh(
|
|||
base::Bind(&NativeDesktopMediaList::OnRefreshFinished, media_list_));
|
||||
}
|
||||
|
||||
webrtc::SharedMemory* NativeDesktopMediaList::Worker::CreateSharedMemory(
|
||||
size_t size) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureCompleted(
|
||||
webrtc::DesktopFrame* frame) {
|
||||
current_frame_.reset(frame);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
|
||||
#define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/sequenced_task_runner.h"
|
||||
#include "chrome/browser/media/desktop_media_list.h"
|
||||
|
|
|
@ -104,7 +104,7 @@ class PdfToEmfUtilityProcessHostClient
|
|||
|
||||
// UtilityProcessHostClient implementation.
|
||||
virtual void OnProcessCrashed(int exit_code) override;
|
||||
virtual void OnProcessLaunchFailed() override;
|
||||
virtual void OnProcessLaunchFailed(int exit_code) override;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
private:
|
||||
|
@ -423,7 +423,7 @@ void PdfToEmfUtilityProcessHostClient::OnProcessCrashed(int exit_code) {
|
|||
OnFailed();
|
||||
}
|
||||
|
||||
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed() {
|
||||
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed(int exit_code) {
|
||||
OnFailed();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
|
||||
#define CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "chrome/browser/printing/print_job_worker_owner.h"
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/non_thread_safe.h"
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
#include "chrome/browser/printing/print_view_manager_base.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/timer/timer.h"
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "chrome/browser/printing/print_job_worker_owner.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/thread_task_runner_handle.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
|
||||
#define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "url/gurl.h"
|
||||
|
@ -340,4 +340,4 @@ class TtsController {
|
|||
virtual ~TtsController() {}
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
|
||||
#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
|
||||
#define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
|
||||
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "chrome/browser/speech/tts_controller.h"
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include <math.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/leak_annotations.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "chrome/browser/speech/tts_platform.h"
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
#include "chrome/common/chrome_paths_internal.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/environment.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "chrome/renderer/media/chrome_key_systems.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -12,13 +14,10 @@
|
|||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/widevine_cdm_messages.h"
|
||||
#include "components/cdm/renderer/widevine_key_systems.h"
|
||||
#include "components/cdm/renderer/widevine_key_system_properties.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "media/base/eme_constants.h"
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#include "components/cdm/renderer/android_key_systems.h"
|
||||
#endif
|
||||
#include "media/base/key_system_properties.h"
|
||||
|
||||
// #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
|
||||
|
@ -30,10 +29,13 @@
|
|||
#include "base/version.h"
|
||||
#endif
|
||||
|
||||
using media::KeySystemInfo;
|
||||
using media::KeySystemProperties;
|
||||
using media::SupportedCodecs;
|
||||
|
||||
#if defined(ENABLE_PEPPER_CDMS)
|
||||
static const char kExternalClearKeyPepperType[] =
|
||||
"application/x-ppapi-clearkey-cdm";
|
||||
|
||||
static bool IsPepperCdmAvailable(
|
||||
const std::string& pepper_type,
|
||||
std::vector<base::string16>* additional_param_names,
|
||||
|
@ -49,6 +51,120 @@ static bool IsPepperCdmAvailable(
|
|||
return is_available;
|
||||
}
|
||||
|
||||
// KeySystemProperties implementation for external Clear Key systems.
|
||||
class ExternalClearKeyProperties : public KeySystemProperties {
|
||||
public:
|
||||
explicit ExternalClearKeyProperties(const std::string& key_system_name)
|
||||
: key_system_name_(key_system_name) {}
|
||||
|
||||
std::string GetKeySystemName() const override { return key_system_name_; }
|
||||
bool IsSupportedInitDataType(
|
||||
media::EmeInitDataType init_data_type) const override {
|
||||
switch (init_data_type) {
|
||||
case media::EmeInitDataType::WEBM:
|
||||
case media::EmeInitDataType::KEYIDS:
|
||||
return true;
|
||||
|
||||
case media::EmeInitDataType::CENC:
|
||||
#if defined(USE_PROPRIETARY_CODECS)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
||||
|
||||
case media::EmeInitDataType::UNKNOWN:
|
||||
return false;
|
||||
}
|
||||
NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
SupportedCodecs GetSupportedCodecs() const override {
|
||||
#if defined(USE_PROPRIETARY_CODECS)
|
||||
return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
|
||||
#else
|
||||
return media::EME_CODEC_WEBM_ALL;
|
||||
#endif
|
||||
}
|
||||
|
||||
media::EmeConfigRule GetRobustnessConfigRule(
|
||||
media::EmeMediaType media_type,
|
||||
const std::string& requested_robustness) const override {
|
||||
return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
|
||||
: media::EmeConfigRule::NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
// Persistent license sessions are faked.
|
||||
media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport()
|
||||
const override {
|
||||
return media::EmeSessionTypeSupport::SUPPORTED;
|
||||
}
|
||||
|
||||
media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport()
|
||||
const override {
|
||||
return media::EmeSessionTypeSupport::NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
media::EmeFeatureSupport GetPersistentStateSupport() const override {
|
||||
return media::EmeFeatureSupport::REQUESTABLE;
|
||||
}
|
||||
|
||||
media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override {
|
||||
return media::EmeFeatureSupport::NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
std::string GetPepperType() const override {
|
||||
return kExternalClearKeyPepperType;
|
||||
}
|
||||
|
||||
private:
|
||||
const std::string key_system_name_;
|
||||
};
|
||||
|
||||
// External Clear Key (used for testing).
|
||||
static void AddExternalClearKey(
|
||||
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
|
||||
static const char kExternalClearKeyKeySystem[] =
|
||||
"org.chromium.externalclearkey";
|
||||
static const char kExternalClearKeyDecryptOnlyKeySystem[] =
|
||||
"org.chromium.externalclearkey.decryptonly";
|
||||
static const char kExternalClearKeyFileIOTestKeySystem[] =
|
||||
"org.chromium.externalclearkey.fileiotest";
|
||||
static const char kExternalClearKeyInitializeFailKeySystem[] =
|
||||
"org.chromium.externalclearkey.initializefail";
|
||||
static const char kExternalClearKeyCrashKeySystem[] =
|
||||
"org.chromium.externalclearkey.crash";
|
||||
|
||||
std::vector<base::string16> additional_param_names;
|
||||
std::vector<base::string16> additional_param_values;
|
||||
if (!IsPepperCdmAvailable(kExternalClearKeyPepperType,
|
||||
&additional_param_names,
|
||||
&additional_param_values)) {
|
||||
return;
|
||||
}
|
||||
|
||||
concrete_key_systems->emplace_back(
|
||||
new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
|
||||
|
||||
// Add support of decrypt-only mode in ClearKeyCdm.
|
||||
concrete_key_systems->emplace_back(
|
||||
new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
|
||||
|
||||
// A key system that triggers FileIO test in ClearKeyCdm.
|
||||
concrete_key_systems->emplace_back(
|
||||
new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
|
||||
|
||||
// A key system that Chrome thinks is supported by ClearKeyCdm, but actually
|
||||
// will be refused by ClearKeyCdm. This is to test the CDM initialization
|
||||
// failure case.
|
||||
concrete_key_systems->emplace_back(
|
||||
new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
|
||||
|
||||
// A key system that triggers a crash in ClearKeyCdm.
|
||||
concrete_key_systems->emplace_back(
|
||||
new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
|
||||
}
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||
// This function finds "codecs" and parses the value into the vector |codecs|.
|
||||
// Converts the codec strings to UTF-8 since we only expect ASCII strings and
|
||||
|
@ -79,11 +195,11 @@ void GetSupportedCodecsForPepperCdm(
|
|||
}
|
||||
|
||||
static void AddPepperBasedWidevine(
|
||||
std::vector<KeySystemInfo>* concrete_key_systems) {
|
||||
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
|
||||
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
||||
Version glibc_version(gnu_get_libc_version());
|
||||
DCHECK(glibc_version.IsValid());
|
||||
if (glibc_version.IsOlderThan(WIDEVINE_CDM_MIN_GLIBC_VERSION))
|
||||
if (glibc_version < base::Version(WIDEVINE_CDM_MIN_GLIBC_VERSION))
|
||||
return;
|
||||
#endif // defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
||||
|
||||
|
@ -120,10 +236,12 @@ static void AddPepperBasedWidevine(
|
|||
#if defined(USE_PROPRIETARY_CODECS)
|
||||
if (codecs[i] == kCdmSupportedCodecAvc1)
|
||||
supported_codecs |= media::EME_CODEC_MP4_AVC1;
|
||||
if (codecs[i] == kCdmSupportedCodecVp9)
|
||||
supported_codecs |= media::EME_CODEC_MP4_VP9;
|
||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
||||
}
|
||||
|
||||
cdm::AddWidevineWithCodecs(
|
||||
concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
|
||||
supported_codecs,
|
||||
#if defined(OS_CHROMEOS)
|
||||
media::EmeRobustness::HW_SECURE_ALL, // Maximum audio robustness.
|
||||
|
@ -131,27 +249,29 @@ static void AddPepperBasedWidevine(
|
|||
media::EmeSessionTypeSupport::
|
||||
SUPPORTED_WITH_IDENTIFIER, // Persistent-license.
|
||||
media::EmeSessionTypeSupport::
|
||||
NOT_SUPPORTED, // Persistent-release-message.
|
||||
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
|
||||
media::EmeFeatureSupport::REQUESTABLE, // Distinctive identifier.
|
||||
NOT_SUPPORTED, // Persistent-release-message.
|
||||
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
|
||||
media::EmeFeatureSupport::REQUESTABLE)); // Distinctive identifier.
|
||||
#else // (Desktop)
|
||||
media::EmeRobustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
|
||||
media::EmeRobustness::SW_SECURE_DECODE, // Maximum video robustness.
|
||||
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
|
||||
media::EmeSessionTypeSupport::
|
||||
NOT_SUPPORTED, // persistent-release-message.
|
||||
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
|
||||
media::EmeFeatureSupport::NOT_SUPPORTED, // Distinctive identifier.
|
||||
NOT_SUPPORTED, // persistent-release-message.
|
||||
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
|
||||
media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
concrete_key_systems);
|
||||
}
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
||||
#endif // defined(ENABLE_PEPPER_CDMS)
|
||||
|
||||
void AddChromeKeySystems(std::vector<KeySystemInfo>* key_systems_info) {
|
||||
void AddChromeKeySystems(
|
||||
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
|
||||
#if defined(ENABLE_PEPPER_CDMS)
|
||||
AddExternalClearKey(key_systems_properties);
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||
AddPepperBasedWidevine(key_systems_info);
|
||||
AddPepperBasedWidevine(key_systems_properties);
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
||||
#endif // defined(ENABLE_PEPPER_CDMS)
|
||||
}
|
||||
|
|
|
@ -5,10 +5,16 @@
|
|||
#ifndef CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_
|
||||
#define CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "media/base/key_system_info.h"
|
||||
namespace media {
|
||||
class KeySystemProperties;
|
||||
}
|
||||
|
||||
void AddChromeKeySystems(std::vector<media::KeySystemInfo>* key_systems_info);
|
||||
// Register the key systems supported by populating |key_systems_properties|.
|
||||
void AddChromeKeySystems(
|
||||
std::vector<std::unique_ptr<media::KeySystemProperties>>*
|
||||
key_systems_properties);
|
||||
|
||||
#endif // CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_
|
||||
#define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/gtest_prod_util.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/time/time.h"
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
#include "chrome/renderer/printing/print_web_view_helper.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "chrome/common/print_messages.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "printing/metafile_skia_wrapper.h"
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
#include "chrome/renderer/printing/print_web_view_helper.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "chrome/common/print_messages.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_WORDITERATOR_H_
|
||||
#define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_WORDITERATOR_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "third_party/icu/source/common/unicode/uscript.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/containers/hash_tables.h"
|
||||
#include "content/public/renderer/render_process_observer.h"
|
||||
#include "content/public/renderer/render_thread_observer.h"
|
||||
#include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h"
|
||||
#include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@ struct TtsVoice;
|
|||
// the utterance id (which is globally unique) matches.
|
||||
class TtsDispatcher
|
||||
: public blink::WebSpeechSynthesizer,
|
||||
public content::RenderProcessObserver {
|
||||
public content::RenderThreadObserver {
|
||||
public:
|
||||
explicit TtsDispatcher(blink::WebSpeechSynthesizerClient* client);
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "net/test/embedded_test_server/stream_listen_socket.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// winsock2.h must be included first in order to ensure it is included before
|
||||
// windows.h.
|
||||
|
@ -20,7 +22,6 @@
|
|||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/sys_byteorder.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#ifndef NET_TEST_EMBEDDED_TEST_SERVER_STREAM_LISTEN_SOCKET_H_
|
||||
#define NET_TEST_EMBEDDED_TEST_SERVER_STREAM_LISTEN_SOCKET_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -30,7 +32,6 @@
|
|||
|
||||
#include "base/macros.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "net/base/net_export.h"
|
||||
#include "net/socket/socket_descriptor.h"
|
||||
|
||||
|
|
10
common.gypi
10
common.gypi
|
@ -14,11 +14,14 @@
|
|||
'python': 'python',
|
||||
'openssl_fips': '',
|
||||
'openssl_no_asm': 1,
|
||||
'use_openssl_def': 0,
|
||||
'OPENSSL_PRODUCT': 'libopenssl.a',
|
||||
'node_release_urlbase': 'https://atom.io/download/atom-shell',
|
||||
'node_byteorder': '<!(node <(DEPTH)/tools/get-endianness.js)',
|
||||
'node_target_type': 'shared_library',
|
||||
'node_install_npm': 'false',
|
||||
'node_prefix': '',
|
||||
'node_shared': 'true',
|
||||
'node_shared_cares': 'false',
|
||||
'node_shared_http_parser': 'false',
|
||||
'node_shared_libuv': 'false',
|
||||
|
@ -31,17 +34,20 @@
|
|||
'node_use_mdb': 'false',
|
||||
'node_use_openssl': 'true',
|
||||
'node_use_perfctr': 'false',
|
||||
'node_use_v8_platform': 'false',
|
||||
'node_use_bundled_v8': 'false',
|
||||
'uv_library': 'static_library',
|
||||
'uv_parent_path': 'vendor/node/deps/uv',
|
||||
'uv_use_dtrace': 'false',
|
||||
'V8_BASE': '',
|
||||
'v8_postmortem_support': 'false',
|
||||
'v8_enable_i18n_support': 'false',
|
||||
'v8_inspector': 'false',
|
||||
},
|
||||
# Settings to compile node under Windows.
|
||||
'target_defaults': {
|
||||
'target_conditions': [
|
||||
['_target_name in ["libuv", "http_parser", "openssl", "cares", "node", "zlib"]', {
|
||||
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node", "zlib"]', {
|
||||
'msvs_disabled_warnings': [
|
||||
4003, # not enough actual parameters for macro 'V'
|
||||
4013, # 'free' undefined; assuming extern returning int
|
||||
|
@ -158,6 +164,7 @@
|
|||
'_uspoof_open_56',
|
||||
'_usearch_setPattern_56',
|
||||
'?createInstance@Transliterator@icu_56@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
|
||||
'??0MeasureFormat@icu_56@@QAE@ABVLocale@1@W4UMeasureFormatWidth@@AAW4UErrorCode@@@Z',
|
||||
],
|
||||
}, {
|
||||
'reference_symbols': [
|
||||
|
@ -171,6 +178,7 @@
|
|||
'uspoof_open_56',
|
||||
'usearch_setPattern_56',
|
||||
'?createInstance@Transliterator@icu_56@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z',
|
||||
'??0MeasureFormat@icu_56@@QEAA@AEBVLocale@1@W4UMeasureFormatWidth@@AEAW4UErrorCode@@@Z',
|
||||
],
|
||||
}],
|
||||
],
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
* [Estructura de los directorios del Código Fuente](development/source-code-directory-structure.md)
|
||||
* [Diferencias Técnicas con NW.js (anteriormente conocido como node-webkit)](development/atom-shell-vs-node-webkit.md)
|
||||
* [Repaso del Sistema de Compilación](development/build-system-overview.md)
|
||||
* [Instrucciones de Compilación (Mac)](development/build-instructions-osx.md)
|
||||
* [Instrucciones de Compilación (macOS)](development/build-instructions-osx.md)
|
||||
* [Instrucciones de Compilación (Windows)](development/build-instructions-windows.md)
|
||||
* [Instrucciones de Compilación (Linux)](development/build-instructions-linux.md)
|
||||
* [Configurando un Servidor de Símbolos en el depurador](development/setting-up-symbol-server.md)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Para distribuir tu aplicación con Electron, el directorio que contiene la
|
||||
aplicación deberá llamarse `app`, y ser colocado debajo del directorio de
|
||||
recursos de Electron (en OSX es `Electron.app/Contents/Resources/`, en Linux y
|
||||
recursos de Electron (en macOS es `Electron.app/Contents/Resources/`, en Linux y
|
||||
Windows es `resources/`), de esta forma:
|
||||
|
||||
En macOS:
|
||||
|
@ -63,7 +63,7 @@ de distribuirlo a los usuarios.
|
|||
Puedes renombrar `electron.exe` a cualquier nombre que desees, y editar su ícono
|
||||
y otra información con herramientas como [rcedit](https://github.com/atom/rcedit).
|
||||
|
||||
### OSX
|
||||
### macOS
|
||||
|
||||
Puedes renombrar `Electron.app` a cualquier nombre que desees, y tendrás que
|
||||
renombrar los campos `CFBundleDisplayName`, `CFBundleIdentifier` y `CFBundleName`
|
||||
|
|
|
@ -57,7 +57,7 @@ __Menú dock de Terminal.app:__
|
|||
|
||||
<img src="https://cloud.githubusercontent.com/assets/639601/5069962/6032658a-6e9c-11e4-9953-aa84006bdfff.png" height="354" width="341" >
|
||||
|
||||
Para establecer tu menú dock, puedes utilizar la API `app.dock.setMenu`, la cual sólo está disponible para OSX:
|
||||
Para establecer tu menú dock, puedes utilizar la API `app.dock.setMenu`, la cual sólo está disponible para macOS:
|
||||
|
||||
```javascript
|
||||
var app = require('app');
|
||||
|
|
|
@ -35,8 +35,8 @@ porque la gestión de los recursos GUI nativos es peligrosa, y tiende a que ocur
|
|||
Si deseas realizar operaciones GUI en una página web, el proceso renderer de la página web debe comunicarse
|
||||
con el proceso principal, y solicitar a este que realice esas operaciones.
|
||||
|
||||
En Electron, hemos proveído el módulo [ipc](../api/ipc-renderer.md) para la comunicación
|
||||
entre el proceso principal y el proceso renderer. Y también hay un módulo [remote](../api/remote.md)
|
||||
En Electron, hemos proveído el módulo [ipc](../../../docs/api/ipc-renderer.md) para la comunicación
|
||||
entre el proceso principal y el proceso renderer. Y también hay un módulo [remote](../../../docs/api/remote.md)
|
||||
para comunicación al estilo RPC.
|
||||
|
||||
## Escribe tu primera aplicación Electron
|
||||
|
|
|
@ -4,7 +4,7 @@ El plugin Pepper Flash es soportado ahora. Para utilizar pepper flash en Electro
|
|||
|
||||
## Preparar una copia del plugin Flash
|
||||
|
||||
En OSX y Linux, el detalle del plugin puede encontrarse accediendo a `chrome://plugins` en el navegador. Su ubicación y versión son útiles para el soporte. También puedes copiarlo a otro lugar.
|
||||
En macOS y Linux, el detalle del plugin puede encontrarse accediendo a `chrome://plugins` en el navegador. Su ubicación y versión son útiles para el soporte. También puedes copiarlo a otro lugar.
|
||||
|
||||
## Agrega la opción a Electron
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Distribuição de aplicações
|
||||
|
||||
Para distribuir sua aplicação com o Electron, você deve nomear o diretório que contém sua aplicação como
|
||||
`app` e dentro deste diretório colocar os recursos que você está utilizando (no OSX
|
||||
`app` e dentro deste diretório colocar os recursos que você está utilizando (no macOS
|
||||
`Electron.app/Contents/Resources/`,
|
||||
no Linux e no Windows é em `resources/`):
|
||||
|
||||
No OSX:
|
||||
No macOS:
|
||||
|
||||
```text
|
||||
electron/Electron.app/Contents/Resources/app/
|
||||
|
@ -37,7 +37,7 @@ Para usar um arquivo `asar` ao invés da pasta `app` você precisa mudar o nome
|
|||
arquivo para `app.asar` e colocá-lo sob o diretório de recursos do Electron como
|
||||
mostrado abaixo, então o Electron vai ler o arquivo e iniciar a aplicação a partir dele.
|
||||
|
||||
No OSX:
|
||||
No macOS:
|
||||
|
||||
```text
|
||||
electron/Electron.app/Contents/Resources/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue