refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)
This commit is contained in:
parent
2a2a1a834c
commit
65a980c673
231 changed files with 918 additions and 576 deletions
|
@ -9,7 +9,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "net/cert/nss_cert_database.h"
|
#include "net/cert/nss_cert_database.h"
|
||||||
|
|
||||||
|
@ -31,6 +30,10 @@ class CertificateManagerModel {
|
||||||
static void Create(content::BrowserContext* browser_context,
|
static void Create(content::BrowserContext* browser_context,
|
||||||
CreationCallback callback);
|
CreationCallback callback);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
CertificateManagerModel(const CertificateManagerModel&) = delete;
|
||||||
|
CertificateManagerModel& operator=(const CertificateManagerModel&) = delete;
|
||||||
|
|
||||||
~CertificateManagerModel();
|
~CertificateManagerModel();
|
||||||
|
|
||||||
bool is_user_db_available() const { return is_user_db_available_; }
|
bool is_user_db_available() const { return is_user_db_available_; }
|
||||||
|
@ -108,8 +111,6 @@ class CertificateManagerModel {
|
||||||
// Whether the certificate database has a public slot associated with the
|
// Whether the certificate database has a public slot associated with the
|
||||||
// profile. If not set, importing certificates is not allowed with this model.
|
// profile. If not set, importing certificates is not allowed with this model.
|
||||||
bool is_user_db_available_;
|
bool is_user_db_available_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
|
#endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
|
||||||
|
|
|
@ -17,6 +17,10 @@ class ElectronContentClient : public content::ContentClient {
|
||||||
ElectronContentClient();
|
ElectronContentClient();
|
||||||
~ElectronContentClient() override;
|
~ElectronContentClient() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronContentClient(const ElectronContentClient&) = delete;
|
||||||
|
ElectronContentClient& operator=(const ElectronContentClient&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// content::ContentClient:
|
// content::ContentClient:
|
||||||
std::u16string GetLocalizedString(int message_id) override;
|
std::u16string GetLocalizedString(int message_id) override;
|
||||||
|
@ -30,9 +34,6 @@ class ElectronContentClient : public content::ContentClient {
|
||||||
void AddContentDecryptionModules(
|
void AddContentDecryptionModules(
|
||||||
std::vector<content::CdmInfo>* cdms,
|
std::vector<content::CdmInfo>* cdms,
|
||||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronContentClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "components/crash/core/app/crash_reporter_client.h"
|
#include "components/crash/core/app/crash_reporter_client.h"
|
||||||
|
@ -18,6 +17,11 @@ class ElectronCrashReporterClient : public crash_reporter::CrashReporterClient {
|
||||||
public:
|
public:
|
||||||
static void Create();
|
static void Create();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronCrashReporterClient(const ElectronCrashReporterClient&) = delete;
|
||||||
|
ElectronCrashReporterClient& operator=(const ElectronCrashReporterClient&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
static ElectronCrashReporterClient* Get();
|
static ElectronCrashReporterClient* Get();
|
||||||
void SetCollectStatsConsent(bool upload_allowed);
|
void SetCollectStatsConsent(bool upload_allowed);
|
||||||
void SetUploadUrl(const std::string& url);
|
void SetUploadUrl(const std::string& url);
|
||||||
|
@ -85,8 +89,6 @@ class ElectronCrashReporterClient : public crash_reporter::CrashReporterClient {
|
||||||
|
|
||||||
ElectronCrashReporterClient();
|
ElectronCrashReporterClient();
|
||||||
~ElectronCrashReporterClient() override;
|
~ElectronCrashReporterClient() override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronCrashReporterClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_
|
#endif // SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
#include "base/environment.h"
|
#include "base/environment.h"
|
||||||
|
#include "base/macros.h"
|
||||||
#include "base/process/launch.h"
|
#include "base/process/launch.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/win/windows_version.h"
|
#include "base/win/windows_version.h"
|
||||||
|
|
|
@ -26,6 +26,10 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
|
||||||
ElectronMainDelegate();
|
ElectronMainDelegate();
|
||||||
~ElectronMainDelegate() override;
|
~ElectronMainDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronMainDelegate(const ElectronMainDelegate&) = delete;
|
||||||
|
ElectronMainDelegate& operator=(const ElectronMainDelegate&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// content::ContentMainDelegate:
|
// content::ContentMainDelegate:
|
||||||
bool BasicStartupComplete(int* exit_code) override;
|
bool BasicStartupComplete(int* exit_code) override;
|
||||||
|
@ -58,8 +62,6 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
|
||||||
std::unique_ptr<content::ContentRendererClient> renderer_client_;
|
std::unique_ptr<content::ContentRendererClient> renderer_client_;
|
||||||
std::unique_ptr<content::ContentUtilityClient> utility_client_;
|
std::unique_ptr<content::ContentUtilityClient> utility_client_;
|
||||||
std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_;
|
std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronMainDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -22,6 +22,10 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
|
||||||
public:
|
public:
|
||||||
explicit UvTaskRunner(uv_loop_t* loop);
|
explicit UvTaskRunner(uv_loop_t* loop);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
UvTaskRunner(const UvTaskRunner&) = delete;
|
||||||
|
UvTaskRunner& operator=(const UvTaskRunner&) = delete;
|
||||||
|
|
||||||
// base::SingleThreadTaskRunner:
|
// base::SingleThreadTaskRunner:
|
||||||
bool PostDelayedTask(const base::Location& from_here,
|
bool PostDelayedTask(const base::Location& from_here,
|
||||||
base::OnceClosure task,
|
base::OnceClosure task,
|
||||||
|
@ -39,8 +43,6 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
|
||||||
uv_loop_t* loop_;
|
uv_loop_t* loop_;
|
||||||
|
|
||||||
std::map<uv_timer_t*, base::OnceClosure> tasks_;
|
std::map<uv_timer_t*, base::OnceClosure> tasks_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(UvTaskRunner);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -79,6 +79,10 @@ class App : public ElectronBrowserClient::Delegate,
|
||||||
|
|
||||||
App();
|
App();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
App(const App&) = delete;
|
||||||
|
App& operator=(const App&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~App() override;
|
~App() override;
|
||||||
|
|
||||||
|
@ -261,8 +265,6 @@ class App : public ElectronBrowserClient::Delegate,
|
||||||
|
|
||||||
bool disable_hw_acceleration_ = false;
|
bool disable_hw_acceleration_ = false;
|
||||||
bool disable_domain_blocking_for_3DAPIs_ = false;
|
bool disable_domain_blocking_for_3DAPIs_ = false;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(App);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -30,6 +30,10 @@ class AutoUpdater : public gin::Wrappable<AutoUpdater>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
AutoUpdater(const AutoUpdater&) = delete;
|
||||||
|
AutoUpdater& operator=(const AutoUpdater&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutoUpdater();
|
AutoUpdater();
|
||||||
~AutoUpdater() override;
|
~AutoUpdater() override;
|
||||||
|
@ -54,8 +58,6 @@ class AutoUpdater : public gin::Wrappable<AutoUpdater>,
|
||||||
std::string GetFeedURL();
|
std::string GetFeedURL();
|
||||||
void SetFeedURL(gin::Arguments* args);
|
void SetFeedURL(gin::Arguments* args);
|
||||||
void QuitAndInstall();
|
void QuitAndInstall();
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(AutoUpdater);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -54,6 +54,10 @@ class BrowserView : public gin::Wrappable<BrowserView>,
|
||||||
|
|
||||||
int32_t ID() const { return id_; }
|
int32_t ID() const { return id_; }
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BrowserView(const BrowserView&) = delete;
|
||||||
|
BrowserView& operator=(const BrowserView&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BrowserView(gin::Arguments* args, const gin_helper::Dictionary& options);
|
BrowserView(gin::Arguments* args, const gin_helper::Dictionary& options);
|
||||||
~BrowserView() override;
|
~BrowserView() override;
|
||||||
|
@ -78,8 +82,6 @@ class BrowserView : public gin::Wrappable<BrowserView>,
|
||||||
std::unique_ptr<NativeBrowserView> view_;
|
std::unique_ptr<NativeBrowserView> view_;
|
||||||
|
|
||||||
int32_t id_;
|
int32_t id_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BrowserView);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -37,6 +37,10 @@ class BrowserWindow : public BaseWindow,
|
||||||
return weak_factory_.GetWeakPtr();
|
return weak_factory_.GetWeakPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BrowserWindow(const BrowserWindow&) = delete;
|
||||||
|
BrowserWindow& operator=(const BrowserWindow&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BrowserWindow(gin::Arguments* args, const gin_helper::Dictionary& options);
|
BrowserWindow(gin::Arguments* args, const gin_helper::Dictionary& options);
|
||||||
~BrowserWindow() override;
|
~BrowserWindow() override;
|
||||||
|
@ -123,8 +127,6 @@ class BrowserWindow : public BaseWindow,
|
||||||
base::WeakPtr<api::WebContents> api_web_contents_;
|
base::WeakPtr<api::WebContents> api_web_contents_;
|
||||||
|
|
||||||
base::WeakPtrFactory<BrowserWindow> weak_factory_{this};
|
base::WeakPtrFactory<BrowserWindow> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BrowserWindow);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -41,6 +41,10 @@ class Cookies : public gin::Wrappable<Cookies>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Cookies(const Cookies&) = delete;
|
||||||
|
Cookies& operator=(const Cookies&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||||
~Cookies() override;
|
~Cookies() override;
|
||||||
|
@ -62,8 +66,6 @@ class Cookies : public gin::Wrappable<Cookies>,
|
||||||
|
|
||||||
// Weak reference; ElectronBrowserContext is guaranteed to outlive us.
|
// Weak reference; ElectronBrowserContext is guaranteed to outlive us.
|
||||||
ElectronBrowserContext* browser_context_;
|
ElectronBrowserContext* browser_context_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Cookies);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -57,6 +57,10 @@ class DataPipeReader {
|
||||||
|
|
||||||
~DataPipeReader() = default;
|
~DataPipeReader() = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
DataPipeReader(const DataPipeReader&) = delete;
|
||||||
|
DataPipeReader& operator=(const DataPipeReader&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Callback invoked by DataPipeGetter::Read.
|
// Callback invoked by DataPipeGetter::Read.
|
||||||
void ReadCallback(int32_t status, uint64_t size) {
|
void ReadCallback(int32_t status, uint64_t size) {
|
||||||
|
@ -137,8 +141,6 @@ class DataPipeReader {
|
||||||
uint64_t remaining_size_ = 0;
|
uint64_t remaining_size_ = 0;
|
||||||
|
|
||||||
base::WeakPtrFactory<DataPipeReader> weak_factory_{this};
|
base::WeakPtrFactory<DataPipeReader> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(DataPipeReader);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -37,14 +37,16 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
||||||
// The unique ID that can be used to receive the object.
|
// The unique ID that can be used to receive the object.
|
||||||
const std::string& id() const { return id_; }
|
const std::string& id() const { return id_; }
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
DataPipeHolder(const DataPipeHolder&) = delete;
|
||||||
|
DataPipeHolder& operator=(const DataPipeHolder&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DataPipeHolder(const network::DataElement& element);
|
explicit DataPipeHolder(const network::DataElement& element);
|
||||||
~DataPipeHolder() override;
|
~DataPipeHolder() override;
|
||||||
|
|
||||||
std::string id_;
|
std::string id_;
|
||||||
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_;
|
mojo::Remote<network::mojom::DataPipeGetter> data_pipe_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(DataPipeHolder);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -40,6 +40,10 @@ class Debugger : public gin::Wrappable<Debugger>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Debugger(const Debugger&) = delete;
|
||||||
|
Debugger& operator=(const Debugger&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Debugger(v8::Isolate* isolate, content::WebContents* web_contents);
|
Debugger(v8::Isolate* isolate, content::WebContents* web_contents);
|
||||||
~Debugger() override;
|
~Debugger() override;
|
||||||
|
@ -68,8 +72,6 @@ class Debugger : public gin::Wrappable<Debugger>,
|
||||||
|
|
||||||
PendingRequestMap pending_requests_;
|
PendingRequestMap pending_requests_;
|
||||||
int previous_request_id_ = 0;
|
int previous_request_id_ = 0;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Debugger);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -45,6 +45,10 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
DesktopCapturer(const DesktopCapturer&) = delete;
|
||||||
|
DesktopCapturer& operator=(const DesktopCapturer&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit DesktopCapturer(v8::Isolate* isolate);
|
explicit DesktopCapturer(v8::Isolate* isolate);
|
||||||
~DesktopCapturer() override;
|
~DesktopCapturer() override;
|
||||||
|
@ -71,8 +75,6 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
|
||||||
#endif // defined(OS_WIN)
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
base::WeakPtrFactory<DesktopCapturer> weak_ptr_factory_{this};
|
base::WeakPtrFactory<DesktopCapturer> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(DesktopCapturer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -43,6 +43,10 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
|
||||||
base::FilePath GetSavePath() const;
|
base::FilePath GetSavePath() const;
|
||||||
file_dialog::DialogSettings GetSaveDialogOptions() const;
|
file_dialog::DialogSettings GetSaveDialogOptions() const;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
DownloadItem(const DownloadItem&) = delete;
|
||||||
|
DownloadItem& operator=(const DownloadItem&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DownloadItem(v8::Isolate* isolate, download::DownloadItem* item);
|
DownloadItem(v8::Isolate* isolate, download::DownloadItem* item);
|
||||||
~DownloadItem() override;
|
~DownloadItem() override;
|
||||||
|
@ -81,8 +85,6 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
|
||||||
v8::Isolate* isolate_;
|
v8::Isolate* isolate_;
|
||||||
|
|
||||||
base::WeakPtrFactory<DownloadItem> weak_factory_{this};
|
base::WeakPtrFactory<DownloadItem> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(DownloadItem);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -29,6 +29,10 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
GlobalShortcut(const GlobalShortcut&) = delete;
|
||||||
|
GlobalShortcut& operator=(const GlobalShortcut&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit GlobalShortcut(v8::Isolate* isolate);
|
explicit GlobalShortcut(v8::Isolate* isolate);
|
||||||
~GlobalShortcut() override;
|
~GlobalShortcut() override;
|
||||||
|
@ -50,8 +54,6 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
||||||
void OnKeyPressed(const ui::Accelerator& accelerator) override;
|
void OnKeyPressed(const ui::Accelerator& accelerator) override;
|
||||||
|
|
||||||
AcceleratorCallbackMap accelerator_callback_map_;
|
AcceleratorCallbackMap accelerator_callback_map_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(GlobalShortcut);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -32,6 +32,10 @@ class InAppPurchase : public gin::Wrappable<InAppPurchase>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
InAppPurchase(const InAppPurchase&) = delete;
|
||||||
|
InAppPurchase& operator=(const InAppPurchase&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
InAppPurchase();
|
InAppPurchase();
|
||||||
~InAppPurchase() override;
|
~InAppPurchase() override;
|
||||||
|
@ -45,9 +49,6 @@ class InAppPurchase : public gin::Wrappable<InAppPurchase>,
|
||||||
// TransactionObserver:
|
// TransactionObserver:
|
||||||
void OnTransactionsUpdated(
|
void OnTransactionsUpdated(
|
||||||
const std::vector<in_app_purchase::Transaction>& transactions) override;
|
const std::vector<in_app_purchase::Transaction>& transactions) override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(InAppPurchase);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -46,6 +46,10 @@ class Menu : public gin::Wrappable<Menu>,
|
||||||
|
|
||||||
ElectronMenuModel* model() const { return model_.get(); }
|
ElectronMenuModel* model() const { return model_.get(); }
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Menu(const Menu&) = delete;
|
||||||
|
Menu& operator=(const Menu&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit Menu(gin::Arguments* args);
|
explicit Menu(gin::Arguments* args);
|
||||||
~Menu() override;
|
~Menu() override;
|
||||||
|
@ -117,8 +121,6 @@ class Menu : public gin::Wrappable<Menu>,
|
||||||
bool IsEnabledAt(int index) const;
|
bool IsEnabledAt(int index) const;
|
||||||
bool IsVisibleAt(int index) const;
|
bool IsVisibleAt(int index) const;
|
||||||
bool WorksWhenHiddenAt(int index) const;
|
bool WorksWhenHiddenAt(int index) const;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Menu);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -48,8 +48,6 @@ class MenuMac : public Menu {
|
||||||
std::map<int32_t, scoped_nsobject<ElectronMenuController>> popup_controllers_;
|
std::map<int32_t, scoped_nsobject<ElectronMenuController>> popup_controllers_;
|
||||||
|
|
||||||
base::WeakPtrFactory<MenuMac> weak_factory_{this};
|
base::WeakPtrFactory<MenuMac> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MenuMac);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -37,8 +37,6 @@ class MenuViews : public Menu {
|
||||||
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
|
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
|
||||||
|
|
||||||
base::WeakPtrFactory<MenuViews> weak_factory_{this};
|
base::WeakPtrFactory<MenuViews> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MenuViews);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -27,6 +27,10 @@ class NativeTheme : public gin::Wrappable<NativeTheme>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NativeTheme(const NativeTheme&) = delete;
|
||||||
|
NativeTheme& operator=(const NativeTheme&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NativeTheme(v8::Isolate* isolate,
|
NativeTheme(v8::Isolate* isolate,
|
||||||
ui::NativeTheme* ui_theme,
|
ui::NativeTheme* ui_theme,
|
||||||
|
@ -50,8 +54,6 @@ class NativeTheme : public gin::Wrappable<NativeTheme>,
|
||||||
private:
|
private:
|
||||||
ui::NativeTheme* ui_theme_;
|
ui::NativeTheme* ui_theme_;
|
||||||
ui::NativeTheme* web_theme_;
|
ui::NativeTheme* web_theme_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeTheme);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
|
@ -45,6 +44,10 @@ class NetLog : public gin::Wrappable<NetLog> {
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NetLog(const NetLog&) = delete;
|
||||||
|
NetLog& operator=(const NetLog&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit NetLog(v8::Isolate* isolate,
|
explicit NetLog(v8::Isolate* isolate,
|
||||||
ElectronBrowserContext* browser_context);
|
ElectronBrowserContext* browser_context);
|
||||||
|
@ -68,8 +71,6 @@ class NetLog : public gin::Wrappable<NetLog> {
|
||||||
scoped_refptr<base::TaskRunner> file_task_runner_;
|
scoped_refptr<base::TaskRunner> file_task_runner_;
|
||||||
|
|
||||||
base::WeakPtrFactory<NetLog> weak_ptr_factory_{this};
|
base::WeakPtrFactory<NetLog> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NetLog);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -56,6 +56,10 @@ class Notification : public gin::Wrappable<Notification>,
|
||||||
// gin::Wrappable
|
// gin::Wrappable
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Notification(const Notification&) = delete;
|
||||||
|
Notification& operator=(const Notification&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit Notification(gin::Arguments* args);
|
explicit Notification(gin::Arguments* args);
|
||||||
~Notification() override;
|
~Notification() override;
|
||||||
|
@ -111,8 +115,6 @@ class Notification : public gin::Wrappable<Notification>,
|
||||||
electron::NotificationPresenter* presenter_;
|
electron::NotificationPresenter* presenter_;
|
||||||
|
|
||||||
base::WeakPtr<electron::Notification> notification_;
|
base::WeakPtr<electron::Notification> notification_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Notification);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -33,6 +33,10 @@ class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
PowerMonitor(const PowerMonitor&) = delete;
|
||||||
|
PowerMonitor& operator=(const PowerMonitor&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit PowerMonitor(v8::Isolate* isolate);
|
explicit PowerMonitor(v8::Isolate* isolate);
|
||||||
~PowerMonitor() override;
|
~PowerMonitor() override;
|
||||||
|
@ -80,8 +84,6 @@ class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
||||||
#if defined(OS_LINUX)
|
#if defined(OS_LINUX)
|
||||||
PowerObserverLinux power_observer_linux_{this};
|
PowerObserverLinux power_observer_linux_{this};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PowerMonitor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -27,6 +27,10 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
||||||
|
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
PowerSaveBlocker(const PowerSaveBlocker&) = delete;
|
||||||
|
PowerSaveBlocker& operator=(const PowerSaveBlocker&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit PowerSaveBlocker(v8::Isolate* isolate);
|
explicit PowerSaveBlocker(v8::Isolate* isolate);
|
||||||
~PowerSaveBlocker() override;
|
~PowerSaveBlocker() override;
|
||||||
|
@ -50,8 +54,6 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
||||||
WakeLockTypeMap wake_lock_types_;
|
WakeLockTypeMap wake_lock_types_;
|
||||||
|
|
||||||
mojo::Remote<device::mojom::WakeLock> wake_lock_;
|
mojo::Remote<device::mojom::WakeLock> wake_lock_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -34,6 +34,10 @@ class Screen : public gin::Wrappable<Screen>,
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Screen(const Screen&) = delete;
|
||||||
|
Screen& operator=(const Screen&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Screen(v8::Isolate* isolate, display::Screen* screen);
|
Screen(v8::Isolate* isolate, display::Screen* screen);
|
||||||
~Screen() override;
|
~Screen() override;
|
||||||
|
@ -52,8 +56,6 @@ class Screen : public gin::Wrappable<Screen>,
|
||||||
|
|
||||||
private:
|
private:
|
||||||
display::Screen* screen_;
|
display::Screen* screen_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Screen);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -43,6 +43,10 @@ class ServiceWorkerContext
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ServiceWorkerContext(const ServiceWorkerContext&) = delete;
|
||||||
|
ServiceWorkerContext& operator=(const ServiceWorkerContext&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit ServiceWorkerContext(v8::Isolate* isolate,
|
explicit ServiceWorkerContext(v8::Isolate* isolate,
|
||||||
ElectronBrowserContext* browser_context);
|
ElectronBrowserContext* browser_context);
|
||||||
|
@ -52,8 +56,6 @@ class ServiceWorkerContext
|
||||||
content::ServiceWorkerContext* service_worker_context_;
|
content::ServiceWorkerContext* service_worker_context_;
|
||||||
|
|
||||||
base::WeakPtrFactory<ServiceWorkerContext> weak_ptr_factory_{this};
|
base::WeakPtrFactory<ServiceWorkerContext> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContext);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -155,6 +155,10 @@ class Session : public gin::Wrappable<Session>,
|
||||||
extensions::UnloadedExtensionReason reason) override;
|
extensions::UnloadedExtensionReason reason) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Session(const Session&) = delete;
|
||||||
|
Session& operator=(const Session&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||||
~Session() override;
|
~Session() override;
|
||||||
|
@ -187,8 +191,6 @@ class Session : public gin::Wrappable<Session>,
|
||||||
base::UnguessableToken network_emulation_token_;
|
base::UnguessableToken network_emulation_token_;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
ElectronBrowserContext* browser_context_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Session);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -121,6 +121,10 @@ class SystemPreferences
|
||||||
bool IsHighContrastColorScheme();
|
bool IsHighContrastColorScheme();
|
||||||
v8::Local<v8::Value> GetAnimationSettings(v8::Isolate* isolate);
|
v8::Local<v8::Value> GetAnimationSettings(v8::Isolate* isolate);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
SystemPreferences(const SystemPreferences&) = delete;
|
||||||
|
SystemPreferences& operator=(const SystemPreferences&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SystemPreferences();
|
SystemPreferences();
|
||||||
~SystemPreferences() override;
|
~SystemPreferences() override;
|
||||||
|
@ -162,7 +166,6 @@ class SystemPreferences
|
||||||
|
|
||||||
std::unique_ptr<gfx::ScopedSysColorChangeListener> color_change_listener_;
|
std::unique_ptr<gfx::ScopedSysColorChangeListener> color_change_listener_;
|
||||||
#endif
|
#endif
|
||||||
DISALLOW_COPY_AND_ASSIGN(SystemPreferences);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -52,6 +52,10 @@ class Tray : public gin::Wrappable<Tray>,
|
||||||
// gin::Wrappable
|
// gin::Wrappable
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Tray(const Tray&) = delete;
|
||||||
|
Tray& operator=(const Tray&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Tray(v8::Isolate* isolate,
|
Tray(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value> image,
|
v8::Local<v8::Value> image,
|
||||||
|
@ -105,8 +109,6 @@ class Tray : public gin::Wrappable<Tray>,
|
||||||
|
|
||||||
v8::Global<v8::Value> menu_;
|
v8::Global<v8::Value> menu_;
|
||||||
std::unique_ptr<TrayIcon> tray_icon_;
|
std::unique_ptr<TrayIcon> tray_icon_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Tray);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -30,6 +30,10 @@ class View : public gin_helper::Wrappable<View> {
|
||||||
|
|
||||||
views::View* view() const { return view_; }
|
views::View* view() const { return view_; }
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
View(const View&) = delete;
|
||||||
|
View& operator=(const View&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit View(views::View* view);
|
explicit View(views::View* view);
|
||||||
View();
|
View();
|
||||||
|
@ -43,8 +47,6 @@ class View : public gin_helper::Wrappable<View> {
|
||||||
|
|
||||||
bool delete_view_ = true;
|
bool delete_view_ = true;
|
||||||
views::View* view_ = nullptr;
|
views::View* view_ = nullptr;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(View);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "base/containers/id_map.h"
|
#include "base/containers/id_map.h"
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/json/json_reader.h"
|
#include "base/json/json_reader.h"
|
||||||
|
#include "base/macros.h"
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/task/current_thread.h"
|
#include "base/task/current_thread.h"
|
||||||
|
|
|
@ -447,6 +447,10 @@ class WebContents : public ExclusiveAccessContext,
|
||||||
content::PermissionType permissionType,
|
content::PermissionType permissionType,
|
||||||
content::RenderFrameHost* render_frame_host);
|
content::RenderFrameHost* render_frame_host);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
WebContents(const WebContents&) = delete;
|
||||||
|
WebContents& operator=(const WebContents&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Does not manage lifetime of |web_contents|.
|
// Does not manage lifetime of |web_contents|.
|
||||||
WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
|
WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
|
||||||
|
@ -820,8 +824,6 @@ class WebContents : public ExclusiveAccessContext,
|
||||||
DevicePermissionMap granted_devices_;
|
DevicePermissionMap granted_devices_;
|
||||||
|
|
||||||
base::WeakPtrFactory<WebContents> weak_factory_{this};
|
base::WeakPtrFactory<WebContents> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(WebContents);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -51,8 +51,6 @@ class WebContentsView : public View, public content::WebContentsObserver {
|
||||||
// Keep a reference to v8 wrapper.
|
// Keep a reference to v8 wrapper.
|
||||||
v8::Global<v8::Value> web_contents_;
|
v8::Global<v8::Value> web_contents_;
|
||||||
api::WebContents* api_web_contents_;
|
api::WebContents* api_web_contents_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(WebContentsView);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -59,6 +59,10 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
||||||
|
|
||||||
content::RenderFrameHost* render_frame_host() const { return render_frame_; }
|
content::RenderFrameHost* render_frame_host() const { return render_frame_; }
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
WebFrameMain(const WebFrameMain&) = delete;
|
||||||
|
WebFrameMain& operator=(const WebFrameMain&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit WebFrameMain(content::RenderFrameHost* render_frame);
|
explicit WebFrameMain(content::RenderFrameHost* render_frame);
|
||||||
~WebFrameMain() override;
|
~WebFrameMain() override;
|
||||||
|
@ -124,8 +128,6 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
||||||
bool render_frame_disposed_ = false;
|
bool render_frame_disposed_ = false;
|
||||||
|
|
||||||
base::WeakPtrFactory<WebFrameMain> weak_factory_{this};
|
base::WeakPtrFactory<WebFrameMain> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(WebFrameMain);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -29,6 +29,10 @@ class Event : public gin::Wrappable<Event> {
|
||||||
// `invoke` calls.
|
// `invoke` calls.
|
||||||
bool SendReply(v8::Isolate* isolate, v8::Local<v8::Value> result);
|
bool SendReply(v8::Isolate* isolate, v8::Local<v8::Value> result);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Event(const Event&) = delete;
|
||||||
|
Event& operator=(const Event&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Event();
|
Event();
|
||||||
~Event() override;
|
~Event() override;
|
||||||
|
@ -41,8 +45,6 @@ class Event : public gin::Wrappable<Event> {
|
||||||
private:
|
private:
|
||||||
// Replyer for the synchronous messages.
|
// Replyer for the synchronous messages.
|
||||||
InvokeCallback callback_;
|
InvokeCallback callback_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Event);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gin_helper
|
} // namespace gin_helper
|
||||||
|
|
|
@ -38,6 +38,10 @@ class FrameSubscriber : public content::WebContentsObserver,
|
||||||
bool only_dirty);
|
bool only_dirty);
|
||||||
~FrameSubscriber() override;
|
~FrameSubscriber() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
FrameSubscriber(const FrameSubscriber&) = delete;
|
||||||
|
FrameSubscriber& operator=(const FrameSubscriber&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AttachToHost(content::RenderWidgetHost* host);
|
void AttachToHost(content::RenderWidgetHost* host);
|
||||||
void DetachFromHost();
|
void DetachFromHost();
|
||||||
|
@ -69,8 +73,6 @@ class FrameSubscriber : public content::WebContentsObserver,
|
||||||
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
||||||
|
|
||||||
base::WeakPtrFactory<FrameSubscriber> weak_ptr_factory_{this};
|
base::WeakPtrFactory<FrameSubscriber> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(FrameSubscriber);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -22,6 +22,11 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
||||||
|
|
||||||
GPUInfoManager();
|
GPUInfoManager();
|
||||||
~GPUInfoManager() override;
|
~GPUInfoManager() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
GPUInfoManager(const GPUInfoManager&) = delete;
|
||||||
|
GPUInfoManager& operator=(const GPUInfoManager&) = delete;
|
||||||
|
|
||||||
bool NeedsCompleteGpuInfoCollection() const;
|
bool NeedsCompleteGpuInfoCollection() const;
|
||||||
void FetchCompleteInfo(gin_helper::Promise<base::DictionaryValue> promise);
|
void FetchCompleteInfo(gin_helper::Promise<base::DictionaryValue> promise);
|
||||||
void FetchBasicInfo(gin_helper::Promise<base::DictionaryValue> promise);
|
void FetchBasicInfo(gin_helper::Promise<base::DictionaryValue> promise);
|
||||||
|
@ -40,8 +45,6 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
||||||
std::vector<gin_helper::Promise<base::DictionaryValue>>
|
std::vector<gin_helper::Promise<base::DictionaryValue>>
|
||||||
complete_info_promise_set_;
|
complete_info_promise_set_;
|
||||||
content::GpuDataManagerImpl* gpu_data_manager_;
|
content::GpuDataManagerImpl* gpu_data_manager_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(GPUInfoManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -30,9 +30,6 @@ class ImageView : public View {
|
||||||
views::ImageView* image_view() const {
|
views::ImageView* image_view() const {
|
||||||
return static_cast<views::ImageView*>(view());
|
return static_cast<views::ImageView*>(view());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ImageView);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
|
@ -53,6 +52,12 @@ class AutoUpdater {
|
||||||
public:
|
public:
|
||||||
typedef std::map<std::string, std::string> HeaderMap;
|
typedef std::map<std::string, std::string> HeaderMap;
|
||||||
|
|
||||||
|
AutoUpdater() = delete;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
AutoUpdater(const AutoUpdater&) = delete;
|
||||||
|
AutoUpdater& operator=(const AutoUpdater&) = delete;
|
||||||
|
|
||||||
// Gets/Sets the delegate.
|
// Gets/Sets the delegate.
|
||||||
static Delegate* GetDelegate();
|
static Delegate* GetDelegate();
|
||||||
static void SetDelegate(Delegate* delegate);
|
static void SetDelegate(Delegate* delegate);
|
||||||
|
@ -67,8 +72,6 @@ class AutoUpdater {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Delegate* delegate_;
|
static Delegate* delegate_;
|
||||||
|
|
||||||
DISALLOW_IMPLICIT_CONSTRUCTORS(AutoUpdater);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace auto_updater
|
} // namespace auto_updater
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "components/keyed_service/core/keyed_service.h"
|
#include "components/keyed_service/core/keyed_service.h"
|
||||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||||
|
@ -32,6 +31,10 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService {
|
||||||
BadgeManager();
|
BadgeManager();
|
||||||
~BadgeManager() override;
|
~BadgeManager() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BadgeManager(const BadgeManager&) = delete;
|
||||||
|
BadgeManager& operator=(const BadgeManager&) = delete;
|
||||||
|
|
||||||
static void BindFrameReceiver(
|
static void BindFrameReceiver(
|
||||||
content::RenderFrameHost* frame,
|
content::RenderFrameHost* frame,
|
||||||
mojo::PendingReceiver<blink::mojom::BadgeService> receiver);
|
mojo::PendingReceiver<blink::mojom::BadgeService> receiver);
|
||||||
|
@ -98,8 +101,6 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService {
|
||||||
// Delegate which handles actual setting and clearing of the badge.
|
// Delegate which handles actual setting and clearing of the badge.
|
||||||
// Note: This is currently only set on Windows and MacOS.
|
// Note: This is currently only set on Windows and MacOS.
|
||||||
// std::unique_ptr<BadgeManagerDelegate> delegate_;
|
// std::unique_ptr<BadgeManagerDelegate> delegate_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BadgeManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace badging
|
} // namespace badging
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
|
#ifndef SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
|
||||||
#define SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
|
#define SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
|
@ -26,6 +25,10 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory {
|
||||||
// Returns the BadgeManagerFactory singleton.
|
// Returns the BadgeManagerFactory singleton.
|
||||||
static BadgeManagerFactory* GetInstance();
|
static BadgeManagerFactory* GetInstance();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BadgeManagerFactory(const BadgeManagerFactory&) = delete;
|
||||||
|
BadgeManagerFactory& operator=(const BadgeManagerFactory&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct base::DefaultSingletonTraits<BadgeManagerFactory>;
|
friend struct base::DefaultSingletonTraits<BadgeManagerFactory>;
|
||||||
|
|
||||||
|
@ -35,8 +38,6 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory {
|
||||||
// BrowserContextKeyedServiceFactory
|
// BrowserContextKeyedServiceFactory
|
||||||
KeyedService* BuildServiceInstanceFor(
|
KeyedService* BuildServiceInstanceFor(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BadgeManagerFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace badging
|
} // namespace badging
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/task/cancelable_task_tracker.h"
|
#include "base/task/cancelable_task_tracker.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
|
@ -47,6 +46,10 @@ class Browser : public WindowListObserver {
|
||||||
Browser();
|
Browser();
|
||||||
~Browser() override;
|
~Browser() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
Browser(const Browser&) = delete;
|
||||||
|
Browser& operator=(const Browser&) = delete;
|
||||||
|
|
||||||
static Browser* Get();
|
static Browser* Get();
|
||||||
|
|
||||||
// Try to close all windows and quit the application.
|
// Try to close all windows and quit the application.
|
||||||
|
@ -371,8 +374,6 @@ class Browser : public WindowListObserver {
|
||||||
// In charge of running taskbar related APIs.
|
// In charge of running taskbar related APIs.
|
||||||
TaskbarHost taskbar_host_;
|
TaskbarHost taskbar_host_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Browser);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "chrome/browser/browser_process.h"
|
#include "chrome/browser/browser_process.h"
|
||||||
#include "components/prefs/pref_service.h"
|
#include "components/prefs/pref_service.h"
|
||||||
#include "components/prefs/value_map_pref_store.h"
|
#include "components/prefs/value_map_pref_store.h"
|
||||||
|
@ -36,6 +35,10 @@ class BrowserProcessImpl : public BrowserProcess {
|
||||||
BrowserProcessImpl();
|
BrowserProcessImpl();
|
||||||
~BrowserProcessImpl() override;
|
~BrowserProcessImpl() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BrowserProcessImpl(const BrowserProcessImpl&) = delete;
|
||||||
|
BrowserProcessImpl& operator=(const BrowserProcessImpl&) = delete;
|
||||||
|
|
||||||
static void ApplyProxyModeFromCommandLine(ValueMapPrefStore* pref_store);
|
static void ApplyProxyModeFromCommandLine(ValueMapPrefStore* pref_store);
|
||||||
|
|
||||||
BuildState* GetBuildState() override;
|
BuildState* GetBuildState() override;
|
||||||
|
@ -109,8 +112,6 @@ class BrowserProcessImpl : public BrowserProcess {
|
||||||
#endif
|
#endif
|
||||||
std::unique_ptr<PrefService> local_state_;
|
std::unique_ptr<PrefService> local_state_;
|
||||||
std::string locale_;
|
std::string locale_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_
|
#endif // SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_
|
||||||
|
|
|
@ -17,6 +17,10 @@ struct ChildWebContentsTracker
|
||||||
: public content::WebContentsUserData<ChildWebContentsTracker> {
|
: public content::WebContentsUserData<ChildWebContentsTracker> {
|
||||||
~ChildWebContentsTracker() override;
|
~ChildWebContentsTracker() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ChildWebContentsTracker(const ChildWebContentsTracker&) = delete;
|
||||||
|
ChildWebContentsTracker& operator=(const ChildWebContentsTracker&) = delete;
|
||||||
|
|
||||||
GURL url;
|
GURL url;
|
||||||
std::string frame_name;
|
std::string frame_name;
|
||||||
content::Referrer referrer;
|
content::Referrer referrer;
|
||||||
|
@ -28,8 +32,6 @@ struct ChildWebContentsTracker
|
||||||
friend class content::WebContentsUserData<ChildWebContentsTracker>;
|
friend class content::WebContentsUserData<ChildWebContentsTracker>;
|
||||||
|
|
||||||
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ChildWebContentsTracker);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#define SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_
|
#define SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_
|
||||||
|
|
||||||
#include "base/callback_list.h"
|
#include "base/callback_list.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "mojo/public/cpp/bindings/receiver.h"
|
#include "mojo/public/cpp/bindings/receiver.h"
|
||||||
#include "net/cookies/cookie_change_dispatcher.h"
|
#include "net/cookies/cookie_change_dispatcher.h"
|
||||||
#include "services/network/public/mojom/cookie_manager.mojom.h"
|
#include "services/network/public/mojom/cookie_manager.mojom.h"
|
||||||
|
@ -21,6 +20,10 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
|
||||||
explicit CookieChangeNotifier(ElectronBrowserContext* browser_context);
|
explicit CookieChangeNotifier(ElectronBrowserContext* browser_context);
|
||||||
~CookieChangeNotifier() override;
|
~CookieChangeNotifier() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
CookieChangeNotifier(const CookieChangeNotifier&) = delete;
|
||||||
|
CookieChangeNotifier& operator=(const CookieChangeNotifier&) = delete;
|
||||||
|
|
||||||
// Register callbacks that needs to notified on any cookie store changes.
|
// Register callbacks that needs to notified on any cookie store changes.
|
||||||
base::CallbackListSubscription RegisterCookieChangeCallback(
|
base::CallbackListSubscription RegisterCookieChangeCallback(
|
||||||
const base::RepeatingCallback<void(const net::CookieChangeInfo& change)>&
|
const base::RepeatingCallback<void(const net::CookieChangeInfo& change)>&
|
||||||
|
@ -38,8 +41,6 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
|
||||||
cookie_change_sub_list_;
|
cookie_change_sub_list_;
|
||||||
|
|
||||||
mojo::Receiver<network::mojom::CookieChangeListener> receiver_;
|
mojo::Receiver<network::mojom::CookieChangeListener> receiver_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CookieChangeNotifier);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -1146,6 +1146,10 @@ class FileURLLoaderFactory : public network::SelfDeletingURLLoaderFactory {
|
||||||
return pending_remote;
|
return pending_remote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
FileURLLoaderFactory(const FileURLLoaderFactory&) = delete;
|
||||||
|
FileURLLoaderFactory& operator=(const FileURLLoaderFactory&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit FileURLLoaderFactory(
|
explicit FileURLLoaderFactory(
|
||||||
int child_id,
|
int child_id,
|
||||||
|
@ -1177,8 +1181,6 @@ class FileURLLoaderFactory : public network::SelfDeletingURLLoaderFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
int child_id_;
|
int child_id_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(FileURLLoaderFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -49,6 +49,10 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||||
ElectronBrowserClient();
|
ElectronBrowserClient();
|
||||||
~ElectronBrowserClient() override;
|
~ElectronBrowserClient() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronBrowserClient(const ElectronBrowserClient&) = delete;
|
||||||
|
ElectronBrowserClient& operator=(const ElectronBrowserClient&) = delete;
|
||||||
|
|
||||||
using Delegate = content::ContentBrowserClient;
|
using Delegate = content::ContentBrowserClient;
|
||||||
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
|
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
|
||||||
|
|
||||||
|
@ -318,8 +322,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||||
#if defined(OS_MAC)
|
#if defined(OS_MAC)
|
||||||
ElectronBrowserMainParts* browser_main_parts_ = nullptr;
|
ElectronBrowserMainParts* browser_main_parts_ = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -48,6 +48,10 @@ class ProtocolRegistry;
|
||||||
|
|
||||||
class ElectronBrowserContext : public content::BrowserContext {
|
class ElectronBrowserContext : public content::BrowserContext {
|
||||||
public:
|
public:
|
||||||
|
// disable copy
|
||||||
|
ElectronBrowserContext(const ElectronBrowserContext&) = delete;
|
||||||
|
ElectronBrowserContext& operator=(const ElectronBrowserContext&) = delete;
|
||||||
|
|
||||||
// partition_id => browser_context
|
// partition_id => browser_context
|
||||||
struct PartitionKey {
|
struct PartitionKey {
|
||||||
std::string partition;
|
std::string partition;
|
||||||
|
@ -184,8 +188,6 @@ class ElectronBrowserContext : public content::BrowserContext {
|
||||||
mojo::Remote<network::mojom::SSLConfigClient> ssl_config_client_;
|
mojo::Remote<network::mojom::SSLConfigClient> ssl_config_client_;
|
||||||
|
|
||||||
base::WeakPtrFactory<ElectronBrowserContext> weak_factory_{this};
|
base::WeakPtrFactory<ElectronBrowserContext> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserContext);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "content/public/browser/web_contents_observer.h"
|
#include "content/public/browser/web_contents_observer.h"
|
||||||
#include "electron/shell/common/api/api.mojom.h"
|
#include "electron/shell/common/api/api.mojom.h"
|
||||||
|
@ -29,6 +28,11 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser,
|
||||||
static void Create(content::RenderFrameHost* frame_host,
|
static void Create(content::RenderFrameHost* frame_host,
|
||||||
mojo::PendingReceiver<mojom::ElectronBrowser> receiver);
|
mojo::PendingReceiver<mojom::ElectronBrowser> receiver);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronBrowserHandlerImpl(const ElectronBrowserHandlerImpl&) = delete;
|
||||||
|
ElectronBrowserHandlerImpl& operator=(const ElectronBrowserHandlerImpl&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// mojom::ElectronBrowser:
|
// mojom::ElectronBrowser:
|
||||||
void Message(bool internal,
|
void Message(bool internal,
|
||||||
const std::string& channel,
|
const std::string& channel,
|
||||||
|
@ -74,8 +78,6 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser,
|
||||||
mojo::Receiver<mojom::ElectronBrowser> receiver_{this};
|
mojo::Receiver<mojom::ElectronBrowser> receiver_{this};
|
||||||
|
|
||||||
base::WeakPtrFactory<ElectronBrowserHandlerImpl> weak_factory_{this};
|
base::WeakPtrFactory<ElectronBrowserHandlerImpl> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserHandlerImpl);
|
|
||||||
};
|
};
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
#endif // SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_
|
#endif // SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_
|
||||||
|
|
|
@ -76,6 +76,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
|
||||||
explicit ElectronBrowserMainParts(const content::MainFunctionParams& params);
|
explicit ElectronBrowserMainParts(const content::MainFunctionParams& params);
|
||||||
~ElectronBrowserMainParts() override;
|
~ElectronBrowserMainParts() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronBrowserMainParts(const ElectronBrowserMainParts&) = delete;
|
||||||
|
ElectronBrowserMainParts& operator=(const ElectronBrowserMainParts&) = delete;
|
||||||
|
|
||||||
static ElectronBrowserMainParts* Get();
|
static ElectronBrowserMainParts* Get();
|
||||||
|
|
||||||
// Sets the exit code, will fail if the message loop is not ready.
|
// Sets the exit code, will fail if the message loop is not ready.
|
||||||
|
@ -175,8 +179,6 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static ElectronBrowserMainParts* self_;
|
static ElectronBrowserMainParts* self_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserMainParts);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -84,6 +84,10 @@ class ShutdownDetector : public base::PlatformThread::Delegate {
|
||||||
base::OnceCallback<void()> shutdown_callback,
|
base::OnceCallback<void()> shutdown_callback,
|
||||||
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ShutdownDetector(const ShutdownDetector&) = delete;
|
||||||
|
ShutdownDetector& operator=(const ShutdownDetector&) = delete;
|
||||||
|
|
||||||
// base::PlatformThread::Delegate:
|
// base::PlatformThread::Delegate:
|
||||||
void ThreadMain() override;
|
void ThreadMain() override;
|
||||||
|
|
||||||
|
@ -91,8 +95,6 @@ class ShutdownDetector : public base::PlatformThread::Delegate {
|
||||||
const int shutdown_fd_;
|
const int shutdown_fd_;
|
||||||
base::OnceCallback<void()> shutdown_callback_;
|
base::OnceCallback<void()> shutdown_callback_;
|
||||||
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ShutdownDetector);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ShutdownDetector::ShutdownDetector(
|
ShutdownDetector::ShutdownDetector(
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
|
#include "base/macros.h"
|
||||||
#include "base/task/post_task.h"
|
#include "base/task/post_task.h"
|
||||||
#include "base/task/thread_pool.h"
|
#include "base/task/thread_pool.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
|
|
|
@ -25,6 +25,12 @@ class ElectronDownloadManagerDelegate
|
||||||
explicit ElectronDownloadManagerDelegate(content::DownloadManager* manager);
|
explicit ElectronDownloadManagerDelegate(content::DownloadManager* manager);
|
||||||
~ElectronDownloadManagerDelegate() override;
|
~ElectronDownloadManagerDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronDownloadManagerDelegate(const ElectronDownloadManagerDelegate&) =
|
||||||
|
delete;
|
||||||
|
ElectronDownloadManagerDelegate& operator=(
|
||||||
|
const ElectronDownloadManagerDelegate&) = delete;
|
||||||
|
|
||||||
// content::DownloadManagerDelegate:
|
// content::DownloadManagerDelegate:
|
||||||
void Shutdown() override;
|
void Shutdown() override;
|
||||||
bool DetermineDownloadTarget(
|
bool DetermineDownloadTarget(
|
||||||
|
@ -54,8 +60,6 @@ class ElectronDownloadManagerDelegate
|
||||||
|
|
||||||
content::DownloadManager* download_manager_;
|
content::DownloadManager* download_manager_;
|
||||||
base::WeakPtrFactory<ElectronDownloadManagerDelegate> weak_ptr_factory_{this};
|
base::WeakPtrFactory<ElectronDownloadManagerDelegate> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronDownloadManagerDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -13,11 +13,12 @@ class ElectronGpuClient : public content::ContentGpuClient {
|
||||||
public:
|
public:
|
||||||
ElectronGpuClient();
|
ElectronGpuClient();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronGpuClient(const ElectronGpuClient&) = delete;
|
||||||
|
ElectronGpuClient& operator=(const ElectronGpuClient&) = delete;
|
||||||
|
|
||||||
// content::ContentGpuClient:
|
// content::ContentGpuClient:
|
||||||
void PreCreateMessageLoop() override;
|
void PreCreateMessageLoop() override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronGpuClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -14,15 +14,17 @@ class ElectronNavigationThrottle : public content::NavigationThrottle {
|
||||||
explicit ElectronNavigationThrottle(content::NavigationHandle* handle);
|
explicit ElectronNavigationThrottle(content::NavigationHandle* handle);
|
||||||
~ElectronNavigationThrottle() override;
|
~ElectronNavigationThrottle() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronNavigationThrottle(const ElectronNavigationThrottle&) = delete;
|
||||||
|
ElectronNavigationThrottle& operator=(const ElectronNavigationThrottle&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
ElectronNavigationThrottle::ThrottleCheckResult WillStartRequest() override;
|
ElectronNavigationThrottle::ThrottleCheckResult WillStartRequest() override;
|
||||||
|
|
||||||
ElectronNavigationThrottle::ThrottleCheckResult WillRedirectRequest()
|
ElectronNavigationThrottle::ThrottleCheckResult WillRedirectRequest()
|
||||||
override;
|
override;
|
||||||
|
|
||||||
const char* GetNameForLogging() override;
|
const char* GetNameForLogging() override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronNavigationThrottle);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -29,6 +29,11 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||||
ElectronPermissionManager();
|
ElectronPermissionManager();
|
||||||
~ElectronPermissionManager() override;
|
~ElectronPermissionManager() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronPermissionManager(const ElectronPermissionManager&) = delete;
|
||||||
|
ElectronPermissionManager& operator=(const ElectronPermissionManager&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
using StatusCallback =
|
using StatusCallback =
|
||||||
base::OnceCallback<void(blink::mojom::PermissionStatus)>;
|
base::OnceCallback<void(blink::mojom::PermissionStatus)>;
|
||||||
using StatusesCallback = base::OnceCallback<void(
|
using StatusesCallback = base::OnceCallback<void(
|
||||||
|
@ -126,8 +131,6 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||||
DeviceCheckHandler device_permission_handler_;
|
DeviceCheckHandler device_permission_handler_;
|
||||||
|
|
||||||
PendingRequestsMap pending_requests_;
|
PendingRequestsMap pending_requests_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronPermissionManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -19,6 +19,12 @@ class ElectronQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||||
|
|
||||||
ElectronQuotaPermissionContext();
|
ElectronQuotaPermissionContext();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronQuotaPermissionContext(const ElectronQuotaPermissionContext&) =
|
||||||
|
delete;
|
||||||
|
ElectronQuotaPermissionContext& operator=(
|
||||||
|
const ElectronQuotaPermissionContext&) = delete;
|
||||||
|
|
||||||
// content::QuotaPermissionContext:
|
// content::QuotaPermissionContext:
|
||||||
void RequestQuotaPermission(const content::StorageQuotaParams& params,
|
void RequestQuotaPermission(const content::StorageQuotaParams& params,
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
|
@ -26,8 +32,6 @@ class ElectronQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~ElectronQuotaPermissionContext() override;
|
~ElectronQuotaPermissionContext() override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronQuotaPermissionContext);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "content/public/browser/speech_recognition_event_listener.h"
|
#include "content/public/browser/speech_recognition_event_listener.h"
|
||||||
#include "content/public/browser/speech_recognition_manager_delegate.h"
|
#include "content/public/browser/speech_recognition_manager_delegate.h"
|
||||||
|
|
||||||
|
@ -20,6 +19,12 @@ class ElectronSpeechRecognitionManagerDelegate
|
||||||
ElectronSpeechRecognitionManagerDelegate();
|
ElectronSpeechRecognitionManagerDelegate();
|
||||||
~ElectronSpeechRecognitionManagerDelegate() override;
|
~ElectronSpeechRecognitionManagerDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronSpeechRecognitionManagerDelegate(
|
||||||
|
const ElectronSpeechRecognitionManagerDelegate&) = delete;
|
||||||
|
ElectronSpeechRecognitionManagerDelegate& operator=(
|
||||||
|
const ElectronSpeechRecognitionManagerDelegate&) = delete;
|
||||||
|
|
||||||
// content::SpeechRecognitionEventListener:
|
// content::SpeechRecognitionEventListener:
|
||||||
void OnRecognitionStart(int session_id) override;
|
void OnRecognitionStart(int session_id) override;
|
||||||
void OnAudioStart(int session_id) override;
|
void OnAudioStart(int session_id) override;
|
||||||
|
@ -45,9 +50,6 @@ class ElectronSpeechRecognitionManagerDelegate
|
||||||
override;
|
override;
|
||||||
content::SpeechRecognitionEventListener* GetEventListener() override;
|
content::SpeechRecognitionEventListener* GetEventListener() override;
|
||||||
bool FilterProfanities(int render_process_id) override;
|
bool FilterProfanities(int render_process_id) override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronSpeechRecognitionManagerDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/singleton.h"
|
#include "base/memory/singleton.h"
|
||||||
#include "content/public/browser/web_ui_controller_factory.h"
|
#include "content/public/browser/web_ui_controller_factory.h"
|
||||||
|
|
||||||
|
@ -24,6 +23,12 @@ class ElectronWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||||
ElectronWebUIControllerFactory();
|
ElectronWebUIControllerFactory();
|
||||||
~ElectronWebUIControllerFactory() override;
|
~ElectronWebUIControllerFactory() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronWebUIControllerFactory(const ElectronWebUIControllerFactory&) =
|
||||||
|
delete;
|
||||||
|
ElectronWebUIControllerFactory& operator=(
|
||||||
|
const ElectronWebUIControllerFactory&) = delete;
|
||||||
|
|
||||||
// content::WebUIControllerFactory:
|
// content::WebUIControllerFactory:
|
||||||
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
|
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
|
||||||
const GURL& url) override;
|
const GURL& url) override;
|
||||||
|
@ -35,8 +40,6 @@ class ElectronWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct base::DefaultSingletonTraits<ElectronWebUIControllerFactory>;
|
friend struct base::DefaultSingletonTraits<ElectronWebUIControllerFactory>;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronWebUIControllerFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -20,6 +20,10 @@ v8::Local<v8::FunctionTemplate> GetEventEmitterTemplate(v8::Isolate* isolate);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class EventEmitterMixin {
|
class EventEmitterMixin {
|
||||||
public:
|
public:
|
||||||
|
// disable copy
|
||||||
|
EventEmitterMixin(const EventEmitterMixin&) = delete;
|
||||||
|
EventEmitterMixin& operator=(const EventEmitterMixin&) = delete;
|
||||||
|
|
||||||
// this.emit(name, new Event(), args...);
|
// this.emit(name, new Event(), args...);
|
||||||
// Returns true if event.preventDefault() was called during processing.
|
// Returns true if event.preventDefault() was called during processing.
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
|
@ -87,8 +91,6 @@ class EventEmitterMixin {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(EventEmitterMixin);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gin_helper
|
} // namespace gin_helper
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/strings/strcat.h"
|
#include "base/strings/strcat.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
@ -44,11 +43,15 @@ class ManagementSetEnabledFunctionInstallPromptDelegate
|
||||||
}
|
}
|
||||||
~ManagementSetEnabledFunctionInstallPromptDelegate() override = default;
|
~ManagementSetEnabledFunctionInstallPromptDelegate() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ManagementSetEnabledFunctionInstallPromptDelegate(
|
||||||
|
const ManagementSetEnabledFunctionInstallPromptDelegate&) = delete;
|
||||||
|
ManagementSetEnabledFunctionInstallPromptDelegate& operator=(
|
||||||
|
const ManagementSetEnabledFunctionInstallPromptDelegate&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
base::WeakPtrFactory<ManagementSetEnabledFunctionInstallPromptDelegate>
|
base::WeakPtrFactory<ManagementSetEnabledFunctionInstallPromptDelegate>
|
||||||
weak_factory_{this};
|
weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ManagementSetEnabledFunctionInstallPromptDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ManagementUninstallFunctionUninstallDialogDelegate
|
class ManagementUninstallFunctionUninstallDialogDelegate
|
||||||
|
@ -63,8 +66,11 @@ class ManagementUninstallFunctionUninstallDialogDelegate
|
||||||
|
|
||||||
~ManagementUninstallFunctionUninstallDialogDelegate() override = default;
|
~ManagementUninstallFunctionUninstallDialogDelegate() override = default;
|
||||||
|
|
||||||
private:
|
// disable copy
|
||||||
DISALLOW_COPY_AND_ASSIGN(ManagementUninstallFunctionUninstallDialogDelegate);
|
ManagementUninstallFunctionUninstallDialogDelegate(
|
||||||
|
const ManagementUninstallFunctionUninstallDialogDelegate&) = delete;
|
||||||
|
ManagementUninstallFunctionUninstallDialogDelegate& operator=(
|
||||||
|
const ManagementUninstallFunctionUninstallDialogDelegate&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
#ifndef SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
||||||
#define SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
#define SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/extension_function.h"
|
#include "extensions/browser/extension_function.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
@ -16,14 +15,17 @@ class ResourcesPrivateGetStringsFunction : public ExtensionFunction {
|
||||||
RESOURCESPRIVATE_GETSTRINGS)
|
RESOURCESPRIVATE_GETSTRINGS)
|
||||||
ResourcesPrivateGetStringsFunction();
|
ResourcesPrivateGetStringsFunction();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ResourcesPrivateGetStringsFunction(
|
||||||
|
const ResourcesPrivateGetStringsFunction&) = delete;
|
||||||
|
ResourcesPrivateGetStringsFunction& operator=(
|
||||||
|
const ResourcesPrivateGetStringsFunction&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~ResourcesPrivateGetStringsFunction() override;
|
~ResourcesPrivateGetStringsFunction() override;
|
||||||
|
|
||||||
// Override from ExtensionFunction:
|
// Override from ExtensionFunction:
|
||||||
ExtensionFunction::ResponseAction Run() override;
|
ExtensionFunction::ResponseAction Run() override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ResourcesPrivateGetStringsFunction);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
@ -21,6 +20,11 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
||||||
explicit ElectronRuntimeAPIDelegate(content::BrowserContext* browser_context);
|
explicit ElectronRuntimeAPIDelegate(content::BrowserContext* browser_context);
|
||||||
~ElectronRuntimeAPIDelegate() override;
|
~ElectronRuntimeAPIDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronRuntimeAPIDelegate(const ElectronRuntimeAPIDelegate&) = delete;
|
||||||
|
ElectronRuntimeAPIDelegate& operator=(const ElectronRuntimeAPIDelegate&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// RuntimeAPIDelegate implementation.
|
// RuntimeAPIDelegate implementation.
|
||||||
void AddUpdateObserver(UpdateObserver* observer) override;
|
void AddUpdateObserver(UpdateObserver* observer) override;
|
||||||
void RemoveUpdateObserver(UpdateObserver* observer) override;
|
void RemoveUpdateObserver(UpdateObserver* observer) override;
|
||||||
|
@ -33,8 +37,6 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
content::BrowserContext* browser_context_;
|
content::BrowserContext* browser_context_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronRuntimeAPIDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom.h"
|
#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/component_extension_resource_manager.h"
|
#include "extensions/browser/component_extension_resource_manager.h"
|
||||||
#include "ui/base/webui/resource_path.h"
|
#include "ui/base/webui/resource_path.h"
|
||||||
|
|
||||||
|
@ -25,6 +24,12 @@ class ElectronComponentExtensionResourceManager
|
||||||
ElectronComponentExtensionResourceManager();
|
ElectronComponentExtensionResourceManager();
|
||||||
~ElectronComponentExtensionResourceManager() override;
|
~ElectronComponentExtensionResourceManager() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronComponentExtensionResourceManager(
|
||||||
|
const ElectronComponentExtensionResourceManager&) = delete;
|
||||||
|
ElectronComponentExtensionResourceManager& operator=(
|
||||||
|
const ElectronComponentExtensionResourceManager&) = delete;
|
||||||
|
|
||||||
// Overridden from ComponentExtensionResourceManager:
|
// Overridden from ComponentExtensionResourceManager:
|
||||||
bool IsComponentExtensionResource(const base::FilePath& extension_path,
|
bool IsComponentExtensionResource(const base::FilePath& extension_path,
|
||||||
const base::FilePath& resource_path,
|
const base::FilePath& resource_path,
|
||||||
|
@ -43,8 +48,6 @@ class ElectronComponentExtensionResourceManager
|
||||||
// A map from an extension ID to its i18n template replacements.
|
// A map from an extension ID to its i18n template replacements.
|
||||||
std::map<std::string, ui::TemplateReplacements>
|
std::map<std::string, ui::TemplateReplacements>
|
||||||
extension_template_replacements_;
|
extension_template_replacements_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronComponentExtensionResourceManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
|
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
|
||||||
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
|
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/api/system_display/display_info_provider.h"
|
#include "extensions/browser/api/system_display/display_info_provider.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
@ -14,8 +13,10 @@ class ElectronDisplayInfoProvider : public DisplayInfoProvider {
|
||||||
public:
|
public:
|
||||||
ElectronDisplayInfoProvider();
|
ElectronDisplayInfoProvider();
|
||||||
|
|
||||||
private:
|
// disable copy
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronDisplayInfoProvider);
|
ElectronDisplayInfoProvider(const ElectronDisplayInfoProvider&) = delete;
|
||||||
|
ElectronDisplayInfoProvider& operator=(const ElectronDisplayInfoProvider&) =
|
||||||
|
delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/extension_host_delegate.h"
|
#include "extensions/browser/extension_host_delegate.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
@ -19,6 +18,11 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate {
|
||||||
ElectronExtensionHostDelegate();
|
ElectronExtensionHostDelegate();
|
||||||
~ElectronExtensionHostDelegate() override;
|
~ElectronExtensionHostDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionHostDelegate(const ElectronExtensionHostDelegate&) = delete;
|
||||||
|
ElectronExtensionHostDelegate& operator=(
|
||||||
|
const ElectronExtensionHostDelegate&) = delete;
|
||||||
|
|
||||||
// ExtensionHostDelegate implementation.
|
// ExtensionHostDelegate implementation.
|
||||||
void OnExtensionHostCreated(content::WebContents* web_contents) override;
|
void OnExtensionHostCreated(content::WebContents* web_contents) override;
|
||||||
void OnMainFrameCreatedForBackgroundPage(ExtensionHost* host) override;
|
void OnMainFrameCreatedForBackgroundPage(ExtensionHost* host) override;
|
||||||
|
@ -41,9 +45,6 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate {
|
||||||
const viz::SurfaceId& surface_id,
|
const viz::SurfaceId& surface_id,
|
||||||
const gfx::Size& natural_size) override;
|
const gfx::Size& natural_size) override;
|
||||||
void ExitPictureInPicture() override;
|
void ExitPictureInPicture() override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionHostDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "extensions/browser/extension_registrar.h"
|
#include "extensions/browser/extension_registrar.h"
|
||||||
|
@ -33,6 +32,10 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
|
||||||
explicit ElectronExtensionLoader(content::BrowserContext* browser_context);
|
explicit ElectronExtensionLoader(content::BrowserContext* browser_context);
|
||||||
~ElectronExtensionLoader() override;
|
~ElectronExtensionLoader() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionLoader(const ElectronExtensionLoader&) = delete;
|
||||||
|
ElectronExtensionLoader& operator=(const ElectronExtensionLoader&) = delete;
|
||||||
|
|
||||||
// Loads an unpacked extension from a directory synchronously. Returns the
|
// Loads an unpacked extension from a directory synchronously. Returns the
|
||||||
// extension on success, or nullptr otherwise.
|
// extension on success, or nullptr otherwise.
|
||||||
void LoadExtension(const base::FilePath& extension_dir,
|
void LoadExtension(const base::FilePath& extension_dir,
|
||||||
|
@ -91,8 +94,6 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
|
||||||
bool did_schedule_reload_ = false;
|
bool did_schedule_reload_ = false;
|
||||||
|
|
||||||
base::WeakPtrFactory<ElectronExtensionLoader> weak_factory_{this};
|
base::WeakPtrFactory<ElectronExtensionLoader> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionLoader);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/sequenced_task_runner_helpers.h"
|
#include "base/sequenced_task_runner_helpers.h"
|
||||||
#include "content/public/browser/browser_message_filter.h"
|
#include "content/public/browser/browser_message_filter.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
|
@ -31,6 +30,12 @@ class ElectronExtensionMessageFilter : public content::BrowserMessageFilter {
|
||||||
ElectronExtensionMessageFilter(int render_process_id,
|
ElectronExtensionMessageFilter(int render_process_id,
|
||||||
content::BrowserContext* browser_context);
|
content::BrowserContext* browser_context);
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionMessageFilter(const ElectronExtensionMessageFilter&) =
|
||||||
|
delete;
|
||||||
|
ElectronExtensionMessageFilter& operator=(
|
||||||
|
const ElectronExtensionMessageFilter&) = delete;
|
||||||
|
|
||||||
// content::BrowserMessageFilter methods:
|
// content::BrowserMessageFilter methods:
|
||||||
bool OnMessageReceived(const IPC::Message& message) override;
|
bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
void OverrideThreadForMessage(const IPC::Message& message,
|
void OverrideThreadForMessage(const IPC::Message& message,
|
||||||
|
@ -59,8 +64,6 @@ class ElectronExtensionMessageFilter : public content::BrowserMessageFilter {
|
||||||
// may outlive |browser_context_|, so make sure to NULL check if in doubt;
|
// may outlive |browser_context_|, so make sure to NULL check if in doubt;
|
||||||
// async calls and the like.
|
// async calls and the like.
|
||||||
content::BrowserContext* browser_context_;
|
content::BrowserContext* browser_context_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionMessageFilter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/one_shot_event.h"
|
#include "base/one_shot_event.h"
|
||||||
|
@ -38,6 +37,10 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
||||||
explicit ElectronExtensionSystem(content::BrowserContext* browser_context);
|
explicit ElectronExtensionSystem(content::BrowserContext* browser_context);
|
||||||
~ElectronExtensionSystem() override;
|
~ElectronExtensionSystem() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionSystem(const ElectronExtensionSystem&) = delete;
|
||||||
|
ElectronExtensionSystem& operator=(const ElectronExtensionSystem&) = delete;
|
||||||
|
|
||||||
// Loads an unpacked extension from a directory. Returns the extension on
|
// Loads an unpacked extension from a directory. Returns the extension on
|
||||||
// success, or nullptr otherwise.
|
// success, or nullptr otherwise.
|
||||||
void LoadExtension(
|
void LoadExtension(
|
||||||
|
@ -115,8 +118,6 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
||||||
base::OneShotEvent ready_;
|
base::OneShotEvent ready_;
|
||||||
|
|
||||||
base::WeakPtrFactory<ElectronExtensionSystem> weak_factory_{this};
|
base::WeakPtrFactory<ElectronExtensionSystem> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionSystem);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
||||||
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/singleton.h"
|
#include "base/memory/singleton.h"
|
||||||
#include "extensions/browser/extension_system_provider.h"
|
#include "extensions/browser/extension_system_provider.h"
|
||||||
|
|
||||||
|
@ -20,6 +19,12 @@ class ElectronExtensionSystemFactory : public ExtensionSystemProvider {
|
||||||
|
|
||||||
static ElectronExtensionSystemFactory* GetInstance();
|
static ElectronExtensionSystemFactory* GetInstance();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionSystemFactory(const ElectronExtensionSystemFactory&) =
|
||||||
|
delete;
|
||||||
|
ElectronExtensionSystemFactory& operator=(
|
||||||
|
const ElectronExtensionSystemFactory&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct base::DefaultSingletonTraits<ElectronExtensionSystemFactory>;
|
friend struct base::DefaultSingletonTraits<ElectronExtensionSystemFactory>;
|
||||||
|
|
||||||
|
@ -32,8 +37,6 @@ class ElectronExtensionSystemFactory : public ExtensionSystemProvider {
|
||||||
content::BrowserContext* GetBrowserContextToUse(
|
content::BrowserContext* GetBrowserContextToUse(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
bool ServiceIsCreatedWithBrowserContext() const override;
|
bool ServiceIsCreatedWithBrowserContext() const override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionSystemFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
||||||
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "content/public/browser/web_contents_user_data.h"
|
#include "content/public/browser/web_contents_user_data.h"
|
||||||
#include "extensions/browser/extension_web_contents_observer.h"
|
#include "extensions/browser/extension_web_contents_observer.h"
|
||||||
|
|
||||||
|
@ -19,6 +18,12 @@ class ElectronExtensionWebContentsObserver
|
||||||
public:
|
public:
|
||||||
~ElectronExtensionWebContentsObserver() override;
|
~ElectronExtensionWebContentsObserver() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionWebContentsObserver(
|
||||||
|
const ElectronExtensionWebContentsObserver&) = delete;
|
||||||
|
ElectronExtensionWebContentsObserver& operator=(
|
||||||
|
const ElectronExtensionWebContentsObserver&) = delete;
|
||||||
|
|
||||||
// Creates and initializes an instance of this class for the given
|
// Creates and initializes an instance of this class for the given
|
||||||
// |web_contents|, if it doesn't already exist.
|
// |web_contents|, if it doesn't already exist.
|
||||||
static void CreateForWebContents(content::WebContents* web_contents);
|
static void CreateForWebContents(content::WebContents* web_contents);
|
||||||
|
@ -31,8 +36,6 @@ class ElectronExtensionWebContentsObserver
|
||||||
content::WebContents* web_contents);
|
content::WebContents* web_contents);
|
||||||
|
|
||||||
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionWebContentsObserver);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -37,15 +37,18 @@ class ElectronGuestViewManagerDelegate
|
||||||
: ExtensionsGuestViewManagerDelegate(context) {}
|
: ExtensionsGuestViewManagerDelegate(context) {}
|
||||||
~ElectronGuestViewManagerDelegate() override = default;
|
~ElectronGuestViewManagerDelegate() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronGuestViewManagerDelegate(const ElectronGuestViewManagerDelegate&) =
|
||||||
|
delete;
|
||||||
|
ElectronGuestViewManagerDelegate& operator=(
|
||||||
|
const ElectronGuestViewManagerDelegate&) = delete;
|
||||||
|
|
||||||
// GuestViewManagerDelegate:
|
// GuestViewManagerDelegate:
|
||||||
void OnGuestAdded(content::WebContents* guest_web_contents) const override {
|
void OnGuestAdded(content::WebContents* guest_web_contents) const override {
|
||||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||||
v8::HandleScope scope(isolate);
|
v8::HandleScope scope(isolate);
|
||||||
electron::api::WebContents::FromOrCreate(isolate, guest_web_contents);
|
electron::api::WebContents::FromOrCreate(isolate, guest_web_contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronGuestViewManagerDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ElectronMimeHandlerViewGuestDelegate
|
class ElectronMimeHandlerViewGuestDelegate
|
||||||
|
@ -54,6 +57,12 @@ class ElectronMimeHandlerViewGuestDelegate
|
||||||
ElectronMimeHandlerViewGuestDelegate() = default;
|
ElectronMimeHandlerViewGuestDelegate() = default;
|
||||||
~ElectronMimeHandlerViewGuestDelegate() override = default;
|
~ElectronMimeHandlerViewGuestDelegate() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronMimeHandlerViewGuestDelegate(
|
||||||
|
const ElectronMimeHandlerViewGuestDelegate&) = delete;
|
||||||
|
ElectronMimeHandlerViewGuestDelegate& operator=(
|
||||||
|
const ElectronMimeHandlerViewGuestDelegate&) = delete;
|
||||||
|
|
||||||
// MimeHandlerViewGuestDelegate.
|
// MimeHandlerViewGuestDelegate.
|
||||||
bool HandleContextMenu(content::WebContents* web_contents,
|
bool HandleContextMenu(content::WebContents* web_contents,
|
||||||
const content::ContextMenuParams& params) override {
|
const content::ContextMenuParams& params) override {
|
||||||
|
@ -63,9 +72,6 @@ class ElectronMimeHandlerViewGuestDelegate
|
||||||
}
|
}
|
||||||
void RecordLoadMetric(bool in_main_frame,
|
void RecordLoadMetric(bool in_main_frame,
|
||||||
const std::string& mime_type) override {}
|
const std::string& mime_type) override {}
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronMimeHandlerViewGuestDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ElectronExtensionsAPIClient::ElectronExtensionsAPIClient() = default;
|
ElectronExtensionsAPIClient::ElectronExtensionsAPIClient() = default;
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_
|
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_
|
||||||
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_
|
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "extensions/browser/extensions_browser_api_provider.h"
|
#include "extensions/browser/extensions_browser_api_provider.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
@ -16,10 +15,13 @@ class ElectronExtensionsBrowserAPIProvider
|
||||||
ElectronExtensionsBrowserAPIProvider();
|
ElectronExtensionsBrowserAPIProvider();
|
||||||
~ElectronExtensionsBrowserAPIProvider() override;
|
~ElectronExtensionsBrowserAPIProvider() override;
|
||||||
|
|
||||||
void RegisterExtensionFunctions(ExtensionFunctionRegistry* registry) override;
|
// disable copy
|
||||||
|
ElectronExtensionsBrowserAPIProvider(
|
||||||
|
const ElectronExtensionsBrowserAPIProvider&) = delete;
|
||||||
|
ElectronExtensionsBrowserAPIProvider& operator=(
|
||||||
|
const ElectronExtensionsBrowserAPIProvider&) = delete;
|
||||||
|
|
||||||
private:
|
void RegisterExtensionFunctions(ExtensionFunctionRegistry* registry) override;
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionsBrowserAPIProvider);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "extensions/browser/extensions_browser_client.h"
|
#include "extensions/browser/extensions_browser_client.h"
|
||||||
#include "extensions/browser/kiosk/kiosk_delegate.h"
|
#include "extensions/browser/kiosk/kiosk_delegate.h"
|
||||||
|
@ -39,6 +38,12 @@ class ElectronExtensionsBrowserClient
|
||||||
ElectronExtensionsBrowserClient();
|
ElectronExtensionsBrowserClient();
|
||||||
~ElectronExtensionsBrowserClient() override;
|
~ElectronExtensionsBrowserClient() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronExtensionsBrowserClient(const ElectronExtensionsBrowserClient&) =
|
||||||
|
delete;
|
||||||
|
ElectronExtensionsBrowserClient& operator=(
|
||||||
|
const ElectronExtensionsBrowserClient&) = delete;
|
||||||
|
|
||||||
// ExtensionsBrowserClient overrides:
|
// ExtensionsBrowserClient overrides:
|
||||||
bool IsShuttingDown() override;
|
bool IsShuttingDown() override;
|
||||||
bool AreExtensionsDisabled(const base::CommandLine& command_line,
|
bool AreExtensionsDisabled(const base::CommandLine& command_line,
|
||||||
|
@ -138,8 +143,6 @@ class ElectronExtensionsBrowserClient
|
||||||
|
|
||||||
std::unique_ptr<extensions::ElectronComponentExtensionResourceManager>
|
std::unique_ptr<extensions::ElectronComponentExtensionResourceManager>
|
||||||
resource_manager_;
|
resource_manager_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronExtensionsBrowserClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -18,6 +18,11 @@ class ElectronMessagingDelegate : public MessagingDelegate {
|
||||||
ElectronMessagingDelegate();
|
ElectronMessagingDelegate();
|
||||||
~ElectronMessagingDelegate() override;
|
~ElectronMessagingDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronMessagingDelegate(const ElectronMessagingDelegate&) = delete;
|
||||||
|
ElectronMessagingDelegate& operator=(const ElectronMessagingDelegate&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// MessagingDelegate:
|
// MessagingDelegate:
|
||||||
PolicyPermission IsNativeMessagingHostAllowed(
|
PolicyPermission IsNativeMessagingHostAllowed(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
|
@ -48,9 +53,6 @@ class ElectronMessagingDelegate : public MessagingDelegate {
|
||||||
content::WebContents* source_contents,
|
content::WebContents* source_contents,
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
base::OnceCallback<void(bool)> callback) override;
|
base::OnceCallback<void(bool)> callback) override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronMessagingDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "content/public/browser/navigation_ui_data.h"
|
#include "content/public/browser/navigation_ui_data.h"
|
||||||
#include "extensions/browser/extension_navigation_ui_data.h"
|
#include "extensions/browser/extension_navigation_ui_data.h"
|
||||||
|
|
||||||
|
@ -25,6 +24,10 @@ class ElectronNavigationUIData : public content::NavigationUIData {
|
||||||
content::NavigationHandle* navigation_handle);
|
content::NavigationHandle* navigation_handle);
|
||||||
~ElectronNavigationUIData() override;
|
~ElectronNavigationUIData() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronNavigationUIData(const ElectronNavigationUIData&) = delete;
|
||||||
|
ElectronNavigationUIData& operator=(const ElectronNavigationUIData&) = delete;
|
||||||
|
|
||||||
// Creates a new ChromeNavigationUIData that is a deep copy of the original.
|
// Creates a new ChromeNavigationUIData that is a deep copy of the original.
|
||||||
// Any changes to the original after the clone is created will not be
|
// Any changes to the original after the clone is created will not be
|
||||||
// reflected in the clone. |extension_data_| is deep copied.
|
// reflected in the clone. |extension_data_| is deep copied.
|
||||||
|
@ -40,8 +43,6 @@ class ElectronNavigationUIData : public content::NavigationUIData {
|
||||||
private:
|
private:
|
||||||
// Manages the lifetime of optional ExtensionNavigationUIData information.
|
// Manages the lifetime of optional ExtensionNavigationUIData information.
|
||||||
std::unique_ptr<ExtensionNavigationUIData> extension_data_;
|
std::unique_ptr<ExtensionNavigationUIData> extension_data_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronNavigationUIData);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_
|
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "content/public/browser/notification_observer.h"
|
#include "content/public/browser/notification_observer.h"
|
||||||
#include "content/public/browser/notification_registrar.h"
|
#include "content/public/browser/notification_registrar.h"
|
||||||
#include "extensions/browser/process_manager_delegate.h"
|
#include "extensions/browser/process_manager_delegate.h"
|
||||||
|
@ -23,6 +22,12 @@ class ElectronProcessManagerDelegate : public ProcessManagerDelegate {
|
||||||
ElectronProcessManagerDelegate();
|
ElectronProcessManagerDelegate();
|
||||||
~ElectronProcessManagerDelegate() override;
|
~ElectronProcessManagerDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronProcessManagerDelegate(const ElectronProcessManagerDelegate&) =
|
||||||
|
delete;
|
||||||
|
ElectronProcessManagerDelegate& operator=(
|
||||||
|
const ElectronProcessManagerDelegate&) = delete;
|
||||||
|
|
||||||
// ProcessManagerDelegate implementation:
|
// ProcessManagerDelegate implementation:
|
||||||
bool AreBackgroundPagesAllowedForContext(
|
bool AreBackgroundPagesAllowedForContext(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
|
@ -31,9 +36,6 @@ class ElectronProcessManagerDelegate : public ProcessManagerDelegate {
|
||||||
const Extension& extension) const override;
|
const Extension& extension) const override;
|
||||||
bool DeferCreatingStartupBackgroundHosts(
|
bool DeferCreatingStartupBackgroundHosts(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronProcessManagerDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
#ifndef SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
||||||
#define SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
#define SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "services/device/public/cpp/geolocation/location_provider.h"
|
#include "services/device/public/cpp/geolocation/location_provider.h"
|
||||||
#include "services/device/public/mojom/geoposition.mojom.h"
|
#include "services/device/public/mojom/geoposition.mojom.h"
|
||||||
|
|
||||||
|
@ -16,6 +15,10 @@ class FakeLocationProvider : public device::LocationProvider {
|
||||||
FakeLocationProvider();
|
FakeLocationProvider();
|
||||||
~FakeLocationProvider() override;
|
~FakeLocationProvider() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
FakeLocationProvider(const FakeLocationProvider&) = delete;
|
||||||
|
FakeLocationProvider& operator=(const FakeLocationProvider&) = delete;
|
||||||
|
|
||||||
// LocationProvider Implementation:
|
// LocationProvider Implementation:
|
||||||
void SetUpdateCallback(
|
void SetUpdateCallback(
|
||||||
const LocationProviderUpdateCallback& callback) override;
|
const LocationProviderUpdateCallback& callback) override;
|
||||||
|
@ -27,8 +30,6 @@ class FakeLocationProvider : public device::LocationProvider {
|
||||||
private:
|
private:
|
||||||
device::mojom::Geoposition position_;
|
device::mojom::Geoposition position_;
|
||||||
LocationProviderUpdateCallback callback_;
|
LocationProviderUpdateCallback callback_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(FakeLocationProvider);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/scoped_observation.h"
|
#include "base/scoped_observation.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
|
@ -46,6 +45,10 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||||
public content::RenderWidgetHostObserver,
|
public content::RenderWidgetHostObserver,
|
||||||
private net::DirectoryLister::DirectoryListerDelegate {
|
private net::DirectoryLister::DirectoryListerDelegate {
|
||||||
public:
|
public:
|
||||||
|
// disable copy
|
||||||
|
FileSelectHelper(const FileSelectHelper&) = delete;
|
||||||
|
FileSelectHelper& operator=(const FileSelectHelper&) = delete;
|
||||||
|
|
||||||
// Show the file chooser dialog.
|
// Show the file chooser dialog.
|
||||||
static void RunFileChooser(
|
static void RunFileChooser(
|
||||||
content::RenderFrameHost* render_frame_host,
|
content::RenderFrameHost* render_frame_host,
|
||||||
|
@ -224,8 +227,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||||
// Temporary files only used on OSX. This class is responsible for deleting
|
// Temporary files only used on OSX. This class is responsible for deleting
|
||||||
// these files when they are no longer needed.
|
// these files when they are no longer needed.
|
||||||
std::vector<base::FilePath> temporary_files_;
|
std::vector<base::FilePath> temporary_files_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHELL_BROWSER_FILE_SELECT_HELPER_H_
|
#endif // SHELL_BROWSER_FILE_SELECT_HELPER_H_
|
||||||
|
|
|
@ -17,12 +17,15 @@ class ElectronFontAccessDelegate : public content::FontAccessDelegate {
|
||||||
ElectronFontAccessDelegate();
|
ElectronFontAccessDelegate();
|
||||||
~ElectronFontAccessDelegate() override;
|
~ElectronFontAccessDelegate() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ElectronFontAccessDelegate(const ElectronFontAccessDelegate&) = delete;
|
||||||
|
ElectronFontAccessDelegate& operator=(const ElectronFontAccessDelegate&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
std::unique_ptr<content::FontAccessChooser> RunChooser(
|
std::unique_ptr<content::FontAccessChooser> RunChooser(
|
||||||
content::RenderFrameHost* frame,
|
content::RenderFrameHost* frame,
|
||||||
const std::vector<std::string>& selection,
|
const std::vector<std::string>& selection,
|
||||||
content::FontAccessChooser::Callback callback) override;
|
content::FontAccessChooser::Callback callback) override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ElectronFontAccessDelegate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_
|
#endif // SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#ifndef SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_
|
#ifndef SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_
|
||||||
#define SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_
|
#define SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
||||||
|
|
||||||
|
@ -21,6 +20,10 @@ class HidChooserContextFactory : public BrowserContextKeyedServiceFactory {
|
||||||
content::BrowserContext* context);
|
content::BrowserContext* context);
|
||||||
static HidChooserContextFactory* GetInstance();
|
static HidChooserContextFactory* GetInstance();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
HidChooserContextFactory(const HidChooserContextFactory&) = delete;
|
||||||
|
HidChooserContextFactory& operator=(const HidChooserContextFactory&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend base::NoDestructor<HidChooserContextFactory>;
|
friend base::NoDestructor<HidChooserContextFactory>;
|
||||||
|
|
||||||
|
@ -33,8 +36,6 @@ class HidChooserContextFactory : public BrowserContextKeyedServiceFactory {
|
||||||
content::BrowserContext* GetBrowserContextToUse(
|
content::BrowserContext* GetBrowserContextToUse(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
void BrowserContextShutdown(content::BrowserContext* context) override;
|
void BrowserContextShutdown(content::BrowserContext* context) override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(HidChooserContextFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "content/public/browser/global_routing_id.h"
|
#include "content/public/browser/global_routing_id.h"
|
||||||
#include "content/public/browser/hid_chooser.h"
|
#include "content/public/browser/hid_chooser.h"
|
||||||
|
|
|
@ -35,14 +35,19 @@ class ConvertableToTraceFormatWrapper final
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat> inner)
|
std::unique_ptr<v8::ConvertableToTraceFormat> inner)
|
||||||
: inner_(std::move(inner)) {}
|
: inner_(std::move(inner)) {}
|
||||||
~ConvertableToTraceFormatWrapper() override = default;
|
~ConvertableToTraceFormatWrapper() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
ConvertableToTraceFormatWrapper(const ConvertableToTraceFormatWrapper&) =
|
||||||
|
delete;
|
||||||
|
ConvertableToTraceFormatWrapper& operator=(
|
||||||
|
const ConvertableToTraceFormatWrapper&) = delete;
|
||||||
|
|
||||||
void AppendAsTraceFormat(std::string* out) const final {
|
void AppendAsTraceFormat(std::string* out) const final {
|
||||||
inner_->AppendAsTraceFormat(out);
|
inner_->AppendAsTraceFormat(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat> inner_;
|
std::unique_ptr<v8::ConvertableToTraceFormat> inner_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ConvertableToTraceFormatWrapper);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gin
|
} // namespace gin
|
||||||
|
@ -183,6 +188,10 @@ class EnabledStateObserverImpl final
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
EnabledStateObserverImpl(const EnabledStateObserverImpl&) = delete;
|
||||||
|
EnabledStateObserverImpl& operator=(const EnabledStateObserverImpl&) = delete;
|
||||||
|
|
||||||
void OnTraceLogEnabled() final {
|
void OnTraceLogEnabled() final {
|
||||||
base::AutoLock lock(mutex_);
|
base::AutoLock lock(mutex_);
|
||||||
for (auto* o : observers_) {
|
for (auto* o : observers_) {
|
||||||
|
@ -218,8 +227,6 @@ class EnabledStateObserverImpl final
|
||||||
private:
|
private:
|
||||||
base::Lock mutex_;
|
base::Lock mutex_;
|
||||||
std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
|
std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(EnabledStateObserverImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
base::LazyInstance<EnabledStateObserverImpl>::Leaky g_trace_state_dispatcher =
|
base::LazyInstance<EnabledStateObserverImpl>::Leaky g_trace_state_dispatcher =
|
||||||
|
@ -230,6 +237,10 @@ class TracingControllerImpl : public node::tracing::TracingController {
|
||||||
TracingControllerImpl() = default;
|
TracingControllerImpl() = default;
|
||||||
~TracingControllerImpl() override = default;
|
~TracingControllerImpl() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
TracingControllerImpl(const TracingControllerImpl&) = delete;
|
||||||
|
TracingControllerImpl& operator=(const TracingControllerImpl&) = delete;
|
||||||
|
|
||||||
// TracingController implementation.
|
// TracingController implementation.
|
||||||
const uint8_t* GetCategoryGroupEnabled(const char* name) override {
|
const uint8_t* GetCategoryGroupEnabled(const char* name) override {
|
||||||
return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(name);
|
return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(name);
|
||||||
|
@ -306,9 +317,6 @@ class TracingControllerImpl : public node::tracing::TracingController {
|
||||||
void RemoveTraceStateObserver(TraceStateObserver* observer) override {
|
void RemoveTraceStateObserver(TraceStateObserver* observer) override {
|
||||||
g_trace_state_dispatcher.Get().RemoveObserver(observer);
|
g_trace_state_dispatcher.Get().RemoveObserver(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) {
|
v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "gin/public/isolate_holder.h"
|
#include "gin/public/isolate_holder.h"
|
||||||
#include "uv.h" // NOLINT(build/include_directory)
|
#include "uv.h" // NOLINT(build/include_directory)
|
||||||
#include "v8/include/v8-locker.h"
|
#include "v8/include/v8-locker.h"
|
||||||
|
@ -26,6 +25,10 @@ class JavascriptEnvironment {
|
||||||
explicit JavascriptEnvironment(uv_loop_t* event_loop);
|
explicit JavascriptEnvironment(uv_loop_t* event_loop);
|
||||||
~JavascriptEnvironment();
|
~JavascriptEnvironment();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
JavascriptEnvironment(const JavascriptEnvironment&) = delete;
|
||||||
|
JavascriptEnvironment& operator=(const JavascriptEnvironment&) = delete;
|
||||||
|
|
||||||
void OnMessageLoopCreated();
|
void OnMessageLoopCreated();
|
||||||
void OnMessageLoopDestroying();
|
void OnMessageLoopDestroying();
|
||||||
|
|
||||||
|
@ -48,8 +51,6 @@ class JavascriptEnvironment {
|
||||||
v8::Global<v8::Context> context_;
|
v8::Global<v8::Context> context_;
|
||||||
|
|
||||||
std::unique_ptr<MicrotasksRunner> microtasks_runner_;
|
std::unique_ptr<MicrotasksRunner> microtasks_runner_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(JavascriptEnvironment);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Manage the Node Environment automatically.
|
// Manage the Node Environment automatically.
|
||||||
|
@ -58,12 +59,14 @@ class NodeEnvironment {
|
||||||
explicit NodeEnvironment(node::Environment* env);
|
explicit NodeEnvironment(node::Environment* env);
|
||||||
~NodeEnvironment();
|
~NodeEnvironment();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NodeEnvironment(const NodeEnvironment&) = delete;
|
||||||
|
NodeEnvironment& operator=(const NodeEnvironment&) = delete;
|
||||||
|
|
||||||
node::Environment* env() { return env_; }
|
node::Environment* env() { return env_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
node::Environment* env_;
|
node::Environment* env_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NodeEnvironment);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -25,6 +25,10 @@ class BluetoothChooser : public content::BluetoothChooser {
|
||||||
const EventHandler& handler);
|
const EventHandler& handler);
|
||||||
~BluetoothChooser() override;
|
~BluetoothChooser() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
BluetoothChooser(const BluetoothChooser&) = delete;
|
||||||
|
BluetoothChooser& operator=(const BluetoothChooser&) = delete;
|
||||||
|
|
||||||
// content::BluetoothChooser:
|
// content::BluetoothChooser:
|
||||||
void SetAdapterPresence(AdapterPresence presence) override;
|
void SetAdapterPresence(AdapterPresence presence) override;
|
||||||
void ShowDiscoveryState(DiscoveryState state) override;
|
void ShowDiscoveryState(DiscoveryState state) override;
|
||||||
|
@ -43,8 +47,6 @@ class BluetoothChooser : public content::BluetoothChooser {
|
||||||
int num_retries_ = 0;
|
int num_retries_ = 0;
|
||||||
bool refreshing_ = false;
|
bool refreshing_ = false;
|
||||||
bool rescan_ = false;
|
bool rescan_ = false;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BluetoothChooser);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/power_monitor/power_observer.h"
|
#include "base/power_monitor/power_observer.h"
|
||||||
#include "dbus/bus.h"
|
#include "dbus/bus.h"
|
||||||
|
@ -22,6 +21,10 @@ class PowerObserverLinux {
|
||||||
explicit PowerObserverLinux(base::PowerSuspendObserver* suspend_observer);
|
explicit PowerObserverLinux(base::PowerSuspendObserver* suspend_observer);
|
||||||
~PowerObserverLinux();
|
~PowerObserverLinux();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
PowerObserverLinux(const PowerObserverLinux&) = delete;
|
||||||
|
PowerObserverLinux& operator=(const PowerObserverLinux&) = delete;
|
||||||
|
|
||||||
void SetShutdownHandler(base::RepeatingCallback<bool()> should_shutdown);
|
void SetShutdownHandler(base::RepeatingCallback<bool()> should_shutdown);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -46,8 +49,6 @@ class PowerObserverLinux {
|
||||||
base::ScopedFD sleep_lock_;
|
base::ScopedFD sleep_lock_;
|
||||||
base::ScopedFD shutdown_lock_;
|
base::ScopedFD shutdown_lock_;
|
||||||
base::WeakPtrFactory<PowerObserverLinux> weak_ptr_factory_{this};
|
base::WeakPtrFactory<PowerObserverLinux> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PowerObserverLinux);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -33,6 +33,10 @@ class LoginHandler : public content::LoginDelegate,
|
||||||
LoginAuthRequiredCallback auth_required_callback);
|
LoginAuthRequiredCallback auth_required_callback);
|
||||||
~LoginHandler() override;
|
~LoginHandler() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
LoginHandler(const LoginHandler&) = delete;
|
||||||
|
LoginHandler& operator=(const LoginHandler&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EmitEvent(net::AuthChallengeInfo auth_info,
|
void EmitEvent(net::AuthChallengeInfo auth_info,
|
||||||
bool is_main_frame,
|
bool is_main_frame,
|
||||||
|
@ -44,8 +48,6 @@ class LoginHandler : public content::LoginDelegate,
|
||||||
LoginAuthRequiredCallback auth_required_callback_;
|
LoginAuthRequiredCallback auth_required_callback_;
|
||||||
|
|
||||||
base::WeakPtrFactory<LoginHandler> weak_factory_{this};
|
base::WeakPtrFactory<LoginHandler> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(LoginHandler);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -47,6 +47,10 @@ class TransactionObserver {
|
||||||
TransactionObserver();
|
TransactionObserver();
|
||||||
virtual ~TransactionObserver();
|
virtual ~TransactionObserver();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
TransactionObserver(const TransactionObserver&) = delete;
|
||||||
|
TransactionObserver& operator=(const TransactionObserver&) = delete;
|
||||||
|
|
||||||
virtual void OnTransactionsUpdated(
|
virtual void OnTransactionsUpdated(
|
||||||
const std::vector<Transaction>& transactions) = 0;
|
const std::vector<Transaction>& transactions) = 0;
|
||||||
|
|
||||||
|
@ -54,8 +58,6 @@ class TransactionObserver {
|
||||||
InAppTransactionObserver* observer_;
|
InAppTransactionObserver* observer_;
|
||||||
|
|
||||||
base::WeakPtrFactory<TransactionObserver> weak_ptr_factory_{this};
|
base::WeakPtrFactory<TransactionObserver> weak_ptr_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(TransactionObserver);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace in_app_purchase
|
} // namespace in_app_purchase
|
||||||
|
|
|
@ -67,6 +67,11 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||||
blink::mojom::MediaStreamType stream_type,
|
blink::mojom::MediaStreamType stream_type,
|
||||||
bool is_secure) override;
|
bool is_secure) override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
MediaCaptureDevicesDispatcher(const MediaCaptureDevicesDispatcher&) = delete;
|
||||||
|
MediaCaptureDevicesDispatcher& operator=(
|
||||||
|
const MediaCaptureDevicesDispatcher&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct base::DefaultSingletonTraits<MediaCaptureDevicesDispatcher>;
|
friend struct base::DefaultSingletonTraits<MediaCaptureDevicesDispatcher>;
|
||||||
|
|
||||||
|
@ -81,8 +86,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||||
|
|
||||||
// Flag used by unittests to disable device enumeration.
|
// Flag used by unittests to disable device enumeration.
|
||||||
bool is_device_enumeration_disabled_ = false;
|
bool is_device_enumeration_disabled_ = false;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "components/prefs/pref_member.h"
|
#include "components/prefs/pref_member.h"
|
||||||
|
|
||||||
class PrefRegistrySimple;
|
class PrefRegistrySimple;
|
||||||
|
@ -23,6 +22,10 @@ class MediaDeviceIDSalt {
|
||||||
explicit MediaDeviceIDSalt(PrefService* pref_service);
|
explicit MediaDeviceIDSalt(PrefService* pref_service);
|
||||||
~MediaDeviceIDSalt();
|
~MediaDeviceIDSalt();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
MediaDeviceIDSalt(const MediaDeviceIDSalt&) = delete;
|
||||||
|
MediaDeviceIDSalt& operator=(const MediaDeviceIDSalt&) = delete;
|
||||||
|
|
||||||
std::string GetSalt();
|
std::string GetSalt();
|
||||||
|
|
||||||
static void RegisterPrefs(PrefRegistrySimple* pref_registry);
|
static void RegisterPrefs(PrefRegistrySimple* pref_registry);
|
||||||
|
@ -30,8 +33,6 @@ class MediaDeviceIDSalt {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StringPrefMember media_device_id_salt_;
|
StringPrefMember media_device_id_salt_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MediaDeviceIDSalt);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -17,6 +17,11 @@ class MediaStreamDevicesController {
|
||||||
|
|
||||||
virtual ~MediaStreamDevicesController();
|
virtual ~MediaStreamDevicesController();
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
MediaStreamDevicesController(const MediaStreamDevicesController&) = delete;
|
||||||
|
MediaStreamDevicesController& operator=(const MediaStreamDevicesController&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// Accept or deny the request based on the default policy.
|
// Accept or deny the request based on the default policy.
|
||||||
bool TakeAction();
|
bool TakeAction();
|
||||||
|
|
||||||
|
@ -37,8 +42,6 @@ class MediaStreamDevicesController {
|
||||||
|
|
||||||
bool microphone_requested_;
|
bool microphone_requested_;
|
||||||
bool webcam_requested_;
|
bool webcam_requested_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
#include "content/public/browser/web_contents_observer.h"
|
#include "content/public/browser/web_contents_observer.h"
|
||||||
#include "shell/common/api/api.mojom.h"
|
#include "shell/common/api/api.mojom.h"
|
||||||
|
@ -33,6 +32,10 @@ class NativeBrowserView : public content::WebContentsObserver {
|
||||||
public:
|
public:
|
||||||
~NativeBrowserView() override;
|
~NativeBrowserView() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NativeBrowserView(const NativeBrowserView&) = delete;
|
||||||
|
NativeBrowserView& operator=(const NativeBrowserView&) = delete;
|
||||||
|
|
||||||
static NativeBrowserView* Create(
|
static NativeBrowserView* Create(
|
||||||
InspectableWebContents* inspectable_web_contents);
|
InspectableWebContents* inspectable_web_contents);
|
||||||
|
|
||||||
|
@ -65,9 +68,6 @@ class NativeBrowserView : public content::WebContentsObserver {
|
||||||
|
|
||||||
InspectableWebContents* inspectable_web_contents_;
|
InspectableWebContents* inspectable_web_contents_;
|
||||||
std::vector<mojom::DraggableRegionPtr> draggable_regions_;
|
std::vector<mojom::DraggableRegionPtr> draggable_regions_;
|
||||||
|
|
||||||
private:
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeBrowserView);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -29,8 +29,6 @@ class NativeBrowserViewMac : public NativeBrowserView {
|
||||||
|
|
||||||
void UpdateDraggableRegions(
|
void UpdateDraggableRegions(
|
||||||
const std::vector<gfx::Rect>& drag_exclude_rects) override;
|
const std::vector<gfx::Rect>& drag_exclude_rects) override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewMac);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -52,8 +52,6 @@ class NativeBrowserViewViews : public NativeBrowserView {
|
||||||
float auto_vertical_proportion_top_ = 0.;
|
float auto_vertical_proportion_top_ = 0.;
|
||||||
|
|
||||||
std::unique_ptr<SkRegion> draggable_region_;
|
std::unique_ptr<SkRegion> draggable_region_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewViews);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -57,6 +57,10 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
public:
|
public:
|
||||||
~NativeWindow() override;
|
~NativeWindow() override;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NativeWindow(const NativeWindow&) = delete;
|
||||||
|
NativeWindow& operator=(const NativeWindow&) = delete;
|
||||||
|
|
||||||
// Create window with existing WebContents, the caller is responsible for
|
// Create window with existing WebContents, the caller is responsible for
|
||||||
// managing the window's live.
|
// managing the window's live.
|
||||||
static NativeWindow* Create(const gin_helper::Dictionary& options,
|
static NativeWindow* Create(const gin_helper::Dictionary& options,
|
||||||
|
@ -412,8 +416,6 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
gfx::Rect overlay_rect_;
|
gfx::Rect overlay_rect_;
|
||||||
|
|
||||||
base::WeakPtrFactory<NativeWindow> weak_factory_{this};
|
base::WeakPtrFactory<NativeWindow> weak_factory_{this};
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeWindow);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This class provides a hook to get a NativeWindow from a WebContents.
|
// This class provides a hook to get a NativeWindow from a WebContents.
|
||||||
|
|
|
@ -282,8 +282,6 @@ class NativeWindowMac : public NativeWindow,
|
||||||
|
|
||||||
// The presentation options before entering simple fullscreen mode.
|
// The presentation options before entering simple fullscreen mode.
|
||||||
NSApplicationPresentationOptions simple_fullscreen_options_;
|
NSApplicationPresentationOptions simple_fullscreen_options_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeWindowMac);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -136,6 +136,10 @@ class NativeWindowClientView : public views::ClientView {
|
||||||
: views::ClientView(widget, root_view), window_(window) {}
|
: views::ClientView(widget, root_view), window_(window) {}
|
||||||
~NativeWindowClientView() override = default;
|
~NativeWindowClientView() override = default;
|
||||||
|
|
||||||
|
// disable copy
|
||||||
|
NativeWindowClientView(const NativeWindowClientView&) = delete;
|
||||||
|
NativeWindowClientView& operator=(const NativeWindowClientView&) = delete;
|
||||||
|
|
||||||
views::CloseRequestResult OnWindowCloseRequested() override {
|
views::CloseRequestResult OnWindowCloseRequested() override {
|
||||||
window_->NotifyWindowCloseButtonClicked();
|
window_->NotifyWindowCloseButtonClicked();
|
||||||
return views::CloseRequestResult::kCannotClose;
|
return views::CloseRequestResult::kCannotClose;
|
||||||
|
@ -143,8 +147,6 @@ class NativeWindowClientView : public views::ClientView {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NativeWindowViews* window_;
|
NativeWindowViews* window_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeWindowClientView);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue