From f1587da4806458734ae634f69d56fa0db7453834 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 17 Apr 2018 16:37:22 -0700 Subject: [PATCH] [chromium-style] out-of-line default constructors and destructors --- atom/browser/api/atom_api_app.cc | 10 ++++++++++ atom/browser/api/atom_api_app.h | 7 ++----- atom/browser/api/atom_api_menu_mac.h | 1 + atom/browser/api/atom_api_menu_mac.mm | 2 ++ atom/browser/api/atom_api_menu_views.cc | 2 ++ atom/browser/api/atom_api_menu_views.h | 1 + atom/browser/api/frame_subscriber.cc | 2 ++ atom/browser/api/frame_subscriber.h | 1 + atom/browser/atom_javascript_dialog_manager.cc | 1 + atom/browser/atom_javascript_dialog_manager.h | 1 + atom/browser/bridge_task_runner.cc | 3 +++ atom/browser/bridge_task_runner.h | 4 ++-- atom/browser/browser.cc | 5 +++++ atom/browser/browser.h | 4 ++++ atom/browser/javascript_environment.cc | 2 ++ atom/browser/javascript_environment.h | 1 + atom/browser/mac/in_app_purchase_observer.h | 4 ++++ atom/browser/mac/in_app_purchase_observer.mm | 4 ++++ atom/browser/mac/in_app_purchase_product.h | 4 ++++ atom/browser/mac/in_app_purchase_product.mm | 4 ++++ atom/browser/native_window.cc | 5 +++++ atom/browser/native_window.h | 4 ++-- atom/browser/net/atom_cert_verifier.cc | 4 ++++ atom/browser/net/atom_cert_verifier.h | 4 ++++ atom/browser/net/atom_network_delegate.cc | 12 ++++++++++++ atom/browser/net/atom_network_delegate.h | 8 ++++++++ atom/browser/net/url_request_buffer_job.cc | 2 ++ atom/browser/net/url_request_buffer_job.h | 1 + atom/browser/net/url_request_fetch_job.cc | 2 ++ atom/browser/net/url_request_fetch_job.h | 1 + atom/browser/net/url_request_stream_job.cc | 2 ++ atom/browser/net/url_request_stream_job.h | 1 + atom/browser/net/url_request_string_job.cc | 2 ++ atom/browser/net/url_request_string_job.h | 1 + atom/browser/ui/file_dialog.h | 3 +++ atom/browser/ui/file_dialog_gtk.cc | 3 +++ atom/browser/ui/file_dialog_mac.mm | 3 +++ atom/browser/ui/file_dialog_win.cc | 3 +++ atom/browser/web_view_guest_delegate.cc | 3 +++ atom/browser/web_view_guest_delegate.h | 4 ++-- atom/renderer/api/atom_api_spell_check_client.cc | 2 ++ atom/renderer/api/atom_api_spell_check_client.h | 1 + atom/renderer/atom_autofill_agent.cc | 2 ++ atom/renderer/atom_autofill_agent.h | 1 + brightray/browser/notification.cc | 3 +++ brightray/browser/notification.h | 3 +++ chromium_src/chrome/common/tts_utterance_request.cc | 4 +++- chromium_src/chrome/common/tts_utterance_request.h | 1 + 48 files changed, 136 insertions(+), 12 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index cd8aff64e279..98fd5ba643bc 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -349,6 +349,16 @@ struct Converter { namespace atom { +ProcessMetric::ProcessMetric(int type, + base::ProcessId pid, + std::unique_ptr metrics) { + this->type = type; + this->pid = pid; + this->metrics = std::move(metrics); +} + +ProcessMetric::~ProcessMetric() = default; + namespace api { namespace { diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 6c62152401c5..ac7c256928d6 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -52,11 +52,8 @@ struct ProcessMetric { ProcessMetric(int type, base::ProcessId pid, - std::unique_ptr metrics) { - this->type = type; - this->pid = pid; - this->metrics = std::move(metrics); - } + std::unique_ptr metrics); + ~ProcessMetric(); }; namespace api { diff --git a/atom/browser/api/atom_api_menu_mac.h b/atom/browser/api/atom_api_menu_mac.h index fb575cfcbaec..6ba895676c54 100644 --- a/atom/browser/api/atom_api_menu_mac.h +++ b/atom/browser/api/atom_api_menu_mac.h @@ -21,6 +21,7 @@ namespace api { class MenuMac : public Menu { protected: MenuMac(v8::Isolate* isolate, v8::Local wrapper); + ~MenuMac() override; void PopupAt(TopLevelWindow* window, int x, diff --git a/atom/browser/api/atom_api_menu_mac.mm b/atom/browser/api/atom_api_menu_mac.mm index fe077e347608..6e7c891da176 100644 --- a/atom/browser/api/atom_api_menu_mac.mm +++ b/atom/browser/api/atom_api_menu_mac.mm @@ -25,6 +25,8 @@ MenuMac::MenuMac(v8::Isolate* isolate, v8::Local wrapper) weak_factory_(this) { } +MenuMac::~MenuMac() = default; + void MenuMac::PopupAt(TopLevelWindow* window, int x, int y, int positioning_item, const base::Closure& callback) { diff --git a/atom/browser/api/atom_api_menu_views.cc b/atom/browser/api/atom_api_menu_views.cc index 1060964a297b..677279fa676f 100644 --- a/atom/browser/api/atom_api_menu_views.cc +++ b/atom/browser/api/atom_api_menu_views.cc @@ -17,6 +17,8 @@ namespace api { MenuViews::MenuViews(v8::Isolate* isolate, v8::Local wrapper) : Menu(isolate, wrapper), weak_factory_(this) {} +MenuViews::~MenuViews() = default; + void MenuViews::PopupAt(TopLevelWindow* window, int x, int y, diff --git a/atom/browser/api/atom_api_menu_views.h b/atom/browser/api/atom_api_menu_views.h index e5b93a3cfa0b..0a34c19cef31 100644 --- a/atom/browser/api/atom_api_menu_views.h +++ b/atom/browser/api/atom_api_menu_views.h @@ -19,6 +19,7 @@ namespace api { class MenuViews : public Menu { public: MenuViews(v8::Isolate* isolate, v8::Local wrapper); + ~MenuViews() override; protected: void PopupAt(TopLevelWindow* window, diff --git a/atom/browser/api/frame_subscriber.cc b/atom/browser/api/frame_subscriber.cc index 0244cc220e1a..8c2ce34a8a05 100644 --- a/atom/browser/api/frame_subscriber.cc +++ b/atom/browser/api/frame_subscriber.cc @@ -27,6 +27,8 @@ FrameSubscriber::FrameSubscriber(v8::Isolate* isolate, source_id_for_copy_request_(base::UnguessableToken::Create()), weak_factory_(this) {} +FrameSubscriber::~FrameSubscriber() = default; + bool FrameSubscriber::ShouldCaptureFrame( const gfx::Rect& dirty_rect, base::TimeTicks present_time, diff --git a/atom/browser/api/frame_subscriber.h b/atom/browser/api/frame_subscriber.h index 3761f144d04b..4dbef58d9f0b 100644 --- a/atom/browser/api/frame_subscriber.h +++ b/atom/browser/api/frame_subscriber.h @@ -27,6 +27,7 @@ class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber { content::RenderWidgetHostView* view, const FrameCaptureCallback& callback, bool only_dirty); + ~FrameSubscriber() override; bool ShouldCaptureFrame(const gfx::Rect& damage_rect, base::TimeTicks present_time, diff --git a/atom/browser/atom_javascript_dialog_manager.cc b/atom/browser/atom_javascript_dialog_manager.cc index ea3869ae9e6c..fcbf6ea75e53 100644 --- a/atom/browser/atom_javascript_dialog_manager.cc +++ b/atom/browser/atom_javascript_dialog_manager.cc @@ -28,6 +28,7 @@ constexpr int kUserWantsNoMoreDialogs = -1; AtomJavaScriptDialogManager::AtomJavaScriptDialogManager( api::WebContents* api_web_contents) : api_web_contents_(api_web_contents) {} +AtomJavaScriptDialogManager::~AtomJavaScriptDialogManager() = default; void AtomJavaScriptDialogManager::RunJavaScriptDialog( content::WebContents* web_contents, diff --git a/atom/browser/atom_javascript_dialog_manager.h b/atom/browser/atom_javascript_dialog_manager.h index 68e6fd150ab9..e3562eedfc69 100644 --- a/atom/browser/atom_javascript_dialog_manager.h +++ b/atom/browser/atom_javascript_dialog_manager.h @@ -19,6 +19,7 @@ class WebContents; class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager { public: explicit AtomJavaScriptDialogManager(api::WebContents* api_web_contents); + ~AtomJavaScriptDialogManager() override; // content::JavaScriptDialogManager implementations. void RunJavaScriptDialog(content::WebContents* web_contents, diff --git a/atom/browser/bridge_task_runner.cc b/atom/browser/bridge_task_runner.cc index 1efde26510c0..c0b3cd750d9d 100644 --- a/atom/browser/bridge_task_runner.cc +++ b/atom/browser/bridge_task_runner.cc @@ -8,6 +8,9 @@ namespace atom { +BridgeTaskRunner::BridgeTaskRunner() = default; +BridgeTaskRunner::~BridgeTaskRunner() = default; + void BridgeTaskRunner::MessageLoopIsReady() { auto* message_loop = base::MessageLoop::current(); CHECK(message_loop); diff --git a/atom/browser/bridge_task_runner.h b/atom/browser/bridge_task_runner.h index 856491fd79c9..7c3049b3f8c2 100644 --- a/atom/browser/bridge_task_runner.h +++ b/atom/browser/bridge_task_runner.h @@ -18,7 +18,7 @@ namespace atom { // otherwise delay the work until message loop is ready. class BridgeTaskRunner : public base::SingleThreadTaskRunner { public: - BridgeTaskRunner() {} + BridgeTaskRunner(); // Called when message loop is ready. void MessageLoopIsReady(); @@ -35,7 +35,7 @@ class BridgeTaskRunner : public base::SingleThreadTaskRunner { private: using TaskPair = std::tuple; - ~BridgeTaskRunner() override {} + ~BridgeTaskRunner() override; std::vector tasks_; std::vector non_nestable_tasks_; diff --git a/atom/browser/browser.cc b/atom/browser/browser.cc index 3ba915f91eb3..56ebc638d38b 100644 --- a/atom/browser/browser.cc +++ b/atom/browser/browser.cc @@ -21,6 +21,11 @@ namespace atom { +Browser::LoginItemSettings::LoginItemSettings() = default; +Browser::LoginItemSettings::~LoginItemSettings() = default; +Browser::LoginItemSettings::LoginItemSettings( + const LoginItemSettings& other) = default; + Browser::Browser() : is_quiting_(false), is_exiting_(false), diff --git a/atom/browser/browser.h b/atom/browser/browser.h index 91c0e82f7c25..87774c5bd91c 100644 --- a/atom/browser/browser.h +++ b/atom/browser/browser.h @@ -100,6 +100,10 @@ class Browser : public WindowListObserver { bool opened_as_hidden = false; base::string16 path; std::vector args; + + LoginItemSettings(); + ~LoginItemSettings(); + LoginItemSettings(const LoginItemSettings&); }; void SetLoginItemSettings(LoginItemSettings settings); LoginItemSettings GetLoginItemSettings(const LoginItemSettings& options); diff --git a/atom/browser/javascript_environment.cc b/atom/browser/javascript_environment.cc index 54cc04f21bbd..c158759e2de8 100644 --- a/atom/browser/javascript_environment.cc +++ b/atom/browser/javascript_environment.cc @@ -29,6 +29,8 @@ JavascriptEnvironment::JavascriptEnvironment() context_(isolate_, v8::Context::New(isolate_)), context_scope_(v8::Local::New(isolate_, context_)) {} +JavascriptEnvironment::~JavascriptEnvironment() = default; + void JavascriptEnvironment::OnMessageLoopCreated() { isolate_holder_.AddRunMicrotasksObserver(); } diff --git a/atom/browser/javascript_environment.h b/atom/browser/javascript_environment.h index 09b22ebb838c..bf05b687f8b3 100644 --- a/atom/browser/javascript_environment.h +++ b/atom/browser/javascript_environment.h @@ -19,6 +19,7 @@ namespace atom { class JavascriptEnvironment { public: JavascriptEnvironment(); + ~JavascriptEnvironment(); void OnMessageLoopCreated(); void OnMessageLoopDestroying(); diff --git a/atom/browser/mac/in_app_purchase_observer.h b/atom/browser/mac/in_app_purchase_observer.h index 351db2008ef6..845898d17a05 100644 --- a/atom/browser/mac/in_app_purchase_observer.h +++ b/atom/browser/mac/in_app_purchase_observer.h @@ -34,6 +34,10 @@ struct Transaction { std::string errorMessage = ""; std::string transactionState = ""; Payment payment; + + Transaction(); + Transaction(const Transaction&); + ~Transaction(); }; // --------------------------- Classes --------------------------- diff --git a/atom/browser/mac/in_app_purchase_observer.mm b/atom/browser/mac/in_app_purchase_observer.mm index dffaf7d23623..bcce296b1ca2 100644 --- a/atom/browser/mac/in_app_purchase_observer.mm +++ b/atom/browser/mac/in_app_purchase_observer.mm @@ -174,6 +174,10 @@ using InAppTransactionCallback = base::RepeatingCallback& productIDs, const InAppPurchaseProductsCallback& callback) { auto* iapProduct = [[InAppPurchaseProduct alloc] initWithCallback:callback]; diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index e3568007ca66..bbffdac05c98 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -505,4 +505,9 @@ void NativeWindow::NotifyWindowMessage(UINT message, } #endif +NativeWindowRelay::NativeWindowRelay(base::WeakPtr window) + : key(UserDataKey()), window(window) {} + +NativeWindowRelay::~NativeWindowRelay() = default; + } // namespace atom diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index f8729a7be5a0..6e017995808f 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -323,8 +323,8 @@ class NativeWindow : public base::SupportsUserData { class NativeWindowRelay : public content::WebContentsUserData { public: - explicit NativeWindowRelay(base::WeakPtr window) - : key(UserDataKey()), window(window) {} + explicit NativeWindowRelay(base::WeakPtr window); + ~NativeWindowRelay() override; static void* UserDataKey() { return content::WebContentsUserData::UserDataKey(); diff --git a/atom/browser/net/atom_cert_verifier.cc b/atom/browser/net/atom_cert_verifier.cc index d2f3c15760d2..014cac0c4dcd 100644 --- a/atom/browser/net/atom_cert_verifier.cc +++ b/atom/browser/net/atom_cert_verifier.cc @@ -19,6 +19,10 @@ using content::BrowserThread; namespace atom { +VerifyRequestParams::VerifyRequestParams() = default; +VerifyRequestParams::~VerifyRequestParams() = default; +VerifyRequestParams::VerifyRequestParams(const VerifyRequestParams&) = default; + namespace { class Response : public base::LinkNode { diff --git a/atom/browser/net/atom_cert_verifier.h b/atom/browser/net/atom_cert_verifier.h index e8d9f2745c59..458615f3ed43 100644 --- a/atom/browser/net/atom_cert_verifier.h +++ b/atom/browser/net/atom_cert_verifier.h @@ -26,6 +26,10 @@ struct VerifyRequestParams { std::string default_result; int error_code; scoped_refptr certificate; + + VerifyRequestParams(); + VerifyRequestParams(const VerifyRequestParams&); + ~VerifyRequestParams(); }; class AtomCertVerifier : public net::CertVerifier { diff --git a/atom/browser/net/atom_network_delegate.cc b/atom/browser/net/atom_network_delegate.cc index e48c47f7f38a..f5225f25e0fa 100644 --- a/atom/browser/net/atom_network_delegate.cc +++ b/atom/browser/net/atom_network_delegate.cc @@ -217,6 +217,18 @@ void ReadFromResponseObject(const base::DictionaryValue& response, } // 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() {} diff --git a/atom/browser/net/atom_network_delegate.h b/atom/browser/net/atom_network_delegate.h index 8c6de3d4fe6d..1ee8d19dc900 100644 --- a/atom/browser/net/atom_network_delegate.h +++ b/atom/browser/net/atom_network_delegate.h @@ -51,11 +51,19 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate { struct SimpleListenerInfo { URLPatterns url_patterns; SimpleListener listener; + + SimpleListenerInfo(URLPatterns, SimpleListener); + SimpleListenerInfo(); + ~SimpleListenerInfo(); }; struct ResponseListenerInfo { URLPatterns url_patterns; ResponseListener listener; + + ResponseListenerInfo(URLPatterns, ResponseListener); + ResponseListenerInfo(); + ~ResponseListenerInfo(); }; AtomNetworkDelegate(); diff --git a/atom/browser/net/url_request_buffer_job.cc b/atom/browser/net/url_request_buffer_job.cc index c244ca464fd1..18fd4e5e822c 100644 --- a/atom/browser/net/url_request_buffer_job.cc +++ b/atom/browser/net/url_request_buffer_job.cc @@ -31,6 +31,8 @@ URLRequestBufferJob::URLRequestBufferJob(net::URLRequest* request, : JsAsker(request, network_delegate), status_code_(net::HTTP_NOT_IMPLEMENTED) {} +URLRequestBufferJob::~URLRequestBufferJob() = default; + void URLRequestBufferJob::StartAsync(std::unique_ptr options) { const base::Value* binary = nullptr; if (options->IsType(base::Value::Type::DICTIONARY)) { diff --git a/atom/browser/net/url_request_buffer_job.h b/atom/browser/net/url_request_buffer_job.h index 356ca9347f6f..a9f72e0b2b28 100644 --- a/atom/browser/net/url_request_buffer_job.h +++ b/atom/browser/net/url_request_buffer_job.h @@ -17,6 +17,7 @@ namespace atom { class URLRequestBufferJob : public JsAsker { public: URLRequestBufferJob(net::URLRequest*, net::NetworkDelegate*); + ~URLRequestBufferJob() override; // JsAsker: void StartAsync(std::unique_ptr options) override; diff --git a/atom/browser/net/url_request_fetch_job.cc b/atom/browser/net/url_request_fetch_job.cc index fd563dcdf500..7c8583526429 100644 --- a/atom/browser/net/url_request_fetch_job.cc +++ b/atom/browser/net/url_request_fetch_job.cc @@ -83,6 +83,8 @@ URLRequestFetchJob::URLRequestFetchJob(net::URLRequest* request, pending_buffer_size_(0), write_num_bytes_(0) {} +URLRequestFetchJob::~URLRequestFetchJob() = default; + void URLRequestFetchJob::BeforeStartInUI(v8::Isolate* isolate, v8::Local value) { mate::Dictionary options; diff --git a/atom/browser/net/url_request_fetch_job.h b/atom/browser/net/url_request_fetch_job.h index d073f896d1e8..2498c54882a4 100644 --- a/atom/browser/net/url_request_fetch_job.h +++ b/atom/browser/net/url_request_fetch_job.h @@ -20,6 +20,7 @@ class URLRequestFetchJob : public JsAsker, public brightray::URLRequestContextGetter::Delegate { public: URLRequestFetchJob(net::URLRequest*, net::NetworkDelegate*); + ~URLRequestFetchJob() override; // Called by response writer. void HeadersCompleted(); diff --git a/atom/browser/net/url_request_stream_job.cc b/atom/browser/net/url_request_stream_job.cc index 9fdc4507b905..1417337295db 100644 --- a/atom/browser/net/url_request_stream_job.cc +++ b/atom/browser/net/url_request_stream_job.cc @@ -28,6 +28,8 @@ URLRequestStreamJob::URLRequestStreamJob(net::URLRequest* request, response_headers_(nullptr), weak_factory_(this) {} +URLRequestStreamJob::~URLRequestStreamJob() = default; + void URLRequestStreamJob::BeforeStartInUI(v8::Isolate* isolate, v8::Local value) { if (value->IsNull() || value->IsUndefined() || !value->IsObject()) { diff --git a/atom/browser/net/url_request_stream_job.h b/atom/browser/net/url_request_stream_job.h index 372cad7e2d5f..4043b09aea37 100644 --- a/atom/browser/net/url_request_stream_job.h +++ b/atom/browser/net/url_request_stream_job.h @@ -23,6 +23,7 @@ class URLRequestStreamJob : public JsAsker { public: URLRequestStreamJob(net::URLRequest* request, net::NetworkDelegate* network_delegate); + ~URLRequestStreamJob() override; void OnData(mate::Arguments* args); void OnEnd(mate::Arguments* args); diff --git a/atom/browser/net/url_request_string_job.cc b/atom/browser/net/url_request_string_job.cc index 1a08752e335c..82d76d2854a2 100644 --- a/atom/browser/net/url_request_string_job.cc +++ b/atom/browser/net/url_request_string_job.cc @@ -15,6 +15,8 @@ URLRequestStringJob::URLRequestStringJob(net::URLRequest* request, net::NetworkDelegate* network_delegate) : JsAsker(request, network_delegate) {} +URLRequestStringJob::~URLRequestStringJob() = default; + void URLRequestStringJob::StartAsync(std::unique_ptr options) { if (options->IsType(base::Value::Type::DICTIONARY)) { base::DictionaryValue* dict = diff --git a/atom/browser/net/url_request_string_job.h b/atom/browser/net/url_request_string_job.h index 474473cca87d..841deb254d8f 100644 --- a/atom/browser/net/url_request_string_job.h +++ b/atom/browser/net/url_request_string_job.h @@ -15,6 +15,7 @@ namespace atom { class URLRequestStringJob : public JsAsker { public: URLRequestStringJob(net::URLRequest*, net::NetworkDelegate*); + ~URLRequestStringJob() override; // JsAsker: void StartAsync(std::unique_ptr options) override; diff --git a/atom/browser/ui/file_dialog.h b/atom/browser/ui/file_dialog.h index f9d9b9684985..efa50062bb82 100644 --- a/atom/browser/ui/file_dialog.h +++ b/atom/browser/ui/file_dialog.h @@ -64,6 +64,9 @@ struct DialogSettings { bool shows_tag_field = true; bool force_detached = false; bool security_scoped_bookmarks = false; + + DialogSettings(); + ~DialogSettings(); }; bool ShowOpenDialog(const DialogSettings& settings, diff --git a/atom/browser/ui/file_dialog_gtk.cc b/atom/browser/ui/file_dialog_gtk.cc index 918e02f2d9ff..c6bb5cc1cc04 100644 --- a/atom/browser/ui/file_dialog_gtk.cc +++ b/atom/browser/ui/file_dialog_gtk.cc @@ -17,6 +17,9 @@ namespace file_dialog { +DialogSettings::DialogSettings() = default; +DialogSettings::~DialogSettings() = default; + namespace { // Makes sure that .jpg also shows .JPG. diff --git a/atom/browser/ui/file_dialog_mac.mm b/atom/browser/ui/file_dialog_mac.mm index 89ecaf46ec7f..c412864aec35 100644 --- a/atom/browser/ui/file_dialog_mac.mm +++ b/atom/browser/ui/file_dialog_mac.mm @@ -69,6 +69,9 @@ namespace file_dialog { +DialogSettings::DialogSettings() = default; +DialogSettings::~DialogSettings() = default; + namespace { void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) { diff --git a/atom/browser/ui/file_dialog_win.cc b/atom/browser/ui/file_dialog_win.cc index 973e22bdb4af..cd08d038fbd4 100644 --- a/atom/browser/ui/file_dialog_win.cc +++ b/atom/browser/ui/file_dialog_win.cc @@ -25,6 +25,9 @@ namespace file_dialog { +DialogSettings::DialogSettings() = default; +DialogSettings::~DialogSettings() = default; + namespace { // Distinguish directories from regular files. diff --git a/atom/browser/web_view_guest_delegate.cc b/atom/browser/web_view_guest_delegate.cc index c07d8f8c9c2e..8894c92fa32b 100644 --- a/atom/browser/web_view_guest_delegate.cc +++ b/atom/browser/web_view_guest_delegate.cc @@ -23,6 +23,9 @@ const int kDefaultHeight = 300; } // namespace +SetSizeParams::SetSizeParams() = default; +SetSizeParams::~SetSizeParams() = default; + WebViewGuestDelegate::WebViewGuestDelegate() : embedder_zoom_controller_(nullptr), guest_host_(nullptr), diff --git a/atom/browser/web_view_guest_delegate.h b/atom/browser/web_view_guest_delegate.h index 3425c055cc95..e9850076b074 100644 --- a/atom/browser/web_view_guest_delegate.h +++ b/atom/browser/web_view_guest_delegate.h @@ -22,8 +22,8 @@ class WebContents; // meaningful. This is because the normal size of the guestview is overridden // whenever autosizing occurs. struct SetSizeParams { - SetSizeParams() {} - ~SetSizeParams() {} + SetSizeParams(); + ~SetSizeParams(); std::unique_ptr enable_auto_size; std::unique_ptr min_size; diff --git a/atom/renderer/api/atom_api_spell_check_client.cc b/atom/renderer/api/atom_api_spell_check_client.cc index 1524fd797552..ddadc671ba76 100644 --- a/atom/renderer/api/atom_api_spell_check_client.cc +++ b/atom/renderer/api/atom_api_spell_check_client.cc @@ -237,6 +237,8 @@ SpellCheckClient::SpellCheckScope::SpellCheckScope( provider_(client.provider_.NewHandle()), spell_check_(client.spell_check_.NewHandle()) {} +SpellCheckClient::SpellCheckScope::~SpellCheckScope() = default; + } // namespace api } // namespace atom diff --git a/atom/renderer/api/atom_api_spell_check_client.h b/atom/renderer/api/atom_api_spell_check_client.h index 6d7876143e88..92f631d6bb64 100644 --- a/atom/renderer/api/atom_api_spell_check_client.h +++ b/atom/renderer/api/atom_api_spell_check_client.h @@ -60,6 +60,7 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, v8::Local spell_check_; explicit SpellCheckScope(const SpellCheckClient& client); + ~SpellCheckScope(); }; // Check the spelling of text. diff --git a/atom/renderer/atom_autofill_agent.cc b/atom/renderer/atom_autofill_agent.cc index 06d73068c7e3..9c7fe2645ed6 100644 --- a/atom/renderer/atom_autofill_agent.cc +++ b/atom/renderer/atom_autofill_agent.cc @@ -57,6 +57,8 @@ AutofillAgent::AutofillAgent(content::RenderFrame* frame) render_frame()->GetWebFrame()->SetAutofillClient(this); } +AutofillAgent::~AutofillAgent() = default; + void AutofillAgent::OnDestruct() { delete this; } diff --git a/atom/renderer/atom_autofill_agent.h b/atom/renderer/atom_autofill_agent.h index 5c82e37347d2..8994d8dfc97e 100644 --- a/atom/renderer/atom_autofill_agent.h +++ b/atom/renderer/atom_autofill_agent.h @@ -21,6 +21,7 @@ class AutofillAgent : public content::RenderFrameObserver, public blink::WebAutofillClient { public: explicit AutofillAgent(content::RenderFrame* frame); + ~AutofillAgent() override; // content::RenderFrameObserver: void OnDestruct() override; diff --git a/brightray/browser/notification.cc b/brightray/browser/notification.cc index eab24947847b..0d0fd5870a23 100644 --- a/brightray/browser/notification.cc +++ b/brightray/browser/notification.cc @@ -9,6 +9,9 @@ namespace brightray { +NotificationOptions::NotificationOptions() = default; +NotificationOptions::~NotificationOptions() = default; + Notification::Notification(NotificationDelegate* delegate, NotificationPresenter* presenter) : delegate_(delegate), presenter_(presenter), weak_factory_(this) {} diff --git a/brightray/browser/notification.h b/brightray/browser/notification.h index 1b81dda5a182..359495310d97 100644 --- a/brightray/browser/notification.h +++ b/brightray/browser/notification.h @@ -36,6 +36,9 @@ struct NotificationOptions { base::string16 sound; std::vector actions; base::string16 close_button_text; + + NotificationOptions(); + ~NotificationOptions(); }; class Notification { diff --git a/chromium_src/chrome/common/tts_utterance_request.cc b/chromium_src/chrome/common/tts_utterance_request.cc index 02a69f464383..66b783cfafd1 100644 --- a/chromium_src/chrome/common/tts_utterance_request.cc +++ b/chromium_src/chrome/common/tts_utterance_request.cc @@ -11,8 +11,10 @@ TtsUtteranceRequest::~TtsUtteranceRequest() {} TtsVoice::TtsVoice() : local_service(true), is_default(false) {} +TtsVoice::TtsVoice(const TtsVoice&) = default; + TtsVoice::~TtsVoice() {} TtsUtteranceResponse::TtsUtteranceResponse() : id(0) {} -TtsUtteranceResponse::~TtsUtteranceResponse() {} \ No newline at end of file +TtsUtteranceResponse::~TtsUtteranceResponse() {} diff --git a/chromium_src/chrome/common/tts_utterance_request.h b/chromium_src/chrome/common/tts_utterance_request.h index a4b4cab68ca3..8523482ba89d 100644 --- a/chromium_src/chrome/common/tts_utterance_request.h +++ b/chromium_src/chrome/common/tts_utterance_request.h @@ -25,6 +25,7 @@ struct TtsUtteranceRequest { struct TtsVoice { TtsVoice(); + TtsVoice(const TtsVoice&); ~TtsVoice(); std::string voice_uri;