chore: use =default for default constructors/destructors (#29511)
This commit is contained in:
parent
b1d1ac6524
commit
81c5da5221
44 changed files with 68 additions and 61 deletions
|
@ -105,9 +105,9 @@ const char* InAppPurchase::GetTypeName() {
|
|||
return "InAppPurchase";
|
||||
}
|
||||
|
||||
InAppPurchase::InAppPurchase() {}
|
||||
InAppPurchase::InAppPurchase() = default;
|
||||
|
||||
InAppPurchase::~InAppPurchase() {}
|
||||
InAppPurchase::~InAppPurchase() = default;
|
||||
|
||||
v8::Local<v8::Promise> InAppPurchase::PurchaseProduct(
|
||||
const std::string& product_id,
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace gin_helper {
|
|||
|
||||
gin::WrapperInfo Event::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Event::Event() {}
|
||||
Event::Event() = default;
|
||||
|
||||
Event::~Event() {
|
||||
if (callback_) {
|
||||
|
|
|
@ -18,7 +18,7 @@ ImageView::ImageView() : View(new views::ImageView()) {
|
|||
view()->set_owned_by_client();
|
||||
}
|
||||
|
||||
ImageView::~ImageView() {}
|
||||
ImageView::~ImageView() = default;
|
||||
|
||||
void ImageView::SetImage(const gfx::Image& image) {
|
||||
image_view()->SetImage(image.AsImageSkia());
|
||||
|
|
|
@ -31,7 +31,7 @@ BadgeManagerFactory::BadgeManagerFactory()
|
|||
"BadgeManager",
|
||||
BrowserContextDependencyManager::GetInstance()) {}
|
||||
|
||||
BadgeManagerFactory::~BadgeManagerFactory() {}
|
||||
BadgeManagerFactory::~BadgeManagerFactory() = default;
|
||||
|
||||
KeyedService* BadgeManagerFactory::BuildServiceInstanceFor(
|
||||
content::BrowserContext* context) const {
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace electron {
|
|||
ChildWebContentsTracker::ChildWebContentsTracker(
|
||||
content::WebContents* web_contents) {}
|
||||
|
||||
ChildWebContentsTracker::~ChildWebContentsTracker() {}
|
||||
ChildWebContentsTracker::~ChildWebContentsTracker() = default;
|
||||
|
||||
WEB_CONTENTS_USER_DATA_KEY_IMPL(ChildWebContentsTracker)
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ constexpr int kUserWantsNoMoreDialogs = -1;
|
|||
|
||||
} // namespace
|
||||
|
||||
ElectronJavaScriptDialogManager::ElectronJavaScriptDialogManager() {}
|
||||
ElectronJavaScriptDialogManager::ElectronJavaScriptDialogManager() = default;
|
||||
ElectronJavaScriptDialogManager::~ElectronJavaScriptDialogManager() = default;
|
||||
|
||||
void ElectronJavaScriptDialogManager::RunJavaScriptDialog(
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
#include "shell/browser/electron_pdf_web_contents_helper_client.h"
|
||||
|
||||
ElectronPDFWebContentsHelperClient::ElectronPDFWebContentsHelperClient() {}
|
||||
ElectronPDFWebContentsHelperClient::ElectronPDFWebContentsHelperClient() =
|
||||
default;
|
||||
ElectronPDFWebContentsHelperClient::~ElectronPDFWebContentsHelperClient() =
|
||||
default;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class ManagementSetEnabledFunctionInstallPromptDelegate
|
|||
base::OnceCallback<void(bool)> callback) {
|
||||
// TODO(sentialx): emit event
|
||||
}
|
||||
~ManagementSetEnabledFunctionInstallPromptDelegate() override {}
|
||||
~ManagementSetEnabledFunctionInstallPromptDelegate() override = default;
|
||||
|
||||
private:
|
||||
base::WeakPtrFactory<ManagementSetEnabledFunctionInstallPromptDelegate>
|
||||
|
@ -61,7 +61,7 @@ class ManagementUninstallFunctionUninstallDialogDelegate
|
|||
// TODO(sentialx): emit event
|
||||
}
|
||||
|
||||
~ManagementUninstallFunctionUninstallDialogDelegate() override {}
|
||||
~ManagementUninstallFunctionUninstallDialogDelegate() override = default;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ManagementUninstallFunctionUninstallDialogDelegate);
|
||||
|
@ -69,9 +69,9 @@ class ManagementUninstallFunctionUninstallDialogDelegate
|
|||
|
||||
} // namespace
|
||||
|
||||
ElectronManagementAPIDelegate::ElectronManagementAPIDelegate() {}
|
||||
ElectronManagementAPIDelegate::ElectronManagementAPIDelegate() = default;
|
||||
|
||||
ElectronManagementAPIDelegate::~ElectronManagementAPIDelegate() {}
|
||||
ElectronManagementAPIDelegate::~ElectronManagementAPIDelegate() = default;
|
||||
|
||||
void ElectronManagementAPIDelegate::LaunchAppFunctionDelegate(
|
||||
const extensions::Extension* extension,
|
||||
|
|
|
@ -79,9 +79,11 @@ void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
|
|||
|
||||
namespace get_strings = api::resources_private::GetStrings;
|
||||
|
||||
ResourcesPrivateGetStringsFunction::ResourcesPrivateGetStringsFunction() {}
|
||||
ResourcesPrivateGetStringsFunction::ResourcesPrivateGetStringsFunction() =
|
||||
default;
|
||||
|
||||
ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() {}
|
||||
ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() =
|
||||
default;
|
||||
|
||||
ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
|
||||
std::unique_ptr<get_strings::Params> params(
|
||||
|
|
|
@ -57,7 +57,7 @@ void ZoomModeToZoomSettings(WebContentsZoomController::ZoomMode zoom_mode,
|
|||
|
||||
ExecuteCodeInTabFunction::ExecuteCodeInTabFunction() : execute_tab_id_(-1) {}
|
||||
|
||||
ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {}
|
||||
ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() = default;
|
||||
|
||||
ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
|
||||
if (init_result_)
|
||||
|
|
|
@ -47,7 +47,7 @@ ElectronComponentExtensionResourceManager::
|
|||
}
|
||||
|
||||
ElectronComponentExtensionResourceManager::
|
||||
~ElectronComponentExtensionResourceManager() {}
|
||||
~ElectronComponentExtensionResourceManager() = default;
|
||||
|
||||
bool ElectronComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
const base::FilePath& extension_path,
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
namespace extensions {
|
||||
|
||||
ElectronExtensionHostDelegate::ElectronExtensionHostDelegate() {}
|
||||
ElectronExtensionHostDelegate::ElectronExtensionHostDelegate() = default;
|
||||
|
||||
ElectronExtensionHostDelegate::~ElectronExtensionHostDelegate() {}
|
||||
ElectronExtensionHostDelegate::~ElectronExtensionHostDelegate() = default;
|
||||
|
||||
void ElectronExtensionHostDelegate::OnExtensionHostCreated(
|
||||
content::WebContents* web_contents) {
|
||||
|
|
|
@ -31,7 +31,7 @@ ElectronExtensionSystemFactory::ElectronExtensionSystemFactory()
|
|||
DependsOn(ExtensionRegistryFactory::GetInstance());
|
||||
}
|
||||
|
||||
ElectronExtensionSystemFactory::~ElectronExtensionSystemFactory() {}
|
||||
ElectronExtensionSystemFactory::~ElectronExtensionSystemFactory() = default;
|
||||
|
||||
KeyedService* ElectronExtensionSystemFactory::BuildServiceInstanceFor(
|
||||
BrowserContext* context) const {
|
||||
|
|
|
@ -10,7 +10,8 @@ ElectronExtensionWebContentsObserver::ElectronExtensionWebContentsObserver(
|
|||
content::WebContents* web_contents)
|
||||
: ExtensionWebContentsObserver(web_contents) {}
|
||||
|
||||
ElectronExtensionWebContentsObserver::~ElectronExtensionWebContentsObserver() {}
|
||||
ElectronExtensionWebContentsObserver::~ElectronExtensionWebContentsObserver() =
|
||||
default;
|
||||
|
||||
void ElectronExtensionWebContentsObserver::CreateForWebContents(
|
||||
content::WebContents* web_contents) {
|
||||
|
|
|
@ -51,8 +51,8 @@ class ElectronGuestViewManagerDelegate
|
|||
class ElectronMimeHandlerViewGuestDelegate
|
||||
: public MimeHandlerViewGuestDelegate {
|
||||
public:
|
||||
ElectronMimeHandlerViewGuestDelegate() {}
|
||||
~ElectronMimeHandlerViewGuestDelegate() override {}
|
||||
ElectronMimeHandlerViewGuestDelegate() = default;
|
||||
~ElectronMimeHandlerViewGuestDelegate() override = default;
|
||||
|
||||
// MimeHandlerViewGuestDelegate.
|
||||
bool HandleContextMenu(content::WebContents* web_contents,
|
||||
|
|
|
@ -72,7 +72,7 @@ ElectronExtensionsBrowserClient::ElectronExtensionsBrowserClient()
|
|||
std::make_unique<extensions::ElectronExtensionsBrowserAPIProvider>());
|
||||
}
|
||||
|
||||
ElectronExtensionsBrowserClient::~ElectronExtensionsBrowserClient() {}
|
||||
ElectronExtensionsBrowserClient::~ElectronExtensionsBrowserClient() = default;
|
||||
|
||||
bool ElectronExtensionsBrowserClient::IsShuttingDown() {
|
||||
return electron::Browser::Get()->is_shutting_down();
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
ElectronKioskDelegate::ElectronKioskDelegate() {}
|
||||
ElectronKioskDelegate::ElectronKioskDelegate() = default;
|
||||
|
||||
ElectronKioskDelegate::~ElectronKioskDelegate() {}
|
||||
ElectronKioskDelegate::~ElectronKioskDelegate() = default;
|
||||
|
||||
bool ElectronKioskDelegate::IsAutoLaunchedKioskApp(
|
||||
const extensions::ExtensionId& id) const {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace extensions {
|
||||
|
||||
ElectronNavigationUIData::ElectronNavigationUIData() {}
|
||||
ElectronNavigationUIData::ElectronNavigationUIData() = default;
|
||||
|
||||
ElectronNavigationUIData::ElectronNavigationUIData(
|
||||
content::NavigationHandle* navigation_handle) {
|
||||
|
@ -20,7 +20,7 @@ ElectronNavigationUIData::ElectronNavigationUIData(
|
|||
extension_misc::kUnknownWindowId);
|
||||
}
|
||||
|
||||
ElectronNavigationUIData::~ElectronNavigationUIData() {}
|
||||
ElectronNavigationUIData::~ElectronNavigationUIData() = default;
|
||||
|
||||
std::unique_ptr<content::NavigationUIData> ElectronNavigationUIData::Clone() {
|
||||
std::unique_ptr<ElectronNavigationUIData> copy =
|
||||
|
|
|
@ -225,7 +225,7 @@ NativeBrowserViewMac::NativeBrowserViewMac(
|
|||
view.autoresizingMask = kDefaultAutoResizingMask;
|
||||
}
|
||||
|
||||
NativeBrowserViewMac::~NativeBrowserViewMac() {}
|
||||
NativeBrowserViewMac::~NativeBrowserViewMac() = default;
|
||||
|
||||
void NativeBrowserViewMac::SetAutoResizeFlags(uint8_t flags) {
|
||||
NSAutoresizingMaskOptions autoresizing_mask = kDefaultAutoResizingMask;
|
||||
|
|
|
@ -450,7 +450,7 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
|||
original_level_ = [window_ level];
|
||||
}
|
||||
|
||||
NativeWindowMac::~NativeWindowMac() {}
|
||||
NativeWindowMac::~NativeWindowMac() = default;
|
||||
|
||||
void NativeWindowMac::SetContentView(views::View* view) {
|
||||
views::View* root_view = GetContentsView();
|
||||
|
|
|
@ -83,7 +83,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
|
|||
void ResumeReadingBodyFromNet() override {}
|
||||
|
||||
private:
|
||||
AsarURLLoader() {}
|
||||
AsarURLLoader() = default;
|
||||
~AsarURLLoader() override = default;
|
||||
|
||||
void Start(const network::ResourceRequest& request,
|
||||
|
|
|
@ -63,9 +63,9 @@ NotificationPresenter* NotificationPresenter::Create() {
|
|||
return presenter.release();
|
||||
}
|
||||
|
||||
NotificationPresenterWin::NotificationPresenterWin() {}
|
||||
NotificationPresenterWin::NotificationPresenterWin() = default;
|
||||
|
||||
NotificationPresenterWin::~NotificationPresenterWin() {}
|
||||
NotificationPresenterWin::~NotificationPresenterWin() = default;
|
||||
|
||||
bool NotificationPresenterWin::Init() {
|
||||
base::ThreadRestrictions::ScopedAllowIO allow_io;
|
||||
|
|
|
@ -596,7 +596,7 @@ bool WindowsToastNotification::RemoveCallbacks(
|
|||
ToastEventHandler::ToastEventHandler(Notification* notification)
|
||||
: notification_(notification->GetWeakPtr()) {}
|
||||
|
||||
ToastEventHandler::~ToastEventHandler() {}
|
||||
ToastEventHandler::~ToastEventHandler() = default;
|
||||
|
||||
IFACEMETHODIMP ToastEventHandler::Invoke(
|
||||
ABI::Windows::UI::Notifications::IToastNotification* sender,
|
||||
|
|
|
@ -14,7 +14,7 @@ PrintViewManagerElectron::PrintViewManagerElectron(
|
|||
content::WebContents* web_contents)
|
||||
: PrintViewManagerBase(web_contents) {}
|
||||
|
||||
PrintViewManagerElectron::~PrintViewManagerElectron() {}
|
||||
PrintViewManagerElectron::~PrintViewManagerElectron() = default;
|
||||
|
||||
void PrintViewManagerElectron::SetupScriptedPrintPreview(
|
||||
SetupScriptedPrintPreviewCallback callback) {
|
||||
|
|
|
@ -16,7 +16,7 @@ ProtocolRegistry* ProtocolRegistry::FromBrowserContext(
|
|||
return static_cast<ElectronBrowserContext*>(context)->protocol_registry();
|
||||
}
|
||||
|
||||
ProtocolRegistry::ProtocolRegistry() {}
|
||||
ProtocolRegistry::ProtocolRegistry() = default;
|
||||
|
||||
ProtocolRegistry::~ProtocolRegistry() = default;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ SerialChooserContextFactory::SerialChooserContextFactory()
|
|||
"SerialChooserContext",
|
||||
BrowserContextDependencyManager::GetInstance()) {}
|
||||
|
||||
SerialChooserContextFactory::~SerialChooserContextFactory() {}
|
||||
SerialChooserContextFactory::~SerialChooserContextFactory() = default;
|
||||
|
||||
KeyedService* SerialChooserContextFactory::BuildServiceInstanceFor(
|
||||
content::BrowserContext* context) const {
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace electron {
|
|||
DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)
|
||||
: native_view_(native_view) {}
|
||||
|
||||
DelayedNativeViewHost::~DelayedNativeViewHost() {}
|
||||
DelayedNativeViewHost::~DelayedNativeViewHost() = default;
|
||||
|
||||
void DelayedNativeViewHost::ViewHierarchyChanged(
|
||||
const views::ViewHierarchyChangedDetails& details) {
|
||||
|
|
|
@ -16,7 +16,7 @@ ElectronNativeWidgetMac::ElectronNativeWidgetMac(
|
|||
shell_(shell),
|
||||
style_mask_(style_mask) {}
|
||||
|
||||
ElectronNativeWidgetMac::~ElectronNativeWidgetMac() {}
|
||||
ElectronNativeWidgetMac::~ElectronNativeWidgetMac() = default;
|
||||
|
||||
NativeWidgetMacNSWindow* ElectronNativeWidgetMac::CreateNSWindow(
|
||||
const remote_cocoa::mojom::CreateWindowParams* params) {
|
||||
|
|
|
@ -12,7 +12,7 @@ RootViewMac::RootViewMac(NativeWindow* window) : window_(window) {
|
|||
set_owned_by_client();
|
||||
}
|
||||
|
||||
RootViewMac::~RootViewMac() {}
|
||||
RootViewMac::~RootViewMac() = default;
|
||||
|
||||
void RootViewMac::Layout() {
|
||||
if (!window_->content_view()) // Not ready yet.
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
ViewsDelegateMac::ViewsDelegateMac() {}
|
||||
ViewsDelegateMac::ViewsDelegateMac() = default;
|
||||
|
||||
ViewsDelegateMac::~ViewsDelegateMac() {}
|
||||
ViewsDelegateMac::~ViewsDelegateMac() = default;
|
||||
|
||||
void ViewsDelegateMac::OnBeforeWidgetInit(
|
||||
views::Widget::InitParams* params,
|
||||
|
|
|
@ -13,9 +13,9 @@ namespace electron {
|
|||
|
||||
const char WinFrameView::kViewClassName[] = "WinFrameView";
|
||||
|
||||
WinFrameView::WinFrameView() {}
|
||||
WinFrameView::WinFrameView() = default;
|
||||
|
||||
WinFrameView::~WinFrameView() {}
|
||||
WinFrameView::~WinFrameView() = default;
|
||||
|
||||
gfx::Rect WinFrameView::GetWindowBoundsForClientBounds(
|
||||
const gfx::Rect& client_bounds) const {
|
||||
|
|
|
@ -23,7 +23,7 @@ ElectronDesktopWindowTreeHostWin::ElectronDesktopWindowTreeHostWin(
|
|||
desktop_native_widget_aura),
|
||||
native_window_view_(native_window_view) {}
|
||||
|
||||
ElectronDesktopWindowTreeHostWin::~ElectronDesktopWindowTreeHostWin() {}
|
||||
ElectronDesktopWindowTreeHostWin::~ElectronDesktopWindowTreeHostWin() = default;
|
||||
|
||||
bool ElectronDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
|
||||
WPARAM w_param,
|
||||
|
|
|
@ -55,9 +55,9 @@ TaskbarHost::ThumbarButton::ThumbarButton(const TaskbarHost::ThumbarButton&) =
|
|||
default;
|
||||
TaskbarHost::ThumbarButton::~ThumbarButton() = default;
|
||||
|
||||
TaskbarHost::TaskbarHost() {}
|
||||
TaskbarHost::TaskbarHost() = default;
|
||||
|
||||
TaskbarHost::~TaskbarHost() {}
|
||||
TaskbarHost::~TaskbarHost() = default;
|
||||
|
||||
bool TaskbarHost::SetThumbarButtons(HWND window,
|
||||
const std::vector<ThumbarButton>& buttons) {
|
||||
|
|
|
@ -16,7 +16,7 @@ ScopedHString::ScopedHString(const std::wstring& source) {
|
|||
Reset(source);
|
||||
}
|
||||
|
||||
ScopedHString::ScopedHString() {}
|
||||
ScopedHString::ScopedHString() = default;
|
||||
|
||||
ScopedHString::~ScopedHString() {
|
||||
Reset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue