Skip to content

Commit 34c4c8d

Browse files
refactor: rename the atom namespace to electron
1 parent 8c4496a commit 34c4c8d

File tree

531 files changed

+1456
-1428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

531 files changed

+1456
-1428
lines changed

chromium_src/chrome/browser/process_singleton_posix.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
827827
return PROCESS_NONE;
828828
to_send.append(current_dir.value());
829829

830-
const std::vector<std::string>& argv = atom::AtomCommandLine::argv();
830+
const std::vector<std::string>& argv = electron::AtomCommandLine::argv();
831831
for (std::vector<std::string>::const_iterator it = argv.begin();
832832
it != argv.end(); ++it) {
833833
to_send.push_back(kTokenDelimiter);

chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GlobalMenuBarRegistrarX11::~GlobalMenuBarRegistrarX11() {
6565

6666
void GlobalMenuBarRegistrarX11::RegisterXID(unsigned long xid) {
6767
DCHECK(registrar_proxy_);
68-
std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid);
68+
std::string path = electron::GlobalMenuBarX11::GetPathForWindow(xid);
6969

7070
ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087
7171
// TODO(erg): The mozilla implementation goes to a lot of callback trouble
@@ -82,7 +82,7 @@ void GlobalMenuBarRegistrarX11::RegisterXID(unsigned long xid) {
8282

8383
void GlobalMenuBarRegistrarX11::UnregisterXID(unsigned long xid) {
8484
DCHECK(registrar_proxy_);
85-
std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid);
85+
std::string path = electron::GlobalMenuBarX11::GetPathForWindow(xid);
8686

8787
ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087
8888
// TODO(erg): The mozilla implementation goes to a lot of callback trouble

shell/app/atom_content_client.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "shell/common/atom_constants.h"
3535
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
3636

37-
namespace atom {
37+
namespace electron {
3838

3939
namespace {
4040

@@ -272,4 +272,4 @@ bool AtomContentClient::IsDataResourceGzipped(int resource_id) const {
272272
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
273273
}
274274

275-
} // namespace atom
275+
} // namespace electron

shell/app/atom_content_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "content/public/common/content_client.h"
1313

14-
namespace atom {
14+
namespace electron {
1515

1616
class AtomContentClient : public content::ContentClient {
1717
public:
@@ -37,6 +37,6 @@ class AtomContentClient : public content::ContentClient {
3737
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
3838
};
3939

40-
} // namespace atom
40+
} // namespace electron
4141

4242
#endif // SHELL_APP_ATOM_CONTENT_CLIENT_H_

shell/app/atom_library_main.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#include "shell/common/mac/main_application_bundle.h"
1616

1717
int AtomMain(int argc, char* argv[]) {
18-
atom::AtomMainDelegate delegate;
18+
electron::AtomMainDelegate delegate;
1919
content::ContentMainParams params(&delegate);
2020
params.argc = argc;
2121
params.argv = const_cast<const char**>(argv);
22-
atom::AtomCommandLine::Init(argc, argv);
22+
electron::AtomCommandLine::Init(argc, argv);
2323
return content::ContentMain(params);
2424
}
2525

@@ -28,11 +28,11 @@ int AtomInitializeICUandStartNode(int argc, char* argv[]) {
2828
base::AtExitManager atexit_manager;
2929
base::mac::ScopedNSAutoreleasePool pool;
3030
base::mac::SetOverrideFrameworkBundlePath(
31-
atom::MainApplicationBundlePath()
31+
electron::MainApplicationBundlePath()
3232
.Append("Contents")
3333
.Append("Frameworks")
3434
.Append(ELECTRON_PRODUCT_NAME " Framework.framework"));
3535
base::i18n::InitializeICU();
36-
return atom::NodeMain(argc, argv);
36+
return electron::NodeMain(argc, argv);
3737
}
3838
#endif

shell/app/atom_main.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
125125
#endif
126126

127127
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
128-
bool run_as_node = IsEnvSet(atom::kRunAsNode);
128+
bool run_as_node = IsEnvSet(electron::kRunAsNode);
129129
#else
130130
bool run_as_node = false;
131131
#endif
@@ -158,7 +158,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
158158
if (run_as_node) {
159159
base::AtExitManager atexit_manager;
160160
base::i18n::InitializeICU();
161-
auto ret = atom::NodeMain(argv.size(), argv.data());
161+
auto ret = electron::NodeMain(argv.size(), argv.data());
162162
std::for_each(argv.begin(), argv.end(), free);
163163
return ret;
164164
}
@@ -171,17 +171,17 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
171171
return crash_service::Main(&argv);
172172
}
173173

174-
if (!atom::CheckCommandLineArguments(arguments.argc, arguments.argv))
174+
if (!electron::CheckCommandLineArguments(arguments.argc, arguments.argv))
175175
return -1;
176176

177177
sandbox::SandboxInterfaceInfo sandbox_info = {0};
178178
content::InitializeSandboxInfo(&sandbox_info);
179-
atom::AtomMainDelegate delegate;
179+
electron::AtomMainDelegate delegate;
180180

181181
content::ContentMainParams params(&delegate);
182182
params.instance = instance;
183183
params.sandbox_info = &sandbox_info;
184-
atom::AtomCommandLine::Init(arguments.argc, arguments.argv);
184+
electron::AtomCommandLine::Init(arguments.argc, arguments.argv);
185185
return content::ContentMain(params);
186186
}
187187

@@ -191,18 +191,18 @@ int main(int argc, char* argv[]) {
191191
FixStdioStreams();
192192

193193
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
194-
if (IsEnvSet(atom::kRunAsNode)) {
194+
if (IsEnvSet(electron::kRunAsNode)) {
195195
base::i18n::InitializeICU();
196196
base::AtExitManager atexit_manager;
197-
return atom::NodeMain(argc, argv);
197+
return electron::NodeMain(argc, argv);
198198
}
199199
#endif
200200

201-
atom::AtomMainDelegate delegate;
201+
electron::AtomMainDelegate delegate;
202202
content::ContentMainParams params(&delegate);
203203
params.argc = argc;
204204
params.argv = const_cast<const char**>(argv);
205-
atom::AtomCommandLine::Init(argc, argv);
205+
electron::AtomCommandLine::Init(argc, argv);
206206
return content::ContentMain(params);
207207
}
208208

@@ -212,7 +212,7 @@ int main(int argc, char* argv[]) {
212212
FixStdioStreams();
213213

214214
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
215-
if (IsEnvSet(atom::kRunAsNode)) {
215+
if (IsEnvSet(electron::kRunAsNode)) {
216216
return AtomInitializeICUandStartNode(argc, argv);
217217
}
218218
#endif

shell/app/atom_main_delegate.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#endif
4949
#endif
5050

51-
namespace atom {
51+
namespace electron {
5252

5353
namespace {
5454

@@ -326,4 +326,4 @@ bool AtomMainDelegate::ShouldCreateFeatureList() {
326326
return false;
327327
}
328328

329-
} // namespace atom
329+
} // namespace electron

shell/app/atom_main_delegate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "content/public/app/content_main_delegate.h"
1212
#include "content/public/common/content_client.h"
1313

14-
namespace atom {
14+
namespace electron {
1515

1616
void LoadResourceBundle(const std::string& locale);
1717

@@ -56,6 +56,6 @@ class AtomMainDelegate : public content::ContentMainDelegate {
5656
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate);
5757
};
5858

59-
} // namespace atom
59+
} // namespace electron
6060

6161
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_H_

shell/app/atom_main_delegate_mac.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
66
#define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
77

8-
namespace atom {
8+
namespace electron {
99

1010
// Initializes NSApplication.
1111
void RegisterAtomCrApp();
1212

13-
} // namespace atom
13+
} // namespace electron
1414

1515
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_

shell/app/atom_main_delegate_mac.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "shell/common/application_info.h"
1919
#include "shell/common/mac/main_application_bundle.h"
2020

21-
namespace atom {
21+
namespace electron {
2222

2323
namespace {
2424

@@ -68,4 +68,4 @@ void RegisterAtomCrApp() {
6868
[AtomApplication sharedApplication];
6969
}
7070

71-
} // namespace atom
71+
} // namespace electron

0 commit comments

Comments
 (0)