[chromium-style] out-of-line default constructors and destructors
This commit is contained in:
parent
6c26bb1cf8
commit
f1587da480
48 changed files with 136 additions and 12 deletions
|
@ -349,6 +349,16 @@ struct Converter<content::CertificateRequestResultType> {
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
ProcessMetric::ProcessMetric(int type,
|
||||||
|
base::ProcessId pid,
|
||||||
|
std::unique_ptr<base::ProcessMetrics> metrics) {
|
||||||
|
this->type = type;
|
||||||
|
this->pid = pid;
|
||||||
|
this->metrics = std::move(metrics);
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcessMetric::~ProcessMetric() = default;
|
||||||
|
|
||||||
namespace api {
|
namespace api {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -52,11 +52,8 @@ struct ProcessMetric {
|
||||||
|
|
||||||
ProcessMetric(int type,
|
ProcessMetric(int type,
|
||||||
base::ProcessId pid,
|
base::ProcessId pid,
|
||||||
std::unique_ptr<base::ProcessMetrics> metrics) {
|
std::unique_ptr<base::ProcessMetrics> metrics);
|
||||||
this->type = type;
|
~ProcessMetric();
|
||||||
this->pid = pid;
|
|
||||||
this->metrics = std::move(metrics);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace api {
|
namespace api {
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace api {
|
||||||
class MenuMac : public Menu {
|
class MenuMac : public Menu {
|
||||||
protected:
|
protected:
|
||||||
MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||||
|
~MenuMac() override;
|
||||||
|
|
||||||
void PopupAt(TopLevelWindow* window,
|
void PopupAt(TopLevelWindow* window,
|
||||||
int x,
|
int x,
|
||||||
|
|
|
@ -25,6 +25,8 @@ MenuMac::MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
|
||||||
weak_factory_(this) {
|
weak_factory_(this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MenuMac::~MenuMac() = default;
|
||||||
|
|
||||||
void MenuMac::PopupAt(TopLevelWindow* window,
|
void MenuMac::PopupAt(TopLevelWindow* window,
|
||||||
int x, int y, int positioning_item,
|
int x, int y, int positioning_item,
|
||||||
const base::Closure& callback) {
|
const base::Closure& callback) {
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace api {
|
||||||
MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
|
MenuViews::MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
|
||||||
: Menu(isolate, wrapper), weak_factory_(this) {}
|
: Menu(isolate, wrapper), weak_factory_(this) {}
|
||||||
|
|
||||||
|
MenuViews::~MenuViews() = default;
|
||||||
|
|
||||||
void MenuViews::PopupAt(TopLevelWindow* window,
|
void MenuViews::PopupAt(TopLevelWindow* window,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace api {
|
||||||
class MenuViews : public Menu {
|
class MenuViews : public Menu {
|
||||||
public:
|
public:
|
||||||
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||||
|
~MenuViews() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void PopupAt(TopLevelWindow* window,
|
void PopupAt(TopLevelWindow* window,
|
||||||
|
|
|
@ -27,6 +27,8 @@ FrameSubscriber::FrameSubscriber(v8::Isolate* isolate,
|
||||||
source_id_for_copy_request_(base::UnguessableToken::Create()),
|
source_id_for_copy_request_(base::UnguessableToken::Create()),
|
||||||
weak_factory_(this) {}
|
weak_factory_(this) {}
|
||||||
|
|
||||||
|
FrameSubscriber::~FrameSubscriber() = default;
|
||||||
|
|
||||||
bool FrameSubscriber::ShouldCaptureFrame(
|
bool FrameSubscriber::ShouldCaptureFrame(
|
||||||
const gfx::Rect& dirty_rect,
|
const gfx::Rect& dirty_rect,
|
||||||
base::TimeTicks present_time,
|
base::TimeTicks present_time,
|
||||||
|
|
|
@ -27,6 +27,7 @@ class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber {
|
||||||
content::RenderWidgetHostView* view,
|
content::RenderWidgetHostView* view,
|
||||||
const FrameCaptureCallback& callback,
|
const FrameCaptureCallback& callback,
|
||||||
bool only_dirty);
|
bool only_dirty);
|
||||||
|
~FrameSubscriber() override;
|
||||||
|
|
||||||
bool ShouldCaptureFrame(const gfx::Rect& damage_rect,
|
bool ShouldCaptureFrame(const gfx::Rect& damage_rect,
|
||||||
base::TimeTicks present_time,
|
base::TimeTicks present_time,
|
||||||
|
|
|
@ -28,6 +28,7 @@ constexpr int kUserWantsNoMoreDialogs = -1;
|
||||||
AtomJavaScriptDialogManager::AtomJavaScriptDialogManager(
|
AtomJavaScriptDialogManager::AtomJavaScriptDialogManager(
|
||||||
api::WebContents* api_web_contents)
|
api::WebContents* api_web_contents)
|
||||||
: api_web_contents_(api_web_contents) {}
|
: api_web_contents_(api_web_contents) {}
|
||||||
|
AtomJavaScriptDialogManager::~AtomJavaScriptDialogManager() = default;
|
||||||
|
|
||||||
void AtomJavaScriptDialogManager::RunJavaScriptDialog(
|
void AtomJavaScriptDialogManager::RunJavaScriptDialog(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
|
|
|
@ -19,6 +19,7 @@ class WebContents;
|
||||||
class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
||||||
public:
|
public:
|
||||||
explicit AtomJavaScriptDialogManager(api::WebContents* api_web_contents);
|
explicit AtomJavaScriptDialogManager(api::WebContents* api_web_contents);
|
||||||
|
~AtomJavaScriptDialogManager() override;
|
||||||
|
|
||||||
// content::JavaScriptDialogManager implementations.
|
// content::JavaScriptDialogManager implementations.
|
||||||
void RunJavaScriptDialog(content::WebContents* web_contents,
|
void RunJavaScriptDialog(content::WebContents* web_contents,
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
BridgeTaskRunner::BridgeTaskRunner() = default;
|
||||||
|
BridgeTaskRunner::~BridgeTaskRunner() = default;
|
||||||
|
|
||||||
void BridgeTaskRunner::MessageLoopIsReady() {
|
void BridgeTaskRunner::MessageLoopIsReady() {
|
||||||
auto* message_loop = base::MessageLoop::current();
|
auto* message_loop = base::MessageLoop::current();
|
||||||
CHECK(message_loop);
|
CHECK(message_loop);
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace atom {
|
||||||
// otherwise delay the work until message loop is ready.
|
// otherwise delay the work until message loop is ready.
|
||||||
class BridgeTaskRunner : public base::SingleThreadTaskRunner {
|
class BridgeTaskRunner : public base::SingleThreadTaskRunner {
|
||||||
public:
|
public:
|
||||||
BridgeTaskRunner() {}
|
BridgeTaskRunner();
|
||||||
|
|
||||||
// Called when message loop is ready.
|
// Called when message loop is ready.
|
||||||
void MessageLoopIsReady();
|
void MessageLoopIsReady();
|
||||||
|
@ -35,7 +35,7 @@ class BridgeTaskRunner : public base::SingleThreadTaskRunner {
|
||||||
private:
|
private:
|
||||||
using TaskPair =
|
using TaskPair =
|
||||||
std::tuple<base::Location, base::OnceClosure, base::TimeDelta>;
|
std::tuple<base::Location, base::OnceClosure, base::TimeDelta>;
|
||||||
~BridgeTaskRunner() override {}
|
~BridgeTaskRunner() override;
|
||||||
|
|
||||||
std::vector<TaskPair> tasks_;
|
std::vector<TaskPair> tasks_;
|
||||||
std::vector<TaskPair> non_nestable_tasks_;
|
std::vector<TaskPair> non_nestable_tasks_;
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
Browser::LoginItemSettings::LoginItemSettings() = default;
|
||||||
|
Browser::LoginItemSettings::~LoginItemSettings() = default;
|
||||||
|
Browser::LoginItemSettings::LoginItemSettings(
|
||||||
|
const LoginItemSettings& other) = default;
|
||||||
|
|
||||||
Browser::Browser()
|
Browser::Browser()
|
||||||
: is_quiting_(false),
|
: is_quiting_(false),
|
||||||
is_exiting_(false),
|
is_exiting_(false),
|
||||||
|
|
|
@ -100,6 +100,10 @@ class Browser : public WindowListObserver {
|
||||||
bool opened_as_hidden = false;
|
bool opened_as_hidden = false;
|
||||||
base::string16 path;
|
base::string16 path;
|
||||||
std::vector<base::string16> args;
|
std::vector<base::string16> args;
|
||||||
|
|
||||||
|
LoginItemSettings();
|
||||||
|
~LoginItemSettings();
|
||||||
|
LoginItemSettings(const LoginItemSettings&);
|
||||||
};
|
};
|
||||||
void SetLoginItemSettings(LoginItemSettings settings);
|
void SetLoginItemSettings(LoginItemSettings settings);
|
||||||
LoginItemSettings GetLoginItemSettings(const LoginItemSettings& options);
|
LoginItemSettings GetLoginItemSettings(const LoginItemSettings& options);
|
||||||
|
|
|
@ -29,6 +29,8 @@ JavascriptEnvironment::JavascriptEnvironment()
|
||||||
context_(isolate_, v8::Context::New(isolate_)),
|
context_(isolate_, v8::Context::New(isolate_)),
|
||||||
context_scope_(v8::Local<v8::Context>::New(isolate_, context_)) {}
|
context_scope_(v8::Local<v8::Context>::New(isolate_, context_)) {}
|
||||||
|
|
||||||
|
JavascriptEnvironment::~JavascriptEnvironment() = default;
|
||||||
|
|
||||||
void JavascriptEnvironment::OnMessageLoopCreated() {
|
void JavascriptEnvironment::OnMessageLoopCreated() {
|
||||||
isolate_holder_.AddRunMicrotasksObserver();
|
isolate_holder_.AddRunMicrotasksObserver();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace atom {
|
||||||
class JavascriptEnvironment {
|
class JavascriptEnvironment {
|
||||||
public:
|
public:
|
||||||
JavascriptEnvironment();
|
JavascriptEnvironment();
|
||||||
|
~JavascriptEnvironment();
|
||||||
|
|
||||||
void OnMessageLoopCreated();
|
void OnMessageLoopCreated();
|
||||||
void OnMessageLoopDestroying();
|
void OnMessageLoopDestroying();
|
||||||
|
|
|
@ -34,6 +34,10 @@ struct Transaction {
|
||||||
std::string errorMessage = "";
|
std::string errorMessage = "";
|
||||||
std::string transactionState = "";
|
std::string transactionState = "";
|
||||||
Payment payment;
|
Payment payment;
|
||||||
|
|
||||||
|
Transaction();
|
||||||
|
Transaction(const Transaction&);
|
||||||
|
~Transaction();
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------------- Classes ---------------------------
|
// --------------------------- Classes ---------------------------
|
||||||
|
|
|
@ -174,6 +174,10 @@ using InAppTransactionCallback = base::RepeatingCallback<void(
|
||||||
|
|
||||||
namespace in_app_purchase {
|
namespace in_app_purchase {
|
||||||
|
|
||||||
|
Transaction::Transaction() = default;
|
||||||
|
Transaction::Transaction(const Transaction&) = default;
|
||||||
|
Transaction::~Transaction() = default;
|
||||||
|
|
||||||
TransactionObserver::TransactionObserver() : weak_ptr_factory_(this) {
|
TransactionObserver::TransactionObserver() : weak_ptr_factory_(this) {
|
||||||
obeserver_ = [[InAppTransactionObserver alloc]
|
obeserver_ = [[InAppTransactionObserver alloc]
|
||||||
initWithCallback:base::Bind(&TransactionObserver::OnTransactionsUpdated,
|
initWithCallback:base::Bind(&TransactionObserver::OnTransactionsUpdated,
|
||||||
|
|
|
@ -30,6 +30,10 @@ struct Product {
|
||||||
|
|
||||||
// Downloadable Content Information
|
// Downloadable Content Information
|
||||||
bool downloadable = false;
|
bool downloadable = false;
|
||||||
|
|
||||||
|
Product(const Product&);
|
||||||
|
Product();
|
||||||
|
~Product();
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------------- Typedefs ---------------------------
|
// --------------------------- Typedefs ---------------------------
|
||||||
|
|
|
@ -160,6 +160,10 @@
|
||||||
|
|
||||||
namespace in_app_purchase {
|
namespace in_app_purchase {
|
||||||
|
|
||||||
|
Product::Product() = default;
|
||||||
|
Product::Product(const Product&) = default;
|
||||||
|
Product::~Product() = default;
|
||||||
|
|
||||||
void GetProducts(const std::vector<std::string>& productIDs,
|
void GetProducts(const std::vector<std::string>& productIDs,
|
||||||
const InAppPurchaseProductsCallback& callback) {
|
const InAppPurchaseProductsCallback& callback) {
|
||||||
auto* iapProduct = [[InAppPurchaseProduct alloc] initWithCallback:callback];
|
auto* iapProduct = [[InAppPurchaseProduct alloc] initWithCallback:callback];
|
||||||
|
|
|
@ -505,4 +505,9 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NativeWindowRelay::NativeWindowRelay(base::WeakPtr<NativeWindow> window)
|
||||||
|
: key(UserDataKey()), window(window) {}
|
||||||
|
|
||||||
|
NativeWindowRelay::~NativeWindowRelay() = default;
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -323,8 +323,8 @@ class NativeWindow : public base::SupportsUserData {
|
||||||
class NativeWindowRelay
|
class NativeWindowRelay
|
||||||
: public content::WebContentsUserData<NativeWindowRelay> {
|
: public content::WebContentsUserData<NativeWindowRelay> {
|
||||||
public:
|
public:
|
||||||
explicit NativeWindowRelay(base::WeakPtr<NativeWindow> window)
|
explicit NativeWindowRelay(base::WeakPtr<NativeWindow> window);
|
||||||
: key(UserDataKey()), window(window) {}
|
~NativeWindowRelay() override;
|
||||||
|
|
||||||
static void* UserDataKey() {
|
static void* UserDataKey() {
|
||||||
return content::WebContentsUserData<NativeWindowRelay>::UserDataKey();
|
return content::WebContentsUserData<NativeWindowRelay>::UserDataKey();
|
||||||
|
|
|
@ -19,6 +19,10 @@ using content::BrowserThread;
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
VerifyRequestParams::VerifyRequestParams() = default;
|
||||||
|
VerifyRequestParams::~VerifyRequestParams() = default;
|
||||||
|
VerifyRequestParams::VerifyRequestParams(const VerifyRequestParams&) = default;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class Response : public base::LinkNode<Response> {
|
class Response : public base::LinkNode<Response> {
|
||||||
|
|
|
@ -26,6 +26,10 @@ struct VerifyRequestParams {
|
||||||
std::string default_result;
|
std::string default_result;
|
||||||
int error_code;
|
int error_code;
|
||||||
scoped_refptr<net::X509Certificate> certificate;
|
scoped_refptr<net::X509Certificate> certificate;
|
||||||
|
|
||||||
|
VerifyRequestParams();
|
||||||
|
VerifyRequestParams(const VerifyRequestParams&);
|
||||||
|
~VerifyRequestParams();
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtomCertVerifier : public net::CertVerifier {
|
class AtomCertVerifier : public net::CertVerifier {
|
||||||
|
|
|
@ -217,6 +217,18 @@ void ReadFromResponseObject(const base::DictionaryValue& response,
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
AtomNetworkDelegate::SimpleListenerInfo::SimpleListenerInfo(
|
||||||
|
URLPatterns patterns_,
|
||||||
|
SimpleListener listener_): url_patterns(patterns_), listener(listener_) {}
|
||||||
|
AtomNetworkDelegate::SimpleListenerInfo::SimpleListenerInfo() = default;
|
||||||
|
AtomNetworkDelegate::SimpleListenerInfo::~SimpleListenerInfo() = default;
|
||||||
|
|
||||||
|
AtomNetworkDelegate::ResponseListenerInfo::ResponseListenerInfo(
|
||||||
|
URLPatterns patterns_,
|
||||||
|
ResponseListener listener_): url_patterns(patterns_), listener(listener_) {}
|
||||||
|
AtomNetworkDelegate::ResponseListenerInfo::ResponseListenerInfo() = default;
|
||||||
|
AtomNetworkDelegate::ResponseListenerInfo::~ResponseListenerInfo() = default;
|
||||||
|
|
||||||
AtomNetworkDelegate::AtomNetworkDelegate() {}
|
AtomNetworkDelegate::AtomNetworkDelegate() {}
|
||||||
|
|
||||||
AtomNetworkDelegate::~AtomNetworkDelegate() {}
|
AtomNetworkDelegate::~AtomNetworkDelegate() {}
|
||||||
|
|
|
@ -51,11 +51,19 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
||||||
struct SimpleListenerInfo {
|
struct SimpleListenerInfo {
|
||||||
URLPatterns url_patterns;
|
URLPatterns url_patterns;
|
||||||
SimpleListener listener;
|
SimpleListener listener;
|
||||||
|
|
||||||
|
SimpleListenerInfo(URLPatterns, SimpleListener);
|
||||||
|
SimpleListenerInfo();
|
||||||
|
~SimpleListenerInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ResponseListenerInfo {
|
struct ResponseListenerInfo {
|
||||||
URLPatterns url_patterns;
|
URLPatterns url_patterns;
|
||||||
ResponseListener listener;
|
ResponseListener listener;
|
||||||
|
|
||||||
|
ResponseListenerInfo(URLPatterns, ResponseListener);
|
||||||
|
ResponseListenerInfo();
|
||||||
|
~ResponseListenerInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
AtomNetworkDelegate();
|
AtomNetworkDelegate();
|
||||||
|
|
|
@ -31,6 +31,8 @@ URLRequestBufferJob::URLRequestBufferJob(net::URLRequest* request,
|
||||||
: JsAsker<net::URLRequestSimpleJob>(request, network_delegate),
|
: JsAsker<net::URLRequestSimpleJob>(request, network_delegate),
|
||||||
status_code_(net::HTTP_NOT_IMPLEMENTED) {}
|
status_code_(net::HTTP_NOT_IMPLEMENTED) {}
|
||||||
|
|
||||||
|
URLRequestBufferJob::~URLRequestBufferJob() = default;
|
||||||
|
|
||||||
void URLRequestBufferJob::StartAsync(std::unique_ptr<base::Value> options) {
|
void URLRequestBufferJob::StartAsync(std::unique_ptr<base::Value> options) {
|
||||||
const base::Value* binary = nullptr;
|
const base::Value* binary = nullptr;
|
||||||
if (options->IsType(base::Value::Type::DICTIONARY)) {
|
if (options->IsType(base::Value::Type::DICTIONARY)) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace atom {
|
||||||
class URLRequestBufferJob : public JsAsker<net::URLRequestSimpleJob> {
|
class URLRequestBufferJob : public JsAsker<net::URLRequestSimpleJob> {
|
||||||
public:
|
public:
|
||||||
URLRequestBufferJob(net::URLRequest*, net::NetworkDelegate*);
|
URLRequestBufferJob(net::URLRequest*, net::NetworkDelegate*);
|
||||||
|
~URLRequestBufferJob() override;
|
||||||
|
|
||||||
// JsAsker:
|
// JsAsker:
|
||||||
void StartAsync(std::unique_ptr<base::Value> options) override;
|
void StartAsync(std::unique_ptr<base::Value> options) override;
|
||||||
|
|
|
@ -83,6 +83,8 @@ URLRequestFetchJob::URLRequestFetchJob(net::URLRequest* request,
|
||||||
pending_buffer_size_(0),
|
pending_buffer_size_(0),
|
||||||
write_num_bytes_(0) {}
|
write_num_bytes_(0) {}
|
||||||
|
|
||||||
|
URLRequestFetchJob::~URLRequestFetchJob() = default;
|
||||||
|
|
||||||
void URLRequestFetchJob::BeforeStartInUI(v8::Isolate* isolate,
|
void URLRequestFetchJob::BeforeStartInUI(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value> value) {
|
v8::Local<v8::Value> value) {
|
||||||
mate::Dictionary options;
|
mate::Dictionary options;
|
||||||
|
|
|
@ -20,6 +20,7 @@ class URLRequestFetchJob : public JsAsker<net::URLRequestJob>,
|
||||||
public brightray::URLRequestContextGetter::Delegate {
|
public brightray::URLRequestContextGetter::Delegate {
|
||||||
public:
|
public:
|
||||||
URLRequestFetchJob(net::URLRequest*, net::NetworkDelegate*);
|
URLRequestFetchJob(net::URLRequest*, net::NetworkDelegate*);
|
||||||
|
~URLRequestFetchJob() override;
|
||||||
|
|
||||||
// Called by response writer.
|
// Called by response writer.
|
||||||
void HeadersCompleted();
|
void HeadersCompleted();
|
||||||
|
|
|
@ -28,6 +28,8 @@ URLRequestStreamJob::URLRequestStreamJob(net::URLRequest* request,
|
||||||
response_headers_(nullptr),
|
response_headers_(nullptr),
|
||||||
weak_factory_(this) {}
|
weak_factory_(this) {}
|
||||||
|
|
||||||
|
URLRequestStreamJob::~URLRequestStreamJob() = default;
|
||||||
|
|
||||||
void URLRequestStreamJob::BeforeStartInUI(v8::Isolate* isolate,
|
void URLRequestStreamJob::BeforeStartInUI(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value> value) {
|
v8::Local<v8::Value> value) {
|
||||||
if (value->IsNull() || value->IsUndefined() || !value->IsObject()) {
|
if (value->IsNull() || value->IsUndefined() || !value->IsObject()) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ class URLRequestStreamJob : public JsAsker<net::URLRequestJob> {
|
||||||
public:
|
public:
|
||||||
URLRequestStreamJob(net::URLRequest* request,
|
URLRequestStreamJob(net::URLRequest* request,
|
||||||
net::NetworkDelegate* network_delegate);
|
net::NetworkDelegate* network_delegate);
|
||||||
|
~URLRequestStreamJob() override;
|
||||||
|
|
||||||
void OnData(mate::Arguments* args);
|
void OnData(mate::Arguments* args);
|
||||||
void OnEnd(mate::Arguments* args);
|
void OnEnd(mate::Arguments* args);
|
||||||
|
|
|
@ -15,6 +15,8 @@ URLRequestStringJob::URLRequestStringJob(net::URLRequest* request,
|
||||||
net::NetworkDelegate* network_delegate)
|
net::NetworkDelegate* network_delegate)
|
||||||
: JsAsker<net::URLRequestSimpleJob>(request, network_delegate) {}
|
: JsAsker<net::URLRequestSimpleJob>(request, network_delegate) {}
|
||||||
|
|
||||||
|
URLRequestStringJob::~URLRequestStringJob() = default;
|
||||||
|
|
||||||
void URLRequestStringJob::StartAsync(std::unique_ptr<base::Value> options) {
|
void URLRequestStringJob::StartAsync(std::unique_ptr<base::Value> options) {
|
||||||
if (options->IsType(base::Value::Type::DICTIONARY)) {
|
if (options->IsType(base::Value::Type::DICTIONARY)) {
|
||||||
base::DictionaryValue* dict =
|
base::DictionaryValue* dict =
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace atom {
|
||||||
class URLRequestStringJob : public JsAsker<net::URLRequestSimpleJob> {
|
class URLRequestStringJob : public JsAsker<net::URLRequestSimpleJob> {
|
||||||
public:
|
public:
|
||||||
URLRequestStringJob(net::URLRequest*, net::NetworkDelegate*);
|
URLRequestStringJob(net::URLRequest*, net::NetworkDelegate*);
|
||||||
|
~URLRequestStringJob() override;
|
||||||
|
|
||||||
// JsAsker:
|
// JsAsker:
|
||||||
void StartAsync(std::unique_ptr<base::Value> options) override;
|
void StartAsync(std::unique_ptr<base::Value> options) override;
|
||||||
|
|
|
@ -64,6 +64,9 @@ struct DialogSettings {
|
||||||
bool shows_tag_field = true;
|
bool shows_tag_field = true;
|
||||||
bool force_detached = false;
|
bool force_detached = false;
|
||||||
bool security_scoped_bookmarks = false;
|
bool security_scoped_bookmarks = false;
|
||||||
|
|
||||||
|
DialogSettings();
|
||||||
|
~DialogSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ShowOpenDialog(const DialogSettings& settings,
|
bool ShowOpenDialog(const DialogSettings& settings,
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
namespace file_dialog {
|
namespace file_dialog {
|
||||||
|
|
||||||
|
DialogSettings::DialogSettings() = default;
|
||||||
|
DialogSettings::~DialogSettings() = default;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Makes sure that .jpg also shows .JPG.
|
// Makes sure that .jpg also shows .JPG.
|
||||||
|
|
|
@ -69,6 +69,9 @@
|
||||||
|
|
||||||
namespace file_dialog {
|
namespace file_dialog {
|
||||||
|
|
||||||
|
DialogSettings::DialogSettings() = default;
|
||||||
|
DialogSettings::~DialogSettings() = default;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
|
void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
|
|
||||||
namespace file_dialog {
|
namespace file_dialog {
|
||||||
|
|
||||||
|
DialogSettings::DialogSettings() = default;
|
||||||
|
DialogSettings::~DialogSettings() = default;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Distinguish directories from regular files.
|
// Distinguish directories from regular files.
|
||||||
|
|
|
@ -23,6 +23,9 @@ const int kDefaultHeight = 300;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
SetSizeParams::SetSizeParams() = default;
|
||||||
|
SetSizeParams::~SetSizeParams() = default;
|
||||||
|
|
||||||
WebViewGuestDelegate::WebViewGuestDelegate()
|
WebViewGuestDelegate::WebViewGuestDelegate()
|
||||||
: embedder_zoom_controller_(nullptr),
|
: embedder_zoom_controller_(nullptr),
|
||||||
guest_host_(nullptr),
|
guest_host_(nullptr),
|
||||||
|
|
|
@ -22,8 +22,8 @@ class WebContents;
|
||||||
// meaningful. This is because the normal size of the guestview is overridden
|
// meaningful. This is because the normal size of the guestview is overridden
|
||||||
// whenever autosizing occurs.
|
// whenever autosizing occurs.
|
||||||
struct SetSizeParams {
|
struct SetSizeParams {
|
||||||
SetSizeParams() {}
|
SetSizeParams();
|
||||||
~SetSizeParams() {}
|
~SetSizeParams();
|
||||||
|
|
||||||
std::unique_ptr<bool> enable_auto_size;
|
std::unique_ptr<bool> enable_auto_size;
|
||||||
std::unique_ptr<gfx::Size> min_size;
|
std::unique_ptr<gfx::Size> min_size;
|
||||||
|
|
|
@ -237,6 +237,8 @@ SpellCheckClient::SpellCheckScope::SpellCheckScope(
|
||||||
provider_(client.provider_.NewHandle()),
|
provider_(client.provider_.NewHandle()),
|
||||||
spell_check_(client.spell_check_.NewHandle()) {}
|
spell_check_(client.spell_check_.NewHandle()) {}
|
||||||
|
|
||||||
|
SpellCheckClient::SpellCheckScope::~SpellCheckScope() = default;
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -60,6 +60,7 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient,
|
||||||
v8::Local<v8::Function> spell_check_;
|
v8::Local<v8::Function> spell_check_;
|
||||||
|
|
||||||
explicit SpellCheckScope(const SpellCheckClient& client);
|
explicit SpellCheckScope(const SpellCheckClient& client);
|
||||||
|
~SpellCheckScope();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check the spelling of text.
|
// Check the spelling of text.
|
||||||
|
|
|
@ -57,6 +57,8 @@ AutofillAgent::AutofillAgent(content::RenderFrame* frame)
|
||||||
render_frame()->GetWebFrame()->SetAutofillClient(this);
|
render_frame()->GetWebFrame()->SetAutofillClient(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutofillAgent::~AutofillAgent() = default;
|
||||||
|
|
||||||
void AutofillAgent::OnDestruct() {
|
void AutofillAgent::OnDestruct() {
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ class AutofillAgent : public content::RenderFrameObserver,
|
||||||
public blink::WebAutofillClient {
|
public blink::WebAutofillClient {
|
||||||
public:
|
public:
|
||||||
explicit AutofillAgent(content::RenderFrame* frame);
|
explicit AutofillAgent(content::RenderFrame* frame);
|
||||||
|
~AutofillAgent() override;
|
||||||
|
|
||||||
// content::RenderFrameObserver:
|
// content::RenderFrameObserver:
|
||||||
void OnDestruct() override;
|
void OnDestruct() override;
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
|
NotificationOptions::NotificationOptions() = default;
|
||||||
|
NotificationOptions::~NotificationOptions() = default;
|
||||||
|
|
||||||
Notification::Notification(NotificationDelegate* delegate,
|
Notification::Notification(NotificationDelegate* delegate,
|
||||||
NotificationPresenter* presenter)
|
NotificationPresenter* presenter)
|
||||||
: delegate_(delegate), presenter_(presenter), weak_factory_(this) {}
|
: delegate_(delegate), presenter_(presenter), weak_factory_(this) {}
|
||||||
|
|
|
@ -36,6 +36,9 @@ struct NotificationOptions {
|
||||||
base::string16 sound;
|
base::string16 sound;
|
||||||
std::vector<NotificationAction> actions;
|
std::vector<NotificationAction> actions;
|
||||||
base::string16 close_button_text;
|
base::string16 close_button_text;
|
||||||
|
|
||||||
|
NotificationOptions();
|
||||||
|
~NotificationOptions();
|
||||||
};
|
};
|
||||||
|
|
||||||
class Notification {
|
class Notification {
|
||||||
|
|
|
@ -11,8 +11,10 @@ TtsUtteranceRequest::~TtsUtteranceRequest() {}
|
||||||
|
|
||||||
TtsVoice::TtsVoice() : local_service(true), is_default(false) {}
|
TtsVoice::TtsVoice() : local_service(true), is_default(false) {}
|
||||||
|
|
||||||
|
TtsVoice::TtsVoice(const TtsVoice&) = default;
|
||||||
|
|
||||||
TtsVoice::~TtsVoice() {}
|
TtsVoice::~TtsVoice() {}
|
||||||
|
|
||||||
TtsUtteranceResponse::TtsUtteranceResponse() : id(0) {}
|
TtsUtteranceResponse::TtsUtteranceResponse() : id(0) {}
|
||||||
|
|
||||||
TtsUtteranceResponse::~TtsUtteranceResponse() {}
|
TtsUtteranceResponse::~TtsUtteranceResponse() {}
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct TtsUtteranceRequest {
|
||||||
|
|
||||||
struct TtsVoice {
|
struct TtsVoice {
|
||||||
TtsVoice();
|
TtsVoice();
|
||||||
|
TtsVoice(const TtsVoice&);
|
||||||
~TtsVoice();
|
~TtsVoice();
|
||||||
|
|
||||||
std::string voice_uri;
|
std::string voice_uri;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue