refactor: rename the atom namespace to electron
This commit is contained in:
parent
8c4496a9c9
commit
34c4c8d508
531 changed files with 1456 additions and 1428 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "shell/common/atom_constants.h"
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -272,4 +272,4 @@ bool AtomContentClient::IsDataResourceGzipped(int resource_id) const {
|
|||
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "content/public/common/content_client.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class AtomContentClient : public content::ContentClient {
|
||||
public:
|
||||
|
@ -37,6 +37,6 @@ class AtomContentClient : public content::ContentClient {
|
|||
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_CONTENT_CLIENT_H_
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
#include "shell/common/mac/main_application_bundle.h"
|
||||
|
||||
int AtomMain(int argc, char* argv[]) {
|
||||
atom::AtomMainDelegate delegate;
|
||||
electron::AtomMainDelegate delegate;
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.argc = argc;
|
||||
params.argv = const_cast<const char**>(argv);
|
||||
atom::AtomCommandLine::Init(argc, argv);
|
||||
electron::AtomCommandLine::Init(argc, argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,11 @@ int AtomInitializeICUandStartNode(int argc, char* argv[]) {
|
|||
base::AtExitManager atexit_manager;
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
base::mac::SetOverrideFrameworkBundlePath(
|
||||
atom::MainApplicationBundlePath()
|
||||
electron::MainApplicationBundlePath()
|
||||
.Append("Contents")
|
||||
.Append("Frameworks")
|
||||
.Append(ELECTRON_PRODUCT_NAME " Framework.framework"));
|
||||
base::i18n::InitializeICU();
|
||||
return atom::NodeMain(argc, argv);
|
||||
return electron::NodeMain(argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -125,7 +125,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||
bool run_as_node = IsEnvSet(atom::kRunAsNode);
|
||||
bool run_as_node = IsEnvSet(electron::kRunAsNode);
|
||||
#else
|
||||
bool run_as_node = false;
|
||||
#endif
|
||||
|
@ -158,7 +158,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
if (run_as_node) {
|
||||
base::AtExitManager atexit_manager;
|
||||
base::i18n::InitializeICU();
|
||||
auto ret = atom::NodeMain(argv.size(), argv.data());
|
||||
auto ret = electron::NodeMain(argv.size(), argv.data());
|
||||
std::for_each(argv.begin(), argv.end(), free);
|
||||
return ret;
|
||||
}
|
||||
|
@ -171,17 +171,17 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
return crash_service::Main(&argv);
|
||||
}
|
||||
|
||||
if (!atom::CheckCommandLineArguments(arguments.argc, arguments.argv))
|
||||
if (!electron::CheckCommandLineArguments(arguments.argc, arguments.argv))
|
||||
return -1;
|
||||
|
||||
sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
atom::AtomMainDelegate delegate;
|
||||
electron::AtomMainDelegate delegate;
|
||||
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.instance = instance;
|
||||
params.sandbox_info = &sandbox_info;
|
||||
atom::AtomCommandLine::Init(arguments.argc, arguments.argv);
|
||||
electron::AtomCommandLine::Init(arguments.argc, arguments.argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
|
@ -191,18 +191,18 @@ int main(int argc, char* argv[]) {
|
|||
FixStdioStreams();
|
||||
|
||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||
if (IsEnvSet(atom::kRunAsNode)) {
|
||||
if (IsEnvSet(electron::kRunAsNode)) {
|
||||
base::i18n::InitializeICU();
|
||||
base::AtExitManager atexit_manager;
|
||||
return atom::NodeMain(argc, argv);
|
||||
return electron::NodeMain(argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
||||
atom::AtomMainDelegate delegate;
|
||||
electron::AtomMainDelegate delegate;
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.argc = argc;
|
||||
params.argv = const_cast<const char**>(argv);
|
||||
atom::AtomCommandLine::Init(argc, argv);
|
||||
electron::AtomCommandLine::Init(argc, argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ int main(int argc, char* argv[]) {
|
|||
FixStdioStreams();
|
||||
|
||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||
if (IsEnvSet(atom::kRunAsNode)) {
|
||||
if (IsEnvSet(electron::kRunAsNode)) {
|
||||
return AtomInitializeICUandStartNode(argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -326,4 +326,4 @@ bool AtomMainDelegate::ShouldCreateFeatureList() {
|
|||
return false;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "content/public/app/content_main_delegate.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
void LoadResourceBundle(const std::string& locale);
|
||||
|
||||
|
@ -56,6 +56,6 @@ class AtomMainDelegate : public content::ContentMainDelegate {
|
|||
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_H_
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
#define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
// Initializes NSApplication.
|
||||
void RegisterAtomCrApp();
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "shell/common/application_info.h"
|
||||
#include "shell/common/mac/main_application_bundle.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -68,4 +68,4 @@ void RegisterAtomCrApp() {
|
|||
[AtomApplication sharedApplication];
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -33,7 +33,7 @@ bool IsUrlArg(const base::CommandLine::CharType* arg) {
|
|||
|
||||
} // namespace
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) {
|
||||
const base::CommandLine::StringType dashdash(2, '-');
|
||||
|
@ -50,4 +50,4 @@ bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
#include "base/command_line.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv);
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_COMMAND_LINE_ARGS_H_
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "shell/app/manifests.h"
|
||||
|
||||
#include "base/no_destructor.h"
|
||||
#include "electron/atom/common/api/api.mojom.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/proxy_resolver/public/cpp/manifest.h"
|
||||
#include "services/service_manager/public/cpp/manifest_builder.h"
|
||||
|
@ -45,7 +45,7 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
|
|||
.ExposeInterfaceFilterCapability_Deprecated(
|
||||
"navigation:frame", "renderer",
|
||||
service_manager::Manifest::InterfaceList<
|
||||
atom::mojom::ElectronBrowser>())
|
||||
electron::mojom::ElectronBrowser>())
|
||||
.Build()};
|
||||
return *manifest;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "shell/common/crash_reporter/crash_reporter_win.h"
|
||||
#endif
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
int NodeMain(int argc, char* argv[]) {
|
||||
base::CommandLine::Init(argc, argv);
|
||||
|
@ -130,4 +130,4 @@ int NodeMain(int argc, char* argv[]) {
|
|||
return exit_code;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#ifndef SHELL_APP_NODE_MAIN_H_
|
||||
#define SHELL_APP_NODE_MAIN_H_
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
int NodeMain(int argc, char* argv[]);
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_NODE_MAIN_H_
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "base/stl_util.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
UvTaskRunner::UvTaskRunner(uv_loop_t* loop) : loop_(loop) {}
|
||||
|
||||
|
@ -57,4 +57,4 @@ void UvTaskRunner::OnClose(uv_handle_t* handle) {
|
|||
delete reinterpret_cast<uv_timer_t*>(handle);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "base/single_thread_task_runner.h"
|
||||
#include "uv.h" // NOLINT(build/include)
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
// TaskRunner implementation that posts tasks into libuv's default loop.
|
||||
class UvTaskRunner : public base::SingleThreadTaskRunner {
|
||||
|
@ -40,6 +40,6 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
|
|||
DISALLOW_COPY_AND_ASSIGN(UvTaskRunner);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_UV_TASK_RUNNER_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue