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

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/common/api/atom_api_clipboard.h"
#include "shell/common/api/electron_api_clipboard.h"
#include "base/strings/utf_string_conversions.h"
#include "shell/common/gin_converters/image_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_API_ATOM_API_CLIPBOARD_H_
#define SHELL_COMMON_API_ATOM_API_CLIPBOARD_H_
#ifndef SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_
#define SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_
#include <string>
#include <vector>
@ -70,4 +70,4 @@ class Clipboard {
} // namespace electron
#endif // SHELL_COMMON_API_ATOM_API_CLIPBOARD_H_
#endif // SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_

View file

@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/strings/sys_string_conversions.h"
#include "shell/common/api/atom_api_clipboard.h"
#include "shell/common/api/electron_api_clipboard.h"
#include "ui/base/cocoa/find_pasteboard.h"
namespace electron {

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
#define SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
#ifndef SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_
#define SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_
#include "gin/handle.h"
#include "shell/common/gin_converters/std_converter.h"
@ -61,4 +61,4 @@ class KeyWeakMap : public gin_helper::Wrappable<KeyWeakMap<K>> {
} // namespace electron
#endif // SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
#endif // SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_

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.
#include "shell/common/api/atom_api_native_image.h"
#include "shell/common/api/electron_api_native_image.h"
#include <memory>
#include <string>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_API_ATOM_API_NATIVE_IMAGE_H_
#define SHELL_COMMON_API_ATOM_API_NATIVE_IMAGE_H_
#ifndef SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_
#define SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_
#include <map>
#include <string>
@ -128,4 +128,4 @@ struct Converter<electron::api::NativeImage*> {
} // namespace gin
#endif // SHELL_COMMON_API_ATOM_API_NATIVE_IMAGE_H_
#endif // SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_

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.
#include "shell/common/api/atom_api_native_image.h"
#include "shell/common/api/electron_api_native_image.h"
#include <string>
#include <vector>

View file

@ -15,7 +15,7 @@
#include "v8/include/v8-profiler.h"
#if BUILDFLAG(ENABLE_REMOTE_MODULE)
#include "shell/common/api/atom_api_key_weak_map.h"
#include "shell/common/api/electron_api_key_weak_map.h"
#include "shell/common/api/remote/remote_callback_freer.h"
#include "shell/common/api/remote/remote_object_freer.h"
#endif

View file

@ -15,7 +15,7 @@
#include "content/public/common/content_switches.h"
#include "electron/electron_version.h"
#include "shell/browser/browser.h"
#include "shell/common/atom_constants.h"
#include "shell/common/electron_constants.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_helper/dictionary.h"

View file

@ -15,7 +15,7 @@
#include "electron/shell/common/api/api.mojom.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "shell/browser/ui/inspectable_web_contents_impl.h"
#include "shell/common/atom_constants.h"
#include "shell/common/electron_constants.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h"

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.
#include "shell/common/atom_command_line.h"
#include "shell/common/electron_command_line.h"
#include "base/command_line.h"
#include "uv.h" // NOLINT(build/include)
@ -10,10 +10,10 @@
namespace electron {
// static
base::CommandLine::StringVector AtomCommandLine::argv_;
base::CommandLine::StringVector ElectronCommandLine::argv_;
// static
void AtomCommandLine::Init(int argc, base::CommandLine::CharType** argv) {
void ElectronCommandLine::Init(int argc, base::CommandLine::CharType** argv) {
DCHECK(argv_.empty());
// NOTE: uv_setup_args does nothing on Windows, so we don't need to call it.
@ -28,7 +28,7 @@ void AtomCommandLine::Init(int argc, base::CommandLine::CharType** argv) {
#if defined(OS_LINUX)
// static
void AtomCommandLine::InitializeFromCommandLine() {
void ElectronCommandLine::InitializeFromCommandLine() {
argv_ = base::CommandLine::ForCurrentProcess()->argv();
}
#endif

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_ATOM_COMMAND_LINE_H_
#define SHELL_COMMON_ATOM_COMMAND_LINE_H_
#ifndef SHELL_COMMON_ELECTRON_COMMAND_LINE_H_
#define SHELL_COMMON_ELECTRON_COMMAND_LINE_H_
#include <string>
#include <vector>
@ -15,7 +15,7 @@
namespace electron {
// Singleton to remember the original "argc" and "argv".
class AtomCommandLine {
class ElectronCommandLine {
public:
static const base::CommandLine::StringVector& argv() { return argv_; }
@ -30,9 +30,9 @@ class AtomCommandLine {
private:
static base::CommandLine::StringVector argv_;
DISALLOW_IMPLICIT_CONSTRUCTORS(AtomCommandLine);
DISALLOW_IMPLICIT_CONSTRUCTORS(ElectronCommandLine);
};
} // namespace electron
#endif // SHELL_COMMON_ATOM_COMMAND_LINE_H_
#endif // SHELL_COMMON_ELECTRON_COMMAND_LINE_H_

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.
#include "shell/common/atom_constants.h"
#include "shell/common/electron_constants.h"
namespace electron {

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_ATOM_CONSTANTS_H_
#define SHELL_COMMON_ATOM_CONSTANTS_H_
#ifndef SHELL_COMMON_ELECTRON_CONSTANTS_H_
#define SHELL_COMMON_ELECTRON_CONSTANTS_H_
#include "build/build_config.h"
#include "electron/buildflags/buildflags.h"
@ -49,4 +49,4 @@ extern const char kPdfViewerUIHost[];
} // namespace electron
#endif // SHELL_COMMON_ATOM_CONSTANTS_H_
#endif // SHELL_COMMON_ELECTRON_CONSTANTS_H_

View file

@ -10,7 +10,7 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
#include "shell/browser/api/atom_api_web_contents.h"
#include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/web_contents_permission_helper.h"
#include "shell/common/gin_converters/blink_converter.h"
#include "shell/common/gin_converters/callback_converter.h"

View file

@ -5,7 +5,7 @@
#include "shell/common/gin_converters/file_dialog_converter.h"
#include "gin/dictionary.h"
#include "shell/browser/api/atom_api_browser_window.h"
#include "shell/browser/api/electron_api_browser_window.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_converters/native_window_converter.h"

View file

@ -4,7 +4,7 @@
#include "shell/common/gin_converters/image_converter.h"
#include "shell/common/api/atom_api_native_image.h"
#include "shell/common/api/electron_api_native_image.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "ui/gfx/image/image_skia.h"

View file

@ -6,7 +6,7 @@
#define SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_
#include "gin/converter.h"
#include "shell/browser/api/atom_api_top_level_window.h"
#include "shell/browser/api/electron_api_top_level_window.h"
namespace gin {

View file

@ -20,7 +20,7 @@
#include "net/http/http_version.h"
#include "net/url_request/redirect_info.h"
#include "services/network/public/cpp/resource_request.h"
#include "shell/browser/api/atom_api_data_pipe_holder.h"
#include "shell/browser/api/electron_api_data_pipe_holder.h"
#include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_converters/value_converter.h"

View file

@ -12,8 +12,8 @@ namespace gin_helper {
// Like Dictionary, but stores object in persistent handle so you can keep it
// safely on heap.
//
// TODO(zcbenz): The only user of this class is AtomTouchBar, we should migrate
// away from this class.
// TODO(zcbenz): The only user of this class is ElectronTouchBar, we should
// migrate away from this class.
class PersistentDictionary {
public:
PersistentDictionary();

View file

@ -8,7 +8,7 @@
#include "base/bind.h"
#include "base/supports_user_data.h"
#include "shell/browser/atom_browser_main_parts.h"
#include "shell/browser/electron_browser_main_parts.h"
#include "shell/common/gin_helper/locker.h"
namespace gin_helper {
@ -36,7 +36,7 @@ TrackableObjectBase::TrackableObjectBase() : weak_factory_(this) {
DCHECK(gin_helper::Locker::IsBrowserProcess())
<< "This class only works for browser process";
electron::AtomBrowserMainParts::Get()->RegisterDestructionCallback(
electron::ElectronBrowserMainParts::Get()->RegisterDestructionCallback(
GetDestroyClosure());
}

View file

@ -23,7 +23,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_paths.h"
#include "electron/buildflags/buildflags.h"
#include "shell/common/atom_command_line.h"
#include "shell/common/electron_command_line.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/event_emitter_caller.h"
@ -264,7 +264,7 @@ void NodeBindings::Initialize() {
#if defined(OS_LINUX)
// Get real command line in renderer process forked by zygote.
if (browser_env_ != BrowserEnvironment::BROWSER)
AtomCommandLine::InitializeFromCommandLine();
ElectronCommandLine::InitializeFromCommandLine();
#endif
// Explicitly register electron's builtin modules.
@ -302,12 +302,12 @@ node::Environment* NodeBindings::CreateEnvironment(
node::MultiIsolatePlatform* platform,
bool bootstrap_env) {
#if defined(OS_WIN)
auto& atom_args = AtomCommandLine::argv();
auto& atom_args = ElectronCommandLine::argv();
std::vector<std::string> args(atom_args.size());
std::transform(atom_args.cbegin(), atom_args.cend(), args.begin(),
[](auto& a) { return base::WideToUTF8(a); });
#else
auto args = AtomCommandLine::argv();
auto args = ElectronCommandLine::argv();
#endif
// Feed node the path to initialization script.

View file

@ -24,7 +24,7 @@
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<object class="NSCustomObject" id="1021">
<string key="NSClassName">AtomApplication</string>
<string key="NSClassName">ElectronApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>