chore: cleanup arc migration helpers (#39606)

This commit is contained in:
Shelley Vohr 2023-08-23 15:54:21 +02:00 committed by GitHub
parent ddc7e3ebb3
commit 522bba3dc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 52 additions and 172 deletions

View file

@ -18,10 +18,6 @@
#include "shell/common/application_info.h"
#include "shell/common/mac/main_application_bundle.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
namespace {

View file

@ -11,10 +11,6 @@
#import "shell/browser/ui/cocoa/electron_menu_controller.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron::api {
class MenuMac : public Menu {

View file

@ -6,10 +6,6 @@
#include "shell/browser/mac/electron_application.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron::api {
void NativeTheme::UpdateMacOSAppearanceForOverrideValue(

View file

@ -12,10 +12,6 @@
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/promise.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron::api {
v8::Local<v8::Promise> PushNotifications::RegisterForAPNSNotifications(

View file

@ -30,10 +30,6 @@
#include "skia/ext/skia_utils_mac.h"
#include "ui/native_theme/native_theme.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace gin {
template <>

View file

@ -36,10 +36,6 @@
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
namespace {

View file

@ -12,15 +12,11 @@
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h"
#include "shell/browser/browser_process_impl.h"
#import "shell/browser/mac/electron_application.h"
#include "shell/browser/mac/electron_application.h"
#include "shell/browser/mac/electron_application_delegate.h"
#include "shell/common/electron_paths.h"
#include "ui/base/l10n/l10n_util_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
static ElectronApplicationDelegate* __strong delegate_;

View file

@ -10,10 +10,6 @@
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
NSArray* ListValueToNSArray(const base::Value::List& value) {

View file

@ -11,10 +11,6 @@
#import <AVFoundation/AVFoundation.h>
#import <LocalAuthentication/LocalAuthentication.h>
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface AtomApplication : NSApplication <CrAppProtocol,
CrAppControlProtocol,
NSUserActivityDelegate> {

View file

@ -19,10 +19,6 @@
#import <UserNotifications/UserNotifications.h>
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
static NSDictionary* UNNotificationResponseToNSDictionary(
UNNotificationResponse* response) {
if (![response respondsToSelector:@selector(actionIdentifier)] ||

View file

@ -52,10 +52,6 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/native_frame_view_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface ElectronProgressBar : NSProgressIndicator
@end

View file

@ -6,10 +6,6 @@
#include "base/apple/owned_objc.h"
#include "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)

View file

@ -12,10 +12,6 @@
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
#include "ui/base/cocoa/base_view.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
class InspectableWebContentsViewMac;
}

View file

@ -13,10 +13,6 @@
#include "ui/base/cocoa/base_view.h"
#include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@implementation ElectronInspectableWebContentsView
- (instancetype)initWithInspectableWebContentsViewMac:

View file

@ -11,10 +11,6 @@
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
class ElectronMenuModel;
}

View file

@ -14,10 +14,6 @@
#import <objc/message.h>
#import <objc/runtime.h>
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
int ScopedDisableResize::disable_resize_ = 0;

View file

@ -17,10 +17,6 @@
#include "ui/views/cocoa/native_widget_mac_ns_window_host.h"
#include "ui/views/widget/native_widget_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
using FullScreenTransitionState =
electron::NativeWindow::FullScreenTransitionState;

View file

@ -15,10 +15,6 @@
#include "shell/browser/native_window.h"
#include "shell/common/gin_helper/persistent_dictionary.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface ElectronTouchBar : NSObject <NSScrubberDelegate,
NSScrubberDataSource,
NSScrubberFlowLayoutDelegate> {

View file

@ -10,10 +10,6 @@
@class ElectronInspectableWebContentsView;
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
class InspectableWebContentsViewMac : public InspectableWebContentsView {

View file

@ -14,10 +14,6 @@
@class ElectronMenuController;
@class StatusItemView;
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
class TrayIconCocoa : public TrayIcon {

View file

@ -2,13 +2,13 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import "shell/common/application_info.h"
#include "shell/common/application_info.h"
#include <string>
#import "base/mac/foundation_util.h"
#import "base/strings/sys_string_conversions.h"
#import "shell/common/mac/main_application_bundle.h"
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#include "shell/common/mac/main_application_bundle.h"
namespace electron {

View file

@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#import "shell/common/mac/main_application_bundle.h"
#include "shell/common/mac/main_application_bundle.h"
#include "base/apple/bundle_locations.h"
#include "base/files/file_path.h"