refactor: rename the atom namespace to electron

This commit is contained in:
Samuel Attard 2019-06-19 14:23:04 -07:00 committed by Samuel Attard
parent 8c4496a9c9
commit 34c4c8d508
531 changed files with 1456 additions and 1428 deletions

View file

@ -44,10 +44,11 @@ class IPCRenderer : public mate::Wrappable<IPCRenderer> {
// Bind the interface on the background runner. All accesses will be via
// the thread-safe pointer. This is to support our "fake-sync"
// MessageSync() hack; see the comment in IPCRenderer::SendSync.
atom::mojom::ElectronBrowserPtrInfo info;
electron::mojom::ElectronBrowserPtrInfo info;
render_frame->GetRemoteInterfaces()->GetInterface(mojo::MakeRequest(&info));
electron_browser_ptr_ = atom::mojom::ThreadSafeElectronBrowserPtr::Create(
std::move(info), task_runner_);
electron_browser_ptr_ =
electron::mojom::ThreadSafeElectronBrowserPtr::Create(std::move(info),
task_runner_);
}
static void BuildPrototype(v8::Isolate* isolate,
@ -74,12 +75,12 @@ class IPCRenderer : public mate::Wrappable<IPCRenderer> {
v8::Local<v8::Promise> Invoke(mate::Arguments* args,
const std::string& channel,
const base::Value& arguments) {
atom::util::Promise p(args->isolate());
electron::util::Promise p(args->isolate());
auto handle = p.GetHandle();
electron_browser_ptr_->get()->Invoke(
channel, arguments.Clone(),
base::BindOnce([](atom::util::Promise p,
base::BindOnce([](electron::util::Promise p,
base::Value result) { p.Resolve(result); },
std::move(p)));
@ -186,7 +187,7 @@ class IPCRenderer : public mate::Wrappable<IPCRenderer> {
}
scoped_refptr<base::SequencedTaskRunner> task_runner_;
scoped_refptr<atom::mojom::ThreadSafeElectronBrowserPtr>
scoped_refptr<electron::mojom::ThreadSafeElectronBrowserPtr>
electron_browser_ptr_;
};

View file

@ -22,7 +22,7 @@
#include "third_party/blink/public/web/web_text_checking_result.h"
#include "third_party/icu/source/common/unicode/uscript.h"
namespace atom {
namespace electron {
namespace api {
@ -272,4 +272,4 @@ SpellCheckClient::SpellCheckScope::~SpellCheckScope() = default;
} // namespace api
} // namespace atom
} // namespace electron

View file

@ -23,7 +23,7 @@ struct WebTextCheckingResult;
class WebTextCheckingCompletion;
} // namespace blink
namespace atom {
namespace electron {
namespace api {
@ -109,6 +109,6 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient,
} // namespace api
} // namespace atom
} // namespace electron
#endif // SHELL_RENDERER_API_ATOM_API_SPELL_CHECK_CLIENT_H_

View file

@ -63,7 +63,7 @@ struct Converter<blink::WebLocalFrame::ScriptExecutionType> {
} // namespace mate
namespace atom {
namespace electron {
namespace api {
@ -94,7 +94,7 @@ class RenderFrameStatus : public content::RenderFrameObserver {
class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
public:
explicit ScriptExecutionCallback(atom::util::Promise promise)
explicit ScriptExecutionCallback(electron::util::Promise promise)
: promise_(std::move(promise)) {}
~ScriptExecutionCallback() override {}
@ -118,7 +118,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
}
private:
atom::util::Promise promise_;
electron::util::Promise promise_;
DISALLOW_COPY_AND_ASSIGN(ScriptExecutionCallback);
};
@ -532,7 +532,7 @@ int GetRoutingId(v8::Local<v8::Value> window) {
} // namespace api
} // namespace atom
} // namespace electron
namespace {
@ -540,7 +540,7 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
using namespace atom::api; // NOLINT(build/namespaces)
using namespace electron::api; // NOLINT(build/namespaces)
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);