chore: rename atom -> electron (#21986)
This commit is contained in:
parent
f14fc4b041
commit
d9321f4df7
287 changed files with 1771 additions and 1708 deletions
|
@ -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/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -33,17 +33,17 @@
|
|||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/api/gpuinfo_manager.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/atom_browser_main_parts.h"
|
||||
#include "shell/browser/atom_paths.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_paths.h"
|
||||
#include "shell/browser/login_handler.h"
|
||||
#include "shell/browser/relauncher.h"
|
||||
#include "shell/common/application_info.h"
|
||||
#include "shell/common/atom_command_line.h"
|
||||
#include "shell/common/electron_command_line.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
#if defined(OS_MACOSX)
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "shell/browser/ui/cocoa/atom_bundle_mover.h"
|
||||
#include "shell/browser/ui/cocoa/electron_bundle_mover.h"
|
||||
#endif
|
||||
|
||||
using electron::Browser;
|
||||
|
@ -536,7 +536,8 @@ void OnIconDataAvailable(gin_helper::Promise<gfx::Image> promise,
|
|||
} // namespace
|
||||
|
||||
App::App(v8::Isolate* isolate) {
|
||||
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->set_delegate(this);
|
||||
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->set_delegate(this);
|
||||
Browser::Get()->AddObserver(this);
|
||||
content::GpuDataManager::GetInstance()->AddObserver(this);
|
||||
|
||||
|
@ -549,7 +550,7 @@ App::App(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
App::~App() {
|
||||
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->set_delegate(nullptr);
|
||||
Browser::Get()->RemoveObserver(this);
|
||||
content::GpuDataManager::GetInstance()->RemoveObserver(this);
|
||||
|
@ -573,7 +574,7 @@ void App::OnWindowAllClosed() {
|
|||
}
|
||||
|
||||
void App::OnQuit() {
|
||||
int exitCode = AtomBrowserMainParts::Get()->GetExitCode();
|
||||
int exitCode = ElectronBrowserMainParts::Get()->GetExitCode();
|
||||
Emit("quit", exitCode);
|
||||
|
||||
if (process_singleton_) {
|
||||
|
@ -786,7 +787,7 @@ void App::RenderProcessReady(content::RenderProcessHost* host) {
|
|||
// `WebContents` instances, but this was implicitly happening before in
|
||||
// `RenderProcessPreferences`, so this is at least more explicit...
|
||||
content::WebContents* web_contents =
|
||||
AtomBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
|
||||
ElectronBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
|
||||
if (web_contents)
|
||||
WebContents::FromOrCreate(v8::Isolate::GetCurrent(), web_contents);
|
||||
}
|
||||
|
@ -991,7 +992,8 @@ bool App::Relaunch(gin_helper::Arguments* js_args) {
|
|||
}
|
||||
|
||||
if (!override_argv) {
|
||||
const relauncher::StringVector& argv = electron::AtomCommandLine::argv();
|
||||
const relauncher::StringVector& argv =
|
||||
electron::ElectronCommandLine::argv();
|
||||
return relauncher::RelaunchApp(argv);
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1067,7 @@ Browser::LoginItemSettings App::GetLoginItemSettings(
|
|||
#if defined(USE_NSS_CERTS)
|
||||
void App::ImportCertificate(const base::DictionaryValue& options,
|
||||
net::CompletionRepeatingCallback callback) {
|
||||
auto browser_context = AtomBrowserContext::From("", false);
|
||||
auto browser_context = ElectronBrowserContext::From("", false);
|
||||
if (!certificate_manager_model_) {
|
||||
auto copy = base::DictionaryValue::From(
|
||||
base::Value::ToUniquePtrValue(options.Clone()));
|
||||
|
@ -1164,7 +1166,7 @@ v8::Local<v8::Promise> App::GetFileIcon(const base::FilePath& path,
|
|||
icon_size = GetIconSizeByString(icon_size_string);
|
||||
}
|
||||
|
||||
auto* icon_manager = AtomBrowserMainParts::Get()->GetIconManager();
|
||||
auto* icon_manager = ElectronBrowserMainParts::Get()->GetIconManager();
|
||||
gfx::Image* icon =
|
||||
icon_manager->LookupIconFromFilepath(normalized_path, icon_size);
|
||||
if (icon) {
|
||||
|
@ -1314,28 +1316,28 @@ void App::EnableSandbox(gin_helper::ErrorThrower thrower) {
|
|||
}
|
||||
|
||||
void App::SetUserAgentFallback(const std::string& user_agent) {
|
||||
AtomBrowserClient::Get()->SetUserAgent(user_agent);
|
||||
ElectronBrowserClient::Get()->SetUserAgent(user_agent);
|
||||
}
|
||||
|
||||
std::string App::GetUserAgentFallback() {
|
||||
return AtomBrowserClient::Get()->GetUserAgent();
|
||||
return ElectronBrowserClient::Get()->GetUserAgent();
|
||||
}
|
||||
|
||||
void App::SetBrowserClientCanUseCustomSiteInstance(bool should_disable) {
|
||||
AtomBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable);
|
||||
ElectronBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable);
|
||||
}
|
||||
bool App::CanBrowserClientUseCustomSiteInstance() {
|
||||
return AtomBrowserClient::Get()->CanUseCustomSiteInstance();
|
||||
return ElectronBrowserClient::Get()->CanUseCustomSiteInstance();
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool App::MoveToApplicationsFolder(gin_helper::ErrorThrower thrower,
|
||||
gin::Arguments* args) {
|
||||
return AtomBundleMover::Move(thrower, args);
|
||||
return ElectronBundleMover::Move(thrower, args);
|
||||
}
|
||||
|
||||
bool App::IsInApplicationsFolder() {
|
||||
return AtomBundleMover::IsCurrentAppInApplicationsFolder();
|
||||
return ElectronBundleMover::IsCurrentAppInApplicationsFolder();
|
||||
}
|
||||
|
||||
int DockBounce(gin_helper::Arguments* args) {
|
|
@ -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_BROWSER_API_ATOM_API_APP_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_APP_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -22,9 +22,9 @@
|
|||
#include "net/base/completion_repeating_callback.h"
|
||||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "shell/browser/api/process_metric.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/browser_observer.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
#include "shell/common/gin_helper/event_emitter.h"
|
||||
|
@ -46,7 +46,7 @@ enum class JumpListResult : int;
|
|||
|
||||
namespace api {
|
||||
|
||||
class App : public AtomBrowserClient::Delegate,
|
||||
class App : public ElectronBrowserClient::Delegate,
|
||||
public gin_helper::EventEmitter<App>,
|
||||
public BrowserObserver,
|
||||
public content::GpuDataManagerObserver,
|
||||
|
@ -244,4 +244,4 @@ class App : public AtomBrowserClient::Delegate,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_APP_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
|
@ -3,8 +3,8 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
#include "base/path_service.h"
|
||||
#include "shell/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/atom_paths.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
#include "shell/browser/electron_paths.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
|
@ -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/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
|
||||
#include <string>
|
||||
|
|
@ -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/browser/api/atom_api_auto_updater.h"
|
||||
#include "shell/browser/api/electron_api_auto_updater.h"
|
||||
|
||||
#include "base/time/time.h"
|
||||
#include "shell/browser/browser.h"
|
|
@ -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_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -57,4 +57,4 @@ class AutoUpdater : public gin_helper::EventEmitter<AutoUpdater>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
|
@ -2,9 +2,9 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_browser_view.h"
|
||||
#include "shell/browser/api/electron_api_browser_view.h"
|
||||
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/native_browser_view.h"
|
||||
#include "shell/common/color_util.h"
|
|
@ -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_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -70,4 +70,4 @@ class BrowserView : public gin_helper::TrackableObject<BrowserView>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
|
@ -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/browser/api/atom_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
|
||||
#include <memory>
|
||||
|
|
@ -2,16 +2,16 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/cancelable_callback.h"
|
||||
#include "shell/browser/api/atom_api_top_level_window.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_top_level_window.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -129,4 +129,4 @@ class BrowserWindow : public TopLevelWindow,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
|
@ -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/browser/api/atom_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
|
@ -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/browser/api/atom_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
|
||||
#include "shell/browser/native_window_views.h"
|
||||
|
|
@ -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/browser/api/atom_api_cookies.h"
|
||||
#include "shell/browser/api/electron_api_cookies.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
@ -18,8 +18,8 @@
|
|||
#include "net/cookies/canonical_cookie.h"
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "net/cookies/cookie_util.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/cookie_change_notifier.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -173,7 +173,7 @@ std::string InclusionStatusToString(
|
|||
|
||||
} // namespace
|
||||
|
||||
Cookies::Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
Init(isolate);
|
||||
cookie_change_subscription_ =
|
||||
|
@ -322,7 +322,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
|
|||
|
||||
// static
|
||||
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -29,21 +29,21 @@ class URLRequestContextGetter;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
class Cookies : public gin_helper::TrackableObject<Cookies> {
|
||||
public:
|
||||
static gin::Handle<Cookies> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// gin_helper::TrackableObject:
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
protected:
|
||||
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Cookies() override;
|
||||
|
||||
v8::Local<v8::Promise> Get(const gin_helper::Dictionary& filter);
|
||||
|
@ -58,7 +58,7 @@ class Cookies : public gin_helper::TrackableObject<Cookies> {
|
|||
std::unique_ptr<base::CallbackList<void(
|
||||
const net::CookieChangeInfo& change)>::Subscription>
|
||||
cookie_change_subscription_;
|
||||
scoped_refptr<AtomBrowserContext> browser_context_;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Cookies);
|
||||
};
|
||||
|
@ -67,4 +67,4 @@ class Cookies : public gin_helper::TrackableObject<Cookies> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
|
@ -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/browser/api/atom_api_data_pipe_holder.h"
|
||||
#include "shell/browser/api/electron_api_data_pipe_holder.h"
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
|
@ -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_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -51,4 +51,4 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
|
@ -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/browser/api/atom_api_debugger.h"
|
||||
#include "shell/browser/api/electron_api_debugger.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
|
@ -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_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -72,4 +72,4 @@ class Debugger : public gin_helper::TrackableObject<Debugger>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
|
@ -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/browser/api/atom_api_desktop_capturer.h"
|
||||
#include "shell/browser/api/electron_api_desktop_capturer.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
@ -14,7 +14,7 @@
|
|||
#include "chrome/browser/media/webrtc/desktop_media_list.h"
|
||||
#include "chrome/browser/media/webrtc/window_icon_util.h"
|
||||
#include "content/public/browser/desktop_capture.h"
|
||||
#include "shell/common/api/atom_api_native_image.h"
|
||||
#include "shell/common/api/electron_api_native_image.h"
|
||||
#include "shell/common/gin_converters/gfx_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
|
@ -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_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -76,4 +76,4 @@ class DesktopCapturer : public gin_helper::TrackableObject<DesktopCapturer>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_download_item.h"
|
||||
#include "shell/browser/api/electron_api_download_item.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "net/base/filename_util.h"
|
||||
#include "shell/browser/atom_browser_main_parts.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/common/gin_converters/file_dialog_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
|
@ -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_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -71,4 +71,4 @@ class DownloadItem : public gin_helper::TrackableObject<DownloadItem>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_global_shortcut.h"
|
||||
#include "shell/browser/api/electron_api_global_shortcut.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/browser/api/atom_api_system_preferences.h"
|
||||
#include "shell/browser/api/electron_api_system_preferences.h"
|
||||
#include "shell/common/gin_converters/accelerator_converter.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -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_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -55,4 +55,4 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
|
@ -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/browser/api/atom_api_in_app_purchase.h"
|
||||
#include "shell/browser/api/electron_api_in_app_purchase.h"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
|
@ -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_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -49,4 +49,4 @@ class InAppPurchase : public gin_helper::EventEmitter<InAppPurchase>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
|
@ -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/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
@ -28,7 +28,7 @@ namespace electron {
|
|||
|
||||
namespace api {
|
||||
|
||||
Menu::Menu(gin::Arguments* args) : model_(new AtomMenuModel(this)) {
|
||||
Menu::Menu(gin::Arguments* args) : model_(new ElectronMenuModel(this)) {
|
||||
InitWithArgs(args);
|
||||
model_->AddObserver(this);
|
||||
}
|
|
@ -2,16 +2,16 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "gin/arguments.h"
|
||||
#include "shell/browser/api/atom_api_top_level_window.h"
|
||||
#include "shell/browser/ui/atom_menu_model.h"
|
||||
#include "shell/browser/api/electron_api_top_level_window.h"
|
||||
#include "shell/browser/ui/electron_menu_model.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -19,8 +19,8 @@ namespace electron {
|
|||
namespace api {
|
||||
|
||||
class Menu : public gin_helper::TrackableObject<Menu>,
|
||||
public AtomMenuModel::Delegate,
|
||||
public AtomMenuModel::Observer {
|
||||
public ElectronMenuModel::Delegate,
|
||||
public ElectronMenuModel::Observer {
|
||||
public:
|
||||
static gin_helper::WrappableBase* New(gin::Arguments* args);
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Menu : public gin_helper::TrackableObject<Menu>,
|
|||
static void SendActionToFirstResponder(const std::string& action);
|
||||
#endif
|
||||
|
||||
AtomMenuModel* model() const { return model_.get(); }
|
||||
ElectronMenuModel* model() const { return model_.get(); }
|
||||
|
||||
protected:
|
||||
explicit Menu(gin::Arguments* args);
|
||||
|
@ -64,7 +64,7 @@ class Menu : public gin_helper::TrackableObject<Menu>,
|
|||
base::OnceClosure callback) = 0;
|
||||
virtual void ClosePopupAt(int32_t window_id) = 0;
|
||||
|
||||
std::unique_ptr<AtomMenuModel> model_;
|
||||
std::unique_ptr<ElectronMenuModel> model_;
|
||||
Menu* parent_ = nullptr;
|
||||
|
||||
// Observable:
|
||||
|
@ -130,10 +130,10 @@ class Menu : public gin_helper::TrackableObject<Menu>,
|
|||
namespace gin {
|
||||
|
||||
template <>
|
||||
struct Converter<electron::AtomMenuModel*> {
|
||||
struct Converter<electron::ElectronMenuModel*> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
electron::AtomMenuModel** out) {
|
||||
electron::ElectronMenuModel** out) {
|
||||
// null would be tranfered to NULL.
|
||||
if (val->IsNull()) {
|
||||
*out = nullptr;
|
||||
|
@ -150,4 +150,4 @@ struct Converter<electron::AtomMenuModel*> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
|
@ -2,15 +2,15 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
|
||||
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#import "shell/browser/ui/cocoa/atom_menu_controller.h"
|
||||
#import "shell/browser/ui/cocoa/electron_menu_controller.h"
|
||||
|
||||
using base::scoped_nsobject;
|
||||
|
||||
|
@ -42,10 +42,10 @@ class MenuMac : public Menu {
|
|||
|
||||
void OnClosed(int32_t window_id, base::OnceClosure callback);
|
||||
|
||||
scoped_nsobject<AtomMenuController> menu_controller_;
|
||||
scoped_nsobject<ElectronMenuController> menu_controller_;
|
||||
|
||||
// window ID -> open context menu
|
||||
std::map<int32_t, scoped_nsobject<AtomMenuController>> popup_controllers_;
|
||||
std::map<int32_t, scoped_nsobject<ElectronMenuController>> popup_controllers_;
|
||||
|
||||
base::WeakPtrFactory<MenuMac> weak_factory_;
|
||||
|
||||
|
@ -56,4 +56,4 @@ class MenuMac : public Menu {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
|
|
@ -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/api/atom_api_menu_mac.h"
|
||||
#import "shell/browser/api/electron_api_menu_mac.h"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -67,9 +67,9 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
|||
base::OnceClosure close_callback =
|
||||
base::BindOnce(&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id,
|
||||
std::move(callback));
|
||||
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>(
|
||||
[[AtomMenuController alloc] initWithModel:model()
|
||||
useDefaultAccelerator:NO]);
|
||||
popup_controllers_[window_id] = base::scoped_nsobject<ElectronMenuController>(
|
||||
[[ElectronMenuController alloc] initWithModel:model()
|
||||
useDefaultAccelerator:NO]);
|
||||
NSMenu* menu = [popup_controllers_[window_id] menu];
|
||||
NSView* view = [nswindow contentView];
|
||||
|
||||
|
@ -150,9 +150,9 @@ void MenuMac::OnClosed(int32_t window_id, base::OnceClosure callback) {
|
|||
// static
|
||||
void Menu::SetApplicationMenu(Menu* base_menu) {
|
||||
MenuMac* menu = static_cast<MenuMac*>(base_menu);
|
||||
base::scoped_nsobject<AtomMenuController> menu_controller(
|
||||
[[AtomMenuController alloc] initWithModel:menu->model_.get()
|
||||
useDefaultAccelerator:YES]);
|
||||
base::scoped_nsobject<ElectronMenuController> menu_controller(
|
||||
[[ElectronMenuController alloc] initWithModel:menu->model_.get()
|
||||
useDefaultAccelerator:YES]);
|
||||
|
||||
NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];
|
||||
[currentRunLoop cancelPerformSelector:@selector(setMainMenu:)
|
|
@ -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/browser/api/atom_api_menu_views.h"
|
||||
#include "shell/browser/api/electron_api_menu_views.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/views/controls/menu/menu_runner.h"
|
||||
|
||||
|
@ -45,4 +45,4 @@ class MenuViews : public Menu {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
|
@ -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/browser/api/atom_api_native_theme.h"
|
||||
#include "shell/browser/api/electron_api_native_theme.h"
|
||||
|
||||
#include <string>
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||
|
||||
#include "shell/common/gin_helper/event_emitter.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
@ -62,4 +62,4 @@ struct Converter<ui::NativeTheme::ThemeSource> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
|
@ -2,10 +2,10 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_native_theme.h"
|
||||
#include "shell/browser/api/electron_api_native_theme.h"
|
||||
|
||||
#include "base/mac/sdk_forward_declarations.h"
|
||||
#include "shell/browser/mac/atom_application.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
|
||||
namespace electron {
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_net.h"
|
||||
#include "shell/browser/api/electron_api_net.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gin/handle.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "shell/browser/api/atom_api_url_loader.h"
|
||||
#include "shell/browser/api/electron_api_url_loader.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_NET_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NET_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
||||
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
|
||||
|
@ -32,4 +32,4 @@ class Net : public gin_helper::Wrappable<Net> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NET_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
|
@ -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/browser/api/atom_api_net_log.h"
|
||||
#include "shell/browser/api/electron_api_net_log.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include "components/net_log/chrome_net_log.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "electron/electron_version.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/net/system_network_context_manager.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -75,7 +75,7 @@ void ResolvePromiseWithNetError(gin_helper::Promise<void> promise,
|
|||
|
||||
namespace api {
|
||||
|
||||
NetLog::NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
NetLog::NetLog(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context), weak_ptr_factory_(this) {
|
||||
Init(isolate);
|
||||
file_task_runner_ = CreateFileTaskRunner();
|
||||
|
@ -213,7 +213,7 @@ v8::Local<v8::Promise> NetLog::StopLogging(gin_helper::Arguments* args) {
|
|||
|
||||
// static
|
||||
gin::Handle<NetLog> NetLog::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new NetLog(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
@ -19,14 +19,14 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
class NetLog : public gin_helper::TrackableObject<NetLog> {
|
||||
public:
|
||||
static gin::Handle<NetLog> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
@ -37,7 +37,8 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
bool IsCurrentlyLogging() const;
|
||||
|
||||
protected:
|
||||
explicit NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
explicit NetLog(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
~NetLog() override;
|
||||
|
||||
void OnConnectionError();
|
||||
|
@ -49,7 +50,7 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
void NetLogStarted(int32_t error);
|
||||
|
||||
private:
|
||||
AtomBrowserContext* browser_context_;
|
||||
ElectronBrowserContext* browser_context_;
|
||||
|
||||
network::mojom::NetLogExporterPtr net_log_exporter_;
|
||||
|
||||
|
@ -66,4 +67,4 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
|
@ -2,13 +2,13 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_notification.h"
|
||||
#include "shell/browser/api/electron_api_notification.h"
|
||||
|
||||
#include "base/guid.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
#include "shell/common/gin_converters/image_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
|
@ -51,7 +51,7 @@ namespace api {
|
|||
Notification::Notification(gin::Arguments* args) {
|
||||
InitWithArgs(args);
|
||||
|
||||
presenter_ = static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
presenter_ = static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->GetNotificationPresenter();
|
||||
|
||||
gin::Dictionary opts(nullptr);
|
||||
|
@ -236,7 +236,7 @@ void Notification::Show() {
|
|||
}
|
||||
|
||||
bool Notification::IsSupported() {
|
||||
return !!static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
return !!static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->GetNotificationPresenter();
|
||||
}
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -103,4 +103,4 @@ class Notification : public gin_helper::TrackableObject<Notification>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
|
@ -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/browser/api/atom_api_power_monitor.h"
|
||||
#include "shell/browser/api/electron_api_power_monitor.h"
|
||||
|
||||
#include "base/power_monitor/power_monitor.h"
|
||||
#include "base/power_monitor/power_monitor_device_source.h"
|
|
@ -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_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "shell/browser/lib/power_observer.h"
|
||||
|
@ -77,4 +77,4 @@ class PowerMonitor : public gin_helper::TrackableObject<PowerMonitor>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
|
@ -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/browser/api/atom_api_power_monitor.h"
|
||||
#include "shell/browser/api/electron_api_power_monitor.h"
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -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/browser/api/atom_api_power_monitor.h"
|
||||
#include "shell/browser/api/electron_api_power_monitor.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <wtsapi32.h>
|
|
@ -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/browser/api/atom_api_power_save_blocker.h"
|
||||
#include "shell/browser/api/electron_api_power_save_blocker.h"
|
||||
|
||||
#include <string>
|
||||
|
|
@ -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_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -59,4 +59,4 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
|
@ -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/browser/api/atom_api_protocol.h"
|
||||
#include "shell/browser/api/electron_api_protocol.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
@ -10,8 +10,8 @@
|
|||
|
||||
#include "base/stl_util.h"
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -160,7 +160,8 @@ std::string ErrorCodeToString(ProtocolError error) {
|
|||
|
||||
} // namespace
|
||||
|
||||
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context) {
|
||||
Protocol::Protocol(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
Init(isolate);
|
||||
AttachAsUserData(browser_context);
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ Protocol::~Protocol() = default;
|
|||
void Protocol::RegisterURLLoaderFactories(
|
||||
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories) {
|
||||
for (const auto& it : handlers_) {
|
||||
factories->emplace(it.first, std::make_unique<AtomURLLoaderFactory>(
|
||||
factories->emplace(it.first, std::make_unique<ElectronURLLoaderFactory>(
|
||||
it.second.first, it.second.second));
|
||||
}
|
||||
}
|
||||
|
@ -253,8 +254,9 @@ void Protocol::HandleOptionalCallback(gin::Arguments* args,
|
|||
}
|
||||
|
||||
// static
|
||||
gin::Handle<Protocol> Protocol::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
gin::Handle<Protocol> Protocol::Create(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new Protocol(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -2,21 +2,21 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/net/atom_url_loader_factory.h"
|
||||
#include "shell/browser/net/electron_url_loader_factory.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
|
@ -38,19 +38,19 @@ enum class ProtocolError {
|
|||
class Protocol : public gin_helper::TrackableObject<Protocol> {
|
||||
public:
|
||||
static gin::Handle<Protocol> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
// Used by AtomBrowserClient for creating URLLoaderFactory.
|
||||
// Used by ElectronBrowserClient for creating URLLoaderFactory.
|
||||
void RegisterURLLoaderFactories(
|
||||
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories);
|
||||
|
||||
const HandlersMap& intercept_handlers() const { return intercept_handlers_; }
|
||||
|
||||
private:
|
||||
Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Protocol(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Protocol() override;
|
||||
|
||||
// Callback types.
|
||||
|
@ -99,4 +99,4 @@ class Protocol : public gin_helper::TrackableObject<Protocol> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
|
@ -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/browser/api/atom_api_screen.h"
|
||||
#include "shell/browser/api/electron_api_screen.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
|
@ -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_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -56,4 +56,4 @@ class Screen : public gin_helper::EventEmitter<Screen>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
|
@ -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/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
@ -40,16 +40,16 @@
|
|||
#include "net/http/http_cache.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "shell/browser/api/atom_api_cookies.h"
|
||||
#include "shell/browser/api/atom_api_data_pipe_holder.h"
|
||||
#include "shell/browser/api/atom_api_download_item.h"
|
||||
#include "shell/browser/api/atom_api_net_log.h"
|
||||
#include "shell/browser/api/atom_api_protocol.h"
|
||||
#include "shell/browser/api/atom_api_web_request.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/atom_browser_main_parts.h"
|
||||
#include "shell/browser/atom_permission_manager.h"
|
||||
#include "shell/browser/api/electron_api_cookies.h"
|
||||
#include "shell/browser/api/electron_api_data_pipe_holder.h"
|
||||
#include "shell/browser/api/electron_api_download_item.h"
|
||||
#include "shell/browser/api/electron_api_net_log.h"
|
||||
#include "shell/browser/api/electron_api_protocol.h"
|
||||
#include "shell/browser/api/electron_api_web_request.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_permission_manager.h"
|
||||
#include "shell/browser/media/media_device_id_salt.h"
|
||||
#include "shell/browser/net/cert_verifier_client.h"
|
||||
#include "shell/browser/session_preferences.h"
|
||||
|
@ -228,7 +228,7 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
|
|||
|
||||
} // namespace
|
||||
|
||||
Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: network_emulation_token_(base::UnguessableToken::Create()),
|
||||
browser_context_(browser_context) {
|
||||
// Observe DownloadManager to get download notifications.
|
||||
|
@ -454,23 +454,23 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
|
|||
|
||||
void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val,
|
||||
gin_helper::Arguments* args) {
|
||||
auto* permission_manager = static_cast<AtomPermissionManager*>(
|
||||
auto* permission_manager = static_cast<ElectronPermissionManager*>(
|
||||
browser_context()->GetPermissionControllerDelegate());
|
||||
if (val->IsNull()) {
|
||||
permission_manager->SetPermissionRequestHandler(
|
||||
AtomPermissionManager::RequestHandler());
|
||||
ElectronPermissionManager::RequestHandler());
|
||||
return;
|
||||
}
|
||||
auto handler = std::make_unique<AtomPermissionManager::RequestHandler>();
|
||||
auto handler = std::make_unique<ElectronPermissionManager::RequestHandler>();
|
||||
if (!gin::ConvertFromV8(args->isolate(), val, handler.get())) {
|
||||
args->ThrowError("Must pass null or function");
|
||||
return;
|
||||
}
|
||||
permission_manager->SetPermissionRequestHandler(base::BindRepeating(
|
||||
[](AtomPermissionManager::RequestHandler* handler,
|
||||
[](ElectronPermissionManager::RequestHandler* handler,
|
||||
content::WebContents* web_contents,
|
||||
content::PermissionType permission_type,
|
||||
AtomPermissionManager::StatusCallback callback,
|
||||
ElectronPermissionManager::StatusCallback callback,
|
||||
const base::Value& details) {
|
||||
handler->Run(web_contents, permission_type,
|
||||
base::AdaptCallbackForRepeating(std::move(callback)),
|
||||
|
@ -481,12 +481,12 @@ void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val,
|
|||
|
||||
void Session::SetPermissionCheckHandler(v8::Local<v8::Value> val,
|
||||
gin_helper::Arguments* args) {
|
||||
AtomPermissionManager::CheckHandler handler;
|
||||
ElectronPermissionManager::CheckHandler handler;
|
||||
if (!(val->IsNull() || gin::ConvertFromV8(args->isolate(), val, &handler))) {
|
||||
args->ThrowError("Must pass null or function");
|
||||
return;
|
||||
}
|
||||
auto* permission_manager = static_cast<AtomPermissionManager*>(
|
||||
auto* permission_manager = static_cast<ElectronPermissionManager*>(
|
||||
browser_context()->GetPermissionControllerDelegate());
|
||||
permission_manager->SetPermissionCheckHandler(handler);
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ v8::Local<v8::Value> Session::NetLog(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
static void StartPreconnectOnUI(
|
||||
scoped_refptr<AtomBrowserContext> browser_context,
|
||||
scoped_refptr<ElectronBrowserContext> browser_context,
|
||||
const GURL& url,
|
||||
int num_sockets_to_preconnect) {
|
||||
std::vector<predictors::PreconnectRequest> requests = {
|
||||
|
@ -782,8 +782,9 @@ bool Session::AddWordToSpellCheckerDictionary(const std::string& word) {
|
|||
#endif
|
||||
|
||||
// static
|
||||
gin::Handle<Session> Session::CreateFrom(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
gin::Handle<Session> Session::CreateFrom(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
auto* existing = TrackableObject::FromWrappedClass(isolate, browser_context);
|
||||
if (existing)
|
||||
return gin::CreateHandle(isolate, static_cast<Session*>(existing));
|
||||
|
@ -803,16 +804,18 @@ gin::Handle<Session> Session::CreateFrom(v8::Isolate* isolate,
|
|||
gin::Handle<Session> Session::FromPartition(v8::Isolate* isolate,
|
||||
const std::string& partition,
|
||||
base::DictionaryValue options) {
|
||||
scoped_refptr<AtomBrowserContext> browser_context;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context;
|
||||
if (partition.empty()) {
|
||||
browser_context = AtomBrowserContext::From("", false, std::move(options));
|
||||
browser_context =
|
||||
ElectronBrowserContext::From("", false, std::move(options));
|
||||
} else if (base::StartsWith(partition, kPersistPrefix,
|
||||
base::CompareCase::SENSITIVE)) {
|
||||
std::string name = partition.substr(8);
|
||||
browser_context = AtomBrowserContext::From(name, false, std::move(options));
|
||||
browser_context =
|
||||
ElectronBrowserContext::From(name, false, std::move(options));
|
||||
} else {
|
||||
browser_context =
|
||||
AtomBrowserContext::From(partition, true, std::move(options));
|
||||
ElectronBrowserContext::From(partition, true, std::move(options));
|
||||
}
|
||||
return CreateFrom(isolate, browser_context.get());
|
||||
}
|
|
@ -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_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -32,7 +32,7 @@ class ProxyConfig;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
|
@ -40,8 +40,9 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
public content::DownloadManager::Observer {
|
||||
public:
|
||||
// Gets or creates Session from the |browser_context|.
|
||||
static gin::Handle<Session> CreateFrom(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
static gin::Handle<Session> CreateFrom(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// Gets the Session of |partition|.
|
||||
static gin::Handle<Session> FromPartition(
|
||||
|
@ -49,7 +50,9 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
const std::string& partition,
|
||||
base::DictionaryValue options = base::DictionaryValue());
|
||||
|
||||
AtomBrowserContext* browser_context() const { return browser_context_.get(); }
|
||||
ElectronBrowserContext* browser_context() const {
|
||||
return browser_context_.get();
|
||||
}
|
||||
|
||||
// gin_helper::TrackableObject:
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
|
@ -103,7 +106,7 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
#endif
|
||||
|
||||
protected:
|
||||
Session(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Session() override;
|
||||
|
||||
// content::DownloadManager::Observer:
|
||||
|
@ -122,7 +125,7 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
// The client id to enable the network throttler.
|
||||
base::UnguessableToken network_emulation_token_;
|
||||
|
||||
scoped_refptr<AtomBrowserContext> browser_context_;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Session);
|
||||
};
|
||||
|
@ -131,4 +134,4 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
|
@ -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/browser/api/atom_api_system_preferences.h"
|
||||
#include "shell/browser/api/electron_api_system_preferences.h"
|
||||
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
|
@ -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_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -165,4 +165,4 @@ class SystemPreferences : public gin_helper::EventEmitter<SystemPreferences>
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
|
@ -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/browser/api/atom_api_system_preferences.h"
|
||||
#include "shell/browser/api/electron_api_system_preferences.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -23,8 +23,8 @@
|
|||
#include "base/values.h"
|
||||
#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"
|
||||
#include "net/base/mac/url_conversions.h"
|
||||
#include "shell/browser/mac/atom_application.h"
|
||||
#include "shell/browser/mac/dict_util.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
#include "shell/browser/ui/cocoa/NSColor+Hex.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
|
@ -5,7 +5,7 @@
|
|||
#include <dwmapi.h>
|
||||
#include <iomanip>
|
||||
|
||||
#include "shell/browser/api/atom_api_system_preferences.h"
|
||||
#include "shell/browser/api/electron_api_system_preferences.h"
|
||||
|
||||
#include "base/win/wrapped_window_proc.h"
|
||||
#include "shell/common/color_util.h"
|
|
@ -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/browser/api/atom_api_top_level_window.h"
|
||||
#include "shell/browser/api/electron_api_top_level_window.h"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -10,10 +10,10 @@
|
|||
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "shell/browser/api/atom_api_browser_view.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_browser_view.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/common/color_util.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
|
@ -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_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -16,7 +16,7 @@
|
|||
#include "gin/handle.h"
|
||||
#include "shell/browser/native_window.h"
|
||||
#include "shell/browser/native_window_observer.h"
|
||||
#include "shell/common/api/atom_api_native_image.h"
|
||||
#include "shell/common/api/electron_api_native_image.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -266,4 +266,4 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_tray.h"
|
||||
#include "shell/browser/api/electron_api_tray.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/common/api/atom_api_native_image.h"
|
||||
#include "shell/common/api/electron_api_native_image.h"
|
||||
#include "shell/common/gin_converters/gfx_converter.h"
|
||||
#include "shell/common/gin_converters/guid_converter.h"
|
||||
#include "shell/common/gin_converters/image_converter.h"
|
|
@ -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_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -98,4 +98,4 @@ class Tray : public gin_helper::TrackableObject<Tray>, public TrayIconObserver {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
|
@ -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/browser/api/atom_api_url_loader.h"
|
||||
#include "shell/browser/api/electron_api_url_loader.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
@ -20,8 +20,8 @@
|
|||
#include "services/network/public/cpp/simple_url_loader.h"
|
||||
#include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h"
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
|
@ -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_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -90,4 +90,4 @@ class SimpleURLLoaderWrapper
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
|
@ -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/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
|
@ -2,15 +2,15 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/api/views/atom_api_layout_manager.h"
|
||||
#include "shell/browser/api/views/electron_api_layout_manager.h"
|
||||
#include "ui/views/view.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -71,4 +71,4 @@ struct Converter<views::View*> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
|
@ -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/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
@ -47,17 +47,17 @@
|
|||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "mojo/public/cpp/system/platform_handle.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "shell/browser/api/atom_api_browser_window.h"
|
||||
#include "shell/browser/api/atom_api_debugger.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/atom_autofill_driver_factory.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/atom_browser_main_parts.h"
|
||||
#include "shell/browser/atom_javascript_dialog_manager.h"
|
||||
#include "shell/browser/atom_navigation_throttle.h"
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_debugger.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/child_web_contents_tracker.h"
|
||||
#include "shell/browser/electron_autofill_driver_factory.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_javascript_dialog_manager.h"
|
||||
#include "shell/browser/electron_navigation_throttle.h"
|
||||
#include "shell/browser/lib/bluetooth_chooser.h"
|
||||
#include "shell/browser/native_window.h"
|
||||
#include "shell/browser/session_preferences.h"
|
||||
|
@ -68,7 +68,7 @@
|
|||
#include "shell/browser/web_contents_preferences.h"
|
||||
#include "shell/browser/web_contents_zoom_controller.h"
|
||||
#include "shell/browser/web_view_guest_delegate.h"
|
||||
#include "shell/common/api/atom_api_native_image.h"
|
||||
#include "shell/common/api/electron_api_native_image.h"
|
||||
#include "shell/common/color_util.h"
|
||||
#include "shell/common/gin_converters/blink_converter.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
|
@ -882,7 +882,7 @@ std::unique_ptr<content::BluetoothChooser> WebContents::RunBluetoothChooser(
|
|||
content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
|
||||
content::WebContents* source) {
|
||||
if (!dialog_manager_)
|
||||
dialog_manager_ = std::make_unique<AtomJavaScriptDialogManager>(this);
|
||||
dialog_manager_ = std::make_unique<ElectronJavaScriptDialogManager>(this);
|
||||
|
||||
return dialog_manager_.get();
|
||||
}
|
||||
|
@ -1500,17 +1500,17 @@ void WebContents::Stop() {
|
|||
}
|
||||
|
||||
void WebContents::GoBack() {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoBack();
|
||||
}
|
||||
|
||||
void WebContents::GoForward() {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoForward();
|
||||
}
|
||||
|
||||
void WebContents::GoToOffset(int offset) {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoToOffset(offset);
|
||||
}
|
||||
|
||||
|
@ -2687,8 +2687,9 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetProperty("debugger", &WebContents::Debugger);
|
||||
}
|
||||
|
||||
AtomBrowserContext* WebContents::GetBrowserContext() const {
|
||||
return static_cast<AtomBrowserContext*>(web_contents()->GetBrowserContext());
|
||||
ElectronBrowserContext* WebContents::GetBrowserContext() const {
|
||||
return static_cast<ElectronBrowserContext*>(
|
||||
web_contents()->GetBrowserContext());
|
||||
}
|
||||
|
||||
// static
|
|
@ -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_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -60,8 +60,8 @@ class ResourceRequestBody;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class AtomJavaScriptDialogManager;
|
||||
class ElectronBrowserContext;
|
||||
class ElectronJavaScriptDialogManager;
|
||||
class InspectableWebContents;
|
||||
class WebContentsZoomController;
|
||||
class WebViewGuestDelegate;
|
||||
|
@ -497,7 +497,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
void DevToolsClosed() override;
|
||||
|
||||
private:
|
||||
AtomBrowserContext* GetBrowserContext() const;
|
||||
ElectronBrowserContext* GetBrowserContext() const;
|
||||
|
||||
// Binds the given request for the ElectronBrowser API. When the
|
||||
// RenderFrameHost is destroyed, all related bindings will be removed.
|
||||
|
@ -556,7 +556,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
v8::Global<v8::Value> devtools_web_contents_;
|
||||
v8::Global<v8::Value> debugger_;
|
||||
|
||||
std::unique_ptr<AtomJavaScriptDialogManager> dialog_manager_;
|
||||
std::unique_ptr<ElectronJavaScriptDialogManager> dialog_manager_;
|
||||
std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
|
||||
std::unique_ptr<FrameSubscriber> frame_subscriber_;
|
||||
|
||||
|
@ -603,4 +603,4 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
|
@ -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/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
|
||||
#include "content/browser/frame_host/frame_tree.h" // nogncheck
|
||||
#include "content/browser/frame_host/frame_tree_node.h" // nogncheck
|
|
@ -3,7 +3,7 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_web_contents_view.h"
|
||||
#include "shell/browser/api/electron_api_web_contents_view.h"
|
||||
|
||||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_view.h"
|
||||
#include "shell/common/gin_helper/constructor.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -45,4 +45,4 @@ class WebContentsView : public View, public content::WebContentsObserver {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
|
@ -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/browser/api/atom_api_web_request.h"
|
||||
#include "shell/browser/api/electron_api_web_request.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -13,9 +13,9 @@
|
|||
#include "gin/converter.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
||||
|
@ -479,8 +479,8 @@ gin::Handle<WebRequest> WebRequest::FromOrCreate(
|
|||
if (handle.IsEmpty()) {
|
||||
// Make sure the |Session| object has the |webRequest| property created.
|
||||
v8::Local<v8::Value> web_request =
|
||||
Session::CreateFrom(isolate,
|
||||
static_cast<AtomBrowserContext*>(browser_context))
|
||||
Session::CreateFrom(
|
||||
isolate, static_cast<ElectronBrowserContext*>(browser_context))
|
||||
->WebRequest(isolate);
|
||||
gin::ConvertFromV8(isolate, web_request, &handle);
|
||||
}
|
|
@ -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_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@ -155,4 +155,4 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
|
@ -10,7 +10,7 @@
|
|||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/views/atom_api_box_layout.h"
|
||||
#include "shell/browser/api/views/electron_api_box_layout.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "shell/common/gin_helper/constructor.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/node_includes.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
|
||||
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/api/views/atom_api_layout_manager.h"
|
||||
#include "shell/browser/api/views/electron_api_layout_manager.h"
|
||||
#include "ui/views/layout/box_layout.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -38,4 +38,4 @@ class BoxLayout : public LayoutManager {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
|
|
@ -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/browser/api/views/atom_api_button.h"
|
||||
#include "shell/browser/api/views/electron_api_button.h"
|
||||
|
||||
#include "shell/common/gin_helper/constructor.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
|
||||
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "ui/views/controls/button/button.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -37,4 +37,4 @@ class Button : public View, public views::ButtonListener {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
|
|
@ -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/browser/api/views/atom_api_label_button.h"
|
||||
#include "shell/browser/api/views/electron_api_label_button.h"
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/common/gin_helper/constructor.h"
|
|
@ -2,12 +2,12 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "shell/browser/api/views/atom_api_button.h"
|
||||
#include "shell/browser/api/views/electron_api_button.h"
|
||||
#include "ui/views/controls/button/label_button.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -44,4 +44,4 @@ class LabelButton : public Button {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
|
|
@ -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/browser/api/views/atom_api_layout_manager.h"
|
||||
#include "shell/browser/api/views/electron_api_layout_manager.h"
|
||||
|
||||
#include "shell/common/gin_helper/constructor.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -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_BROWSER_API_VIEWS_ATOM_API_LAYOUT_MANAGER_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_LAYOUT_MANAGER_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_LAYOUT_MANAGER_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_LAYOUT_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -41,4 +41,4 @@ class LayoutManager : public gin_helper::TrackableObject<LayoutManager> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_LAYOUT_MANAGER_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_LAYOUT_MANAGER_H_
|
|
@ -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/browser/api/views/atom_api_md_text_button.h"
|
||||
#include "shell/browser/api/views/electron_api_md_text_button.h"
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/common/gin_helper/constructor.h"
|
|
@ -2,12 +2,12 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_MD_TEXT_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_MD_TEXT_BUTTON_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_MD_TEXT_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_MD_TEXT_BUTTON_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "shell/browser/api/views/atom_api_label_button.h"
|
||||
#include "shell/browser/api/views/electron_api_label_button.h"
|
||||
#include "ui/views/controls/button/md_text_button.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -38,4 +38,4 @@ class MdTextButton : public LabelButton {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_MD_TEXT_BUTTON_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_MD_TEXT_BUTTON_H_
|
|
@ -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/browser/api/views/atom_api_resize_area.h"
|
||||
#include "shell/browser/api/views/electron_api_resize_area.h"
|
||||
|
||||
#include "shell/common/gin_helper/constructor.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_RESIZE_AREA_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_RESIZE_AREA_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_RESIZE_AREA_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_RESIZE_AREA_H_
|
||||
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "ui/views/controls/resize_area.h"
|
||||
#include "ui/views/controls/resize_area_delegate.h"
|
||||
|
||||
|
@ -40,4 +40,4 @@ class ResizeArea : public View, protected views::ResizeAreaDelegate {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_RESIZE_AREA_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_RESIZE_AREA_H_
|
|
@ -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/browser/api/views/atom_api_text_field.h"
|
||||
#include "shell/browser/api/views/electron_api_text_field.h"
|
||||
|
||||
#include "shell/common/gin_helper/constructor.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_TEXT_FIELD_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_TEXT_FIELD_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_TEXT_FIELD_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_TEXT_FIELD_H_
|
||||
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "ui/views/controls/textfield/textfield.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -39,4 +39,4 @@ class TextField : public View {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_TEXT_FIELD_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_TEXT_FIELD_H_
|
Loading…
Add table
Add a link
Reference in a new issue