chore: rename atom -> electron (#21986)

This commit is contained in:
Jeremy Apthorp 2020-02-04 12:19:40 -08:00 committed by GitHub
parent f14fc4b041
commit d9321f4df7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
287 changed files with 1771 additions and 1708 deletions

View file

@ -1,17 +0,0 @@
// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#import "shell/browser/ui/cocoa/atom_menu_controller.h"
@interface AtomApplicationDelegate : NSObject <NSApplicationDelegate> {
@private
base::scoped_nsobject<AtomMenuController> menu_controller_;
}
// Sets the menu that will be returned in "applicationDockMenu:".
- (void)setApplicationDockMenu:(electron::AtomMenuModel*)model;
@end

View file

@ -9,9 +9,9 @@
#import <AVFoundation/AVFoundation.h>
#import <LocalAuthentication/LocalAuthentication.h>
@interface AtomApplication : NSApplication <CrAppProtocol,
CrAppControlProtocol,
NSUserActivityDelegate> {
@interface ElectronApplication : NSApplication <CrAppProtocol,
CrAppControlProtocol,
NSUserActivityDelegate> {
@private
BOOL handlingSendEvent_;
base::scoped_nsobject<NSUserActivity> currentActivity_;
@ -20,7 +20,7 @@
base::Callback<bool()> shouldShutdown_;
}
+ (AtomApplication*)sharedApplication;
+ (ElectronApplication*)sharedApplication;
- (void)setShutdownHandler:(base::Callback<bool()>)handler;
- (void)registerURLHandler;

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import "shell/browser/mac/atom_application.h"
#import "shell/browser/mac/electron_application.h"
#include <memory>
#include <string>
@ -15,8 +15,8 @@
#include "content/public/browser/native_event_processor_mac.h"
#include "content/public/browser/native_event_processor_observer_mac.h"
#include "shell/browser/browser.h"
#import "shell/browser/mac/atom_application_delegate.h"
#include "shell/browser/mac/dict_util.h"
#import "shell/browser/mac/electron_application_delegate.h"
namespace {
@ -29,16 +29,16 @@ inline void dispatch_sync_main(dispatch_block_t block) {
} // namespace
@interface AtomApplication () <NativeEventProcessor> {
@interface ElectronApplication () <NativeEventProcessor> {
base::ObserverList<content::NativeEventProcessorObserver>::Unchecked
observers_;
}
@end
@implementation AtomApplication
@implementation ElectronApplication
+ (AtomApplication*)sharedApplication {
return (AtomApplication*)[super sharedApplication];
+ (ElectronApplication*)sharedApplication {
return (ElectronApplication*)[super sharedApplication];
}
- (void)terminate:(id)sender {

View file

@ -0,0 +1,17 @@
// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#import "shell/browser/ui/cocoa/electron_menu_controller.h"
@interface ElectronApplicationDelegate : NSObject <NSApplicationDelegate> {
@private
base::scoped_nsobject<ElectronMenuController> menu_controller_;
}
// Sets the menu that will be returned in "applicationDockMenu:".
- (void)setApplicationDockMenu:(electron::ElectronMenuModel*)model;
@end

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import "shell/browser/mac/atom_application_delegate.h"
#import "shell/browser/mac/electron_application_delegate.h"
#include <memory>
#include <string>
@ -14,8 +14,8 @@
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
#include "shell/browser/browser.h"
#import "shell/browser/mac/atom_application.h"
#include "shell/browser/mac/dict_util.h"
#import "shell/browser/mac/electron_application.h"
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
// On macOS 10.12, the IME system attempts to allocate a 2^64 size buffer,
@ -41,11 +41,11 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
@end
#endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
@implementation AtomApplicationDelegate
@implementation ElectronApplicationDelegate
- (void)setApplicationDockMenu:(electron::AtomMenuModel*)model {
menu_controller_.reset([[AtomMenuController alloc] initWithModel:model
useDefaultAccelerator:NO]);
- (void)setApplicationDockMenu:(electron::ElectronMenuModel*)model {
menu_controller_.reset([[ElectronMenuController alloc] initWithModel:model
useDefaultAccelerator:NO]);
}
- (void)applicationWillFinishLaunching:(NSNotification*)notify {