chore: enable check raw ptr fields (#38167)
This commit is contained in:
parent
141175c723
commit
3dbc0a365f
120 changed files with 298 additions and 185 deletions
|
@ -50,8 +50,5 @@ use_qt = false
|
||||||
# TODO(codebytere): fix perfetto incompatibility with Node.js.
|
# TODO(codebytere): fix perfetto incompatibility with Node.js.
|
||||||
use_perfetto_client_library = false
|
use_perfetto_client_library = false
|
||||||
|
|
||||||
# Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4402277
|
|
||||||
enable_check_raw_ptr_fields = false
|
|
||||||
|
|
||||||
# Disables the builtins PGO for V8
|
# Disables the builtins PGO for V8
|
||||||
v8_builtins_profiling_log_file = ""
|
v8_builtins_profiling_log_file = ""
|
||||||
|
|
|
@ -51,7 +51,7 @@ index 5b53653eb8448c3904fda67f054dd2ec4bbca338..a89b923bcece48d6eaece3d5ac5c5bfc
|
||||||
// This may only be called on NetworkContexts created with the constructor
|
// This may only be called on NetworkContexts created with the constructor
|
||||||
// that calls MakeURLRequestContext().
|
// that calls MakeURLRequestContext().
|
||||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||||
index ca1d417743e4ac3c1d3f9833c7d5cfc261d59087..35283c28c40d47f2ebd064a511e6da06b55fed0a 100644
|
index 87e9c6b2549e0db4a3cd88f6528eeb84327ec183..34d2c1a33983489dc56e18a2a7bbd6717645c7a3 100644
|
||||||
--- a/services/network/network_context.h
|
--- a/services/network/network_context.h
|
||||||
+++ b/services/network/network_context.h
|
+++ b/services/network/network_context.h
|
||||||
@@ -315,6 +315,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
@@ -315,6 +315,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||||
|
|
|
@ -41,7 +41,7 @@ index 707a8346ea5bf49e20bac5669d777a8ab247dc51..69c82dd102e7e746db68c6ab4768a40a
|
||||||
content::RenderProcessHost* host) {
|
content::RenderProcessHost* host) {
|
||||||
InitForRenderer(host);
|
InitForRenderer(host);
|
||||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
|
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
|
||||||
index 00e613bb4ca4346eb0b0e65b9b818d817ac724d9..bd9745d29a61944a23b83b274aace2ea8cb37a0f 100644
|
index 00e613bb4ca4346eb0b0e65b9b818d817ac724d9..1b40931b8654b80e9a5fd0f170217b4b008eaae9 100644
|
||||||
--- a/chrome/browser/spellchecker/spellcheck_service.h
|
--- a/chrome/browser/spellchecker/spellcheck_service.h
|
||||||
+++ b/chrome/browser/spellchecker/spellcheck_service.h
|
+++ b/chrome/browser/spellchecker/spellcheck_service.h
|
||||||
@@ -135,6 +135,8 @@ class SpellcheckService : public KeyedService,
|
@@ -135,6 +135,8 @@ class SpellcheckService : public KeyedService,
|
||||||
|
@ -57,7 +57,7 @@ index 00e613bb4ca4346eb0b0e65b9b818d817ac724d9..bd9745d29a61944a23b83b274aace2ea
|
||||||
// A pointer to the BrowserContext which this service refers to.
|
// A pointer to the BrowserContext which this service refers to.
|
||||||
raw_ptr<content::BrowserContext> context_;
|
raw_ptr<content::BrowserContext> context_;
|
||||||
|
|
||||||
+ SpellcheckHunspellDictionary::Observer* hunspell_observer_ = nullptr;
|
+ raw_ptr<SpellcheckHunspellDictionary::Observer> hunspell_observer_ = nullptr;
|
||||||
+
|
+
|
||||||
std::unique_ptr<SpellCheckHostMetrics> metrics_;
|
std::unique_ptr<SpellCheckHostMetrics> metrics_;
|
||||||
|
|
||||||
|
|
|
@ -583,7 +583,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
|
||||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||||
};
|
};
|
||||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||||
index c9f14ed6547ba1f5cdaade063452036ac402885a..2d1718afbea84b3e4395ce511e2618848ef85859 100644
|
index c9f14ed6547ba1f5cdaade063452036ac402885a..ddb28fd6f7549759df7e3b7d6b309cd982e199af 100644
|
||||||
--- a/ui/compositor/compositor.h
|
--- a/ui/compositor/compositor.h
|
||||||
+++ b/ui/compositor/compositor.h
|
+++ b/ui/compositor/compositor.h
|
||||||
@@ -89,6 +89,7 @@ class DisplayPrivate;
|
@@ -89,6 +89,7 @@ class DisplayPrivate;
|
||||||
|
@ -625,7 +625,7 @@ index c9f14ed6547ba1f5cdaade063452036ac402885a..2d1718afbea84b3e4395ce511e261884
|
||||||
|
|
||||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||||
|
|
||||||
+ CompositorDelegate* delegate_ = nullptr;
|
+ raw_ptr<CompositorDelegate> delegate_ = nullptr;
|
||||||
+
|
+
|
||||||
// The root of the Layer tree drawn by this compositor.
|
// The root of the Layer tree drawn by this compositor.
|
||||||
raw_ptr<Layer> root_layer_ = nullptr;
|
raw_ptr<Layer> root_layer_ = nullptr;
|
||||||
|
|
|
@ -21,7 +21,7 @@ index 69f9ffbf4826421491118a0b200d6c71e41f8950..c3b7f6fa146ac335b0d18a749a61600c
|
||||||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||||
// state into account.
|
// state into account.
|
||||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||||
index 86cb0de1e87a444bdd8d00bc2a981a8abbb94234..33d3af13ec5c243828412671a198070d09ad895d 100644
|
index 44d75c043805f9bfb4b08741fc652aafc6c50740..41c15ba67ad66245fdac2ada8e9f0de755fe01be 100644
|
||||||
--- a/content/public/browser/web_contents.h
|
--- a/content/public/browser/web_contents.h
|
||||||
+++ b/content/public/browser/web_contents.h
|
+++ b/content/public/browser/web_contents.h
|
||||||
@@ -702,6 +702,10 @@ class WebContents : public PageNavigator,
|
@@ -702,6 +702,10 @@ class WebContents : public PageNavigator,
|
||||||
|
|
|
@ -147,7 +147,7 @@ index 479b87b12cae8cc7727b198e0d15b97a569cfc28..5b53653eb8448c3904fda67f054dd2ec
|
||||||
|
|
||||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||||
index a314820247451f507b92bb8e41891cd2958ae45b..ca1d417743e4ac3c1d3f9833c7d5cfc261d59087 100644
|
index a314820247451f507b92bb8e41891cd2958ae45b..87e9c6b2549e0db4a3cd88f6528eeb84327ec183 100644
|
||||||
--- a/services/network/network_context.h
|
--- a/services/network/network_context.h
|
||||||
+++ b/services/network/network_context.h
|
+++ b/services/network/network_context.h
|
||||||
@@ -114,6 +114,7 @@ class URLMatcher;
|
@@ -114,6 +114,7 @@ class URLMatcher;
|
||||||
|
@ -171,7 +171,7 @@ index a314820247451f507b92bb8e41891cd2958ae45b..ca1d417743e4ac3c1d3f9833c7d5cfc2
|
||||||
std::vector<base::OnceClosure> dismount_closures_;
|
std::vector<base::OnceClosure> dismount_closures_;
|
||||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||||
|
|
||||||
+ RemoteCertVerifier* remote_cert_verifier_ = nullptr;
|
+ raw_ptr<RemoteCertVerifier> remote_cert_verifier_ = nullptr;
|
||||||
+
|
+
|
||||||
// Created on-demand. Null if unused.
|
// Created on-demand. Null if unused.
|
||||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||||
|
|
|
@ -35,7 +35,7 @@ index 57a810427461b8240d5f8da88e6ae2815b06c69a..a114c8a72670037fe0f4b9d95c16a670
|
||||||
CHECK(view_.get());
|
CHECK(view_.get());
|
||||||
|
|
||||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||||
index 8baf744895c941df36d770ad17fca925a1dfd45f..86cb0de1e87a444bdd8d00bc2a981a8abbb94234 100644
|
index 8baf744895c941df36d770ad17fca925a1dfd45f..44d75c043805f9bfb4b08741fc652aafc6c50740 100644
|
||||||
--- a/content/public/browser/web_contents.h
|
--- a/content/public/browser/web_contents.h
|
||||||
+++ b/content/public/browser/web_contents.h
|
+++ b/content/public/browser/web_contents.h
|
||||||
@@ -96,10 +96,13 @@ class BrowserContext;
|
@@ -96,10 +96,13 @@ class BrowserContext;
|
||||||
|
@ -57,8 +57,8 @@ index 8baf744895c941df36d770ad17fca925a1dfd45f..86cb0de1e87a444bdd8d00bc2a981a8a
|
||||||
network::mojom::WebSandboxFlags::kNone;
|
network::mojom::WebSandboxFlags::kNone;
|
||||||
|
|
||||||
+ // Optionally specify the view and delegate view.
|
+ // Optionally specify the view and delegate view.
|
||||||
+ content::WebContentsView* view = nullptr;
|
+ raw_ptr<content::WebContentsView> view = nullptr;
|
||||||
+ content::RenderViewHostDelegateView* delegate_view = nullptr;
|
+ raw_ptr<content::RenderViewHostDelegateView> delegate_view = nullptr;
|
||||||
+
|
+
|
||||||
// Value used to set the last time the WebContents was made active, this is
|
// Value used to set the last time the WebContents was made active, this is
|
||||||
// the value that'll be returned by GetLastActiveTime(). If this is left
|
// the value that'll be returned by GetLastActiveTime(). If this is left
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/task/single_thread_task_runner.h"
|
#include "base/task/single_thread_task_runner.h"
|
||||||
#include "uv.h" // NOLINT(build/include_directory)
|
#include "uv.h" // NOLINT(build/include_directory)
|
||||||
|
|
||||||
|
@ -41,7 +42,7 @@ class UvTaskRunner : public base::SingleThreadTaskRunner {
|
||||||
static void OnTimeout(uv_timer_t* timer);
|
static void OnTimeout(uv_timer_t* timer);
|
||||||
static void OnClose(uv_handle_t* handle);
|
static void OnClose(uv_handle_t* handle);
|
||||||
|
|
||||||
uv_loop_t* loop_;
|
raw_ptr<uv_loop_t> loop_;
|
||||||
|
|
||||||
std::map<uv_timer_t*, base::OnceClosure> tasks_;
|
std::map<uv_timer_t*, base::OnceClosure> tasks_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,9 +76,8 @@ gin::WrapperInfo BrowserView::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||||
BrowserView::BrowserView(gin::Arguments* args,
|
BrowserView::BrowserView(gin::Arguments* args,
|
||||||
const gin_helper::Dictionary& options)
|
const gin_helper::Dictionary& options)
|
||||||
: id_(GetNextId()) {
|
: id_(GetNextId()) {
|
||||||
v8::Isolate* isolate = args->isolate();
|
|
||||||
gin_helper::Dictionary web_preferences =
|
gin_helper::Dictionary web_preferences =
|
||||||
gin::Dictionary::CreateEmpty(isolate);
|
gin::Dictionary::CreateEmpty(args->isolate());
|
||||||
options.Get(options::kWebPreferences, &web_preferences);
|
options.Get(options::kWebPreferences, &web_preferences);
|
||||||
web_preferences.Set("type", "browserView");
|
web_preferences.Set("type", "browserView");
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ BrowserView::BrowserView(gin::Arguments* args,
|
||||||
auto web_contents =
|
auto web_contents =
|
||||||
WebContents::CreateFromWebPreferences(args->isolate(), web_preferences);
|
WebContents::CreateFromWebPreferences(args->isolate(), web_preferences);
|
||||||
|
|
||||||
web_contents_.Reset(isolate, web_contents.ToV8());
|
web_contents_.Reset(args->isolate(), web_contents.ToV8());
|
||||||
api_web_contents_ = web_contents.get();
|
api_web_contents_ = web_contents.get();
|
||||||
api_web_contents_->AddObserver(this);
|
api_web_contents_->AddObserver(this);
|
||||||
Observe(web_contents->web_contents());
|
Observe(web_contents->web_contents());
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/web_contents_observer.h"
|
#include "content/public/browser/web_contents_observer.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
|
@ -79,7 +80,7 @@ class BrowserView : public gin::Wrappable<BrowserView>,
|
||||||
v8::Local<v8::Value> GetWebContents(v8::Isolate*);
|
v8::Local<v8::Value> GetWebContents(v8::Isolate*);
|
||||||
|
|
||||||
v8::Global<v8::Value> web_contents_;
|
v8::Global<v8::Value> web_contents_;
|
||||||
class WebContents* api_web_contents_ = nullptr;
|
class raw_ptr<WebContents> api_web_contents_ = nullptr;
|
||||||
|
|
||||||
std::unique_ptr<NativeBrowserView> view_;
|
std::unique_ptr<NativeBrowserView> view_;
|
||||||
base::WeakPtr<BaseWindow> owner_window_;
|
base::WeakPtr<BaseWindow> owner_window_;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/callback_list.h"
|
#include "base/callback_list.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "net/cookies/canonical_cookie.h"
|
#include "net/cookies/canonical_cookie.h"
|
||||||
|
@ -61,7 +62,7 @@ class Cookies : public gin::Wrappable<Cookies>,
|
||||||
base::CallbackListSubscription cookie_change_subscription_;
|
base::CallbackListSubscription cookie_change_subscription_;
|
||||||
|
|
||||||
// Weak reference; ElectronBrowserContext is guaranteed to outlive us.
|
// Weak reference; ElectronBrowserContext is guaranteed to outlive us.
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
|
@ -129,7 +130,7 @@ class DataPipeReader {
|
||||||
std::vector<char> buffer_;
|
std::vector<char> buffer_;
|
||||||
|
|
||||||
// The head of buffer.
|
// The head of buffer.
|
||||||
char* head_ = nullptr;
|
raw_ptr<char> head_ = nullptr;
|
||||||
|
|
||||||
// Remaining data to read.
|
// Remaining data to read.
|
||||||
uint64_t remaining_size_ = 0;
|
uint64_t remaining_size_ = 0;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "content/public/browser/devtools_agent_host_client.h"
|
#include "content/public/browser/devtools_agent_host_client.h"
|
||||||
#include "content/public/browser/web_contents_observer.h"
|
#include "content/public/browser/web_contents_observer.h"
|
||||||
|
@ -65,7 +66,7 @@ class Debugger : public gin::Wrappable<Debugger>,
|
||||||
v8::Local<v8::Promise> SendCommand(gin::Arguments* args);
|
v8::Local<v8::Promise> SendCommand(gin::Arguments* args);
|
||||||
void ClearPendingRequests();
|
void ClearPendingRequests();
|
||||||
|
|
||||||
content::WebContents* web_contents_; // Weak Reference.
|
raw_ptr<content::WebContents> web_contents_; // Weak Reference.
|
||||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||||
|
|
||||||
PendingRequestMap pending_requests_;
|
PendingRequestMap pending_requests_;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "components/download/public/common/download_item.h"
|
#include "components/download/public/common/download_item.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
|
@ -78,9 +79,9 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
|
||||||
|
|
||||||
base::FilePath save_path_;
|
base::FilePath save_path_;
|
||||||
file_dialog::DialogSettings dialog_options_;
|
file_dialog::DialogSettings dialog_options_;
|
||||||
download::DownloadItem* download_item_;
|
raw_ptr<download::DownloadItem> download_item_;
|
||||||
|
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
|
|
||||||
base::WeakPtrFactory<DownloadItem> weak_factory_{this};
|
base::WeakPtrFactory<DownloadItem> weak_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "gin/arguments.h"
|
#include "gin/arguments.h"
|
||||||
#include "shell/browser/api/electron_api_base_window.h"
|
#include "shell/browser/api/electron_api_base_window.h"
|
||||||
#include "shell/browser/event_emitter_mixin.h"
|
#include "shell/browser/event_emitter_mixin.h"
|
||||||
|
@ -82,7 +83,7 @@ class Menu : public gin::Wrappable<Menu>,
|
||||||
virtual std::u16string GetAcceleratorTextAtForTesting(int index) const;
|
virtual std::u16string GetAcceleratorTextAtForTesting(int index) const;
|
||||||
|
|
||||||
std::unique_ptr<ElectronMenuModel> model_;
|
std::unique_ptr<ElectronMenuModel> model_;
|
||||||
Menu* parent_ = nullptr;
|
raw_ptr<Menu> parent_ = nullptr;
|
||||||
|
|
||||||
// Observable:
|
// Observable:
|
||||||
void OnMenuWillClose() override;
|
void OnMenuWillClose() override;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
#include "shell/browser/event_emitter_mixin.h"
|
#include "shell/browser/event_emitter_mixin.h"
|
||||||
|
@ -51,8 +52,8 @@ class NativeTheme : public gin::Wrappable<NativeTheme>,
|
||||||
void OnNativeThemeUpdatedOnUI();
|
void OnNativeThemeUpdatedOnUI();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ui::NativeTheme* ui_theme_;
|
raw_ptr<ui::NativeTheme> ui_theme_;
|
||||||
ui::NativeTheme* web_theme_;
|
raw_ptr<ui::NativeTheme> web_theme_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -62,7 +63,7 @@ class NetLog : public gin::Wrappable<NetLog> {
|
||||||
void NetLogStarted(int32_t error);
|
void NetLogStarted(int32_t error);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
|
|
||||||
mojo::Remote<network::mojom::NetLogExporter> net_log_exporter_;
|
mojo::Remote<network::mojom::NetLogExporter> net_log_exporter_;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
#include "shell/browser/event_emitter_mixin.h"
|
#include "shell/browser/event_emitter_mixin.h"
|
||||||
|
@ -108,7 +109,7 @@ class Notification : public gin::Wrappable<Notification>,
|
||||||
std::u16string close_button_text_;
|
std::u16string close_button_text_;
|
||||||
std::u16string toast_xml_;
|
std::u16string toast_xml_;
|
||||||
|
|
||||||
electron::NotificationPresenter* presenter_;
|
raw_ptr<electron::NotificationPresenter> presenter_;
|
||||||
|
|
||||||
base::WeakPtr<electron::Notification> notification_;
|
base::WeakPtr<electron::Notification> notification_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
|
@ -101,7 +102,7 @@ class Protocol : public gin::Wrappable<Protocol>,
|
||||||
|
|
||||||
// Weak pointer; the lifetime of the ProtocolRegistry is guaranteed to be
|
// Weak pointer; the lifetime of the ProtocolRegistry is guaranteed to be
|
||||||
// longer than the lifetime of this JS interface.
|
// longer than the lifetime of this JS interface.
|
||||||
ProtocolRegistry* protocol_registry_;
|
raw_ptr<ProtocolRegistry> protocol_registry_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
#include "shell/browser/event_emitter_mixin.h"
|
#include "shell/browser/event_emitter_mixin.h"
|
||||||
#include "shell/common/gin_helper/error_thrower.h"
|
#include "shell/common/gin_helper/error_thrower.h"
|
||||||
|
@ -53,7 +54,7 @@ class Screen : public gin::Wrappable<Screen>,
|
||||||
uint32_t changed_metrics) override;
|
uint32_t changed_metrics) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
display::Screen* screen_;
|
raw_ptr<display::Screen> screen_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_
|
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_
|
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/service_worker_context.h"
|
#include "content/public/browser/service_worker_context.h"
|
||||||
#include "content/public/browser/service_worker_context_observer.h"
|
#include "content/public/browser/service_worker_context_observer.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
|
@ -53,7 +54,7 @@ class ServiceWorkerContext
|
||||||
~ServiceWorkerContext() override;
|
~ServiceWorkerContext() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
content::ServiceWorkerContext* service_worker_context_;
|
raw_ptr<content::ServiceWorkerContext> service_worker_context_;
|
||||||
|
|
||||||
base::WeakPtrFactory<ServiceWorkerContext> weak_ptr_factory_{this};
|
base::WeakPtrFactory<ServiceWorkerContext> weak_ptr_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/guid.h"
|
#include "base/guid.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
|
@ -327,7 +328,7 @@ class DictionaryObserver final : public SpellcheckCustomDictionary::Observer {
|
||||||
struct UserDataLink : base::SupportsUserData::Data {
|
struct UserDataLink : base::SupportsUserData::Data {
|
||||||
explicit UserDataLink(Session* ses) : session(ses) {}
|
explicit UserDataLink(Session* ses) : session(ses) {}
|
||||||
|
|
||||||
Session* session;
|
raw_ptr<Session> session;
|
||||||
};
|
};
|
||||||
|
|
||||||
const void* kElectronApiSessionKey = &kElectronApiSessionKey;
|
const void* kElectronApiSessionKey = &kElectronApiSessionKey;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "content/public/browser/download_manager.h"
|
#include "content/public/browser/download_manager.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
@ -203,12 +204,12 @@ class Session : public gin::Wrappable<Session>,
|
||||||
v8::Global<v8::Value> service_worker_context_;
|
v8::Global<v8::Value> service_worker_context_;
|
||||||
v8::Global<v8::Value> web_request_;
|
v8::Global<v8::Value> web_request_;
|
||||||
|
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
|
|
||||||
// The client id to enable the network throttler.
|
// The client id to enable the network throttler.
|
||||||
base::UnguessableToken network_emulation_token_;
|
base::UnguessableToken network_emulation_token_;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "gin/object_template_builder.h"
|
#include "gin/object_template_builder.h"
|
||||||
|
@ -312,7 +313,7 @@ class JSChunkedDataPipeGetter : public gin::Wrappable<JSChunkedDataPipeGetter>,
|
||||||
bool is_writing_ = false;
|
bool is_writing_ = false;
|
||||||
uint64_t bytes_written_ = 0;
|
uint64_t bytes_written_ = 0;
|
||||||
|
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
v8::Global<v8::Function> body_func_;
|
v8::Global<v8::Function> body_func_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||||
|
@ -122,7 +123,7 @@ class SimpleURLLoaderWrapper
|
||||||
void Pin();
|
void Pin();
|
||||||
void PinBodyGetter(v8::Local<v8::Value>);
|
void PinBodyGetter(v8::Local<v8::Value>);
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
int request_options_;
|
int request_options_;
|
||||||
std::unique_ptr<network::ResourceRequest> request_;
|
std::unique_ptr<network::ResourceRequest> request_;
|
||||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
|
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
#include "shell/common/gin_helper/wrappable.h"
|
#include "shell/common/gin_helper/wrappable.h"
|
||||||
|
@ -44,7 +45,7 @@ class View : public gin_helper::Wrappable<View> {
|
||||||
std::vector<v8::Global<v8::Object>> child_views_;
|
std::vector<v8::Global<v8::Object>> child_views_;
|
||||||
|
|
||||||
bool delete_view_ = true;
|
bool delete_view_ = true;
|
||||||
views::View* view_ = nullptr;
|
raw_ptr<views::View> view_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/observer_list_types.h"
|
#include "base/observer_list_types.h"
|
||||||
|
@ -766,13 +768,13 @@ class WebContents : public ExclusiveAccessContext,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The host webcontents that may contain this webcontents.
|
// The host webcontents that may contain this webcontents.
|
||||||
WebContents* embedder_ = nullptr;
|
RAW_PTR_EXCLUSION WebContents* embedder_ = nullptr;
|
||||||
|
|
||||||
// Whether the guest view has been attached.
|
// Whether the guest view has been attached.
|
||||||
bool attached_ = false;
|
bool attached_ = false;
|
||||||
|
|
||||||
// The zoom controller for this webContents.
|
// The zoom controller for this webContents.
|
||||||
WebContentsZoomController* zoom_controller_ = nullptr;
|
raw_ptr<WebContentsZoomController> zoom_controller_ = nullptr;
|
||||||
|
|
||||||
// The type of current WebContents.
|
// The type of current WebContents.
|
||||||
Type type_ = Type::kBrowserWindow;
|
Type type_ = Type::kBrowserWindow;
|
||||||
|
@ -810,7 +812,7 @@ class WebContents : public ExclusiveAccessContext,
|
||||||
|
|
||||||
std::unique_ptr<DevToolsEyeDropper> eye_dropper_;
|
std::unique_ptr<DevToolsEyeDropper> eye_dropper_;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
|
|
||||||
// The stored InspectableWebContents object.
|
// The stored InspectableWebContents object.
|
||||||
// Notice that inspectable_web_contents_ must be placed after
|
// Notice that inspectable_web_contents_ must be placed after
|
||||||
|
@ -835,7 +837,7 @@ class WebContents : public ExclusiveAccessContext,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Stores the frame thats currently in fullscreen, nullptr if there is none.
|
// Stores the frame thats currently in fullscreen, nullptr if there is none.
|
||||||
content::RenderFrameHost* fullscreen_frame_ = nullptr;
|
raw_ptr<content::RenderFrameHost> fullscreen_frame_ = nullptr;
|
||||||
|
|
||||||
std::unique_ptr<SkRegion> draggable_region_;
|
std::unique_ptr<SkRegion> draggable_region_;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ WebContentsView::~WebContentsView() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gin::Handle<WebContents> WebContentsView::GetWebContents(v8::Isolate* isolate) {
|
gin::Handle<WebContents> WebContentsView::GetWebContents(v8::Isolate* isolate) {
|
||||||
return gin::CreateHandle(isolate, api_web_contents_);
|
return gin::CreateHandle(isolate, api_web_contents_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
int WebContentsView::NonClientHitTest(const gfx::Point& point) {
|
int WebContentsView::NonClientHitTest(const gfx::Point& point) {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/web_contents_observer.h"
|
#include "content/public/browser/web_contents_observer.h"
|
||||||
#include "shell/browser/api/electron_api_view.h"
|
#include "shell/browser/api/electron_api_view.h"
|
||||||
#include "shell/browser/draggable_region_provider.h"
|
#include "shell/browser/draggable_region_provider.h"
|
||||||
|
@ -53,7 +54,7 @@ class WebContentsView : public View,
|
||||||
|
|
||||||
// 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_;
|
raw_ptr<api::WebContents> api_web_contents_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/process/process.h"
|
#include "base/process/process.h"
|
||||||
#include "gin/handle.h"
|
#include "gin/handle.h"
|
||||||
|
@ -122,7 +123,7 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
||||||
|
|
||||||
int frame_tree_node_id_;
|
int frame_tree_node_id_;
|
||||||
|
|
||||||
content::RenderFrameHost* render_frame_ = nullptr;
|
raw_ptr<content::RenderFrameHost> render_frame_ = nullptr;
|
||||||
|
|
||||||
// Whether the RenderFrameHost has been removed and that it should no longer
|
// Whether the RenderFrameHost has been removed and that it should no longer
|
||||||
// be accessed.
|
// be accessed.
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/task/sequenced_task_runner.h"
|
#include "base/task/sequenced_task_runner.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
|
@ -91,7 +92,7 @@ const char kUserDataKey[] = "WebRequest";
|
||||||
// BrowserContext <=> WebRequest relationship.
|
// BrowserContext <=> WebRequest relationship.
|
||||||
struct UserData : public base::SupportsUserData::Data {
|
struct UserData : public base::SupportsUserData::Data {
|
||||||
explicit UserData(WebRequest* data) : data(data) {}
|
explicit UserData(WebRequest* data) : data(data) {}
|
||||||
WebRequest* data;
|
raw_ptr<WebRequest> data;
|
||||||
};
|
};
|
||||||
|
|
||||||
extensions::WebRequestResourceType ParseResourceType(const std::string& value) {
|
extensions::WebRequestResourceType ParseResourceType(const std::string& value) {
|
||||||
|
@ -612,7 +613,7 @@ gin::Handle<WebRequest> WebRequest::From(
|
||||||
static_cast<UserData*>(browser_context->GetUserData(kUserDataKey));
|
static_cast<UserData*>(browser_context->GetUserData(kUserDataKey));
|
||||||
if (!user_data)
|
if (!user_data)
|
||||||
return gin::Handle<WebRequest>();
|
return gin::Handle<WebRequest>();
|
||||||
return gin::CreateHandle(isolate, user_data->data);
|
return gin::CreateHandle(isolate, user_data->data.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "extensions/common/url_pattern.h"
|
#include "extensions/common/url_pattern.h"
|
||||||
#include "gin/arguments.h"
|
#include "gin/arguments.h"
|
||||||
|
@ -167,7 +168,7 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
||||||
std::map<uint64_t, net::CompletionOnceCallback> callbacks_;
|
std::map<uint64_t, net::CompletionOnceCallback> callbacks_;
|
||||||
|
|
||||||
// Weak-ref, it manages us.
|
// Weak-ref, it manages us.
|
||||||
content::BrowserContext* browser_context_;
|
raw_ptr<content::BrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
|
@ -69,7 +70,7 @@ class FrameSubscriber : public content::WebContentsObserver,
|
||||||
FrameCaptureCallback callback_;
|
FrameCaptureCallback callback_;
|
||||||
bool only_dirty_;
|
bool only_dirty_;
|
||||||
|
|
||||||
content::RenderWidgetHost* host_;
|
raw_ptr<content::RenderWidgetHost> host_;
|
||||||
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};
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/browser/gpu/gpu_data_manager_impl.h" // nogncheck
|
#include "content/browser/gpu/gpu_data_manager_impl.h" // nogncheck
|
||||||
#include "content/public/browser/gpu_data_manager.h"
|
#include "content/public/browser/gpu_data_manager.h"
|
||||||
#include "content/public/browser/gpu_data_manager_observer.h"
|
#include "content/public/browser/gpu_data_manager_observer.h"
|
||||||
|
@ -42,7 +43,7 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
||||||
// This set maintains all the promises that should be fulfilled
|
// This set maintains all the promises that should be fulfilled
|
||||||
// once we have the complete information data
|
// once we have the complete information data
|
||||||
std::vector<gin_helper::Promise<base::Value>> complete_info_promise_set_;
|
std::vector<gin_helper::Promise<base::Value>> complete_info_promise_set_;
|
||||||
content::GpuDataManagerImpl* gpu_data_manager_;
|
raw_ptr<content::GpuDataManagerImpl> gpu_data_manager_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_
|
#ifndef ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_
|
#define ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "components/download/public/common/download_item.h"
|
#include "components/download/public/common/download_item.h"
|
||||||
#include "content/public/browser/download_manager.h"
|
#include "content/public/browser/download_manager.h"
|
||||||
#include "content/public/browser/save_page_type.h"
|
#include "content/public/browser/save_page_type.h"
|
||||||
|
@ -42,7 +43,7 @@ class SavePageHandler : public content::DownloadManager::Observer,
|
||||||
// download::DownloadItem::Observer:
|
// download::DownloadItem::Observer:
|
||||||
void OnDownloadUpdated(download::DownloadItem* item) override;
|
void OnDownloadUpdated(download::DownloadItem* item) override;
|
||||||
|
|
||||||
content::WebContents* web_contents_; // weak
|
raw_ptr<content::WebContents> web_contents_; // weak
|
||||||
gin_helper::Promise<void> promise_;
|
gin_helper::Promise<void> promise_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
|
||||||
|
@ -107,7 +108,7 @@ class CertificateManagerModel {
|
||||||
static void GetCertDBOnIOThread(content::ResourceContext* context,
|
static void GetCertDBOnIOThread(content::ResourceContext* context,
|
||||||
CreationCallback callback);
|
CreationCallback callback);
|
||||||
|
|
||||||
net::NSSCertDatabase* cert_db_;
|
raw_ptr<net::NSSCertDatabase> cert_db_;
|
||||||
// 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_;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#define ELECTRON_SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_
|
#define ELECTRON_SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_
|
||||||
|
|
||||||
#include "base/callback_list.h"
|
#include "base/callback_list.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -36,7 +37,7 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
|
||||||
// network::mojom::CookieChangeListener implementation.
|
// network::mojom::CookieChangeListener implementation.
|
||||||
void OnCookieChange(const net::CookieChangeInfo& change) override;
|
void OnCookieChange(const net::CookieChangeInfo& change) override;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
base::RepeatingCallbackList<void(const net::CookieChangeInfo& change)>
|
base::RepeatingCallbackList<void(const net::CookieChangeInfo& change)>
|
||||||
cookie_change_sub_list_;
|
cookie_change_sub_list_;
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "shell/browser/ui/autofill_popup.h"
|
#include "shell/browser/ui/autofill_popup.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
||||||
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
|
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
|
||||||
#include "shell/common/api/api.mojom.h"
|
#include "shell/common/api/api.mojom.h"
|
||||||
|
@ -35,7 +36,7 @@ class AutofillDriver : public mojom::ElectronAutofillDriver {
|
||||||
void HideAutofillPopup() override;
|
void HideAutofillPopup() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
content::RenderFrameHost* const render_frame_host_;
|
raw_ptr<content::RenderFrameHost> const render_frame_host_;
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS)
|
#if defined(TOOLKIT_VIEWS)
|
||||||
std::unique_ptr<AutofillPopup> autofill_popup_;
|
std::unique_ptr<AutofillPopup> autofill_popup_;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/synchronization/lock.h"
|
#include "base/synchronization/lock.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
#include "content/public/browser/render_process_host_observer.h"
|
#include "content/public/browser/render_process_host_observer.h"
|
||||||
|
@ -314,7 +315,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||||
std::unique_ptr<PlatformNotificationService> notification_service_;
|
std::unique_ptr<PlatformNotificationService> notification_service_;
|
||||||
std::unique_ptr<NotificationPresenter> notification_presenter_;
|
std::unique_ptr<NotificationPresenter> notification_presenter_;
|
||||||
|
|
||||||
Delegate* delegate_ = nullptr;
|
raw_ptr<Delegate> delegate_ = nullptr;
|
||||||
|
|
||||||
std::string user_agent_override_ = "";
|
std::string user_agent_override_ = "";
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "chrome/browser/predictors/preconnect_manager.h"
|
#include "chrome/browser/predictors/preconnect_manager.h"
|
||||||
#include "content/public/browser/browser_context.h"
|
#include "content/public/browser/browser_context.h"
|
||||||
|
@ -259,7 +259,7 @@ class ElectronBrowserContext : public content::BrowserContext {
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||||
// Owned by the KeyedService system.
|
// Owned by the KeyedService system.
|
||||||
extensions::ElectronExtensionSystem* extension_system_;
|
raw_ptr<extensions::ElectronExtensionSystem> extension_system_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Shared URLLoaderFactory.
|
// Shared URLLoaderFactory.
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_
|
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_
|
#define ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "content/public/browser/download_manager_delegate.h"
|
#include "content/public/browser/download_manager_delegate.h"
|
||||||
#include "shell/browser/ui/file_dialog.h"
|
#include "shell/browser/ui/file_dialog.h"
|
||||||
|
@ -58,7 +59,7 @@ class ElectronDownloadManagerDelegate
|
||||||
|
|
||||||
base::FilePath last_saved_directory_;
|
base::FilePath last_saved_directory_;
|
||||||
|
|
||||||
content::DownloadManager* download_manager_;
|
raw_ptr<content::DownloadManager> download_manager_;
|
||||||
base::WeakPtrFactory<ElectronDownloadManagerDelegate> weak_ptr_factory_{this};
|
base::WeakPtrFactory<ElectronDownloadManagerDelegate> weak_ptr_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
@ -36,7 +37,7 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
||||||
bool RestartDevice(std::string* error_message) override;
|
bool RestartDevice(std::string* error_message) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
content::BrowserContext* browser_context_;
|
raw_ptr<content::BrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "extensions/browser/api/execute_code_function.h"
|
#include "extensions/browser/api/execute_code_function.h"
|
||||||
#include "extensions/browser/extension_function.h"
|
#include "extensions/browser/extension_function.h"
|
||||||
#include "extensions/common/extension_resource.h"
|
#include "extensions/common/extension_resource.h"
|
||||||
|
@ -107,7 +108,7 @@ class TabsUpdateFunction : public ExtensionFunction {
|
||||||
bool UpdateURL(const std::string& url, int tab_id, std::string* error);
|
bool UpdateURL(const std::string& url, int tab_id, std::string* error);
|
||||||
ResponseValue GetResult();
|
ResponseValue GetResult();
|
||||||
|
|
||||||
content::WebContents* web_contents_;
|
raw_ptr<content::WebContents> web_contents_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ResponseAction Run() override;
|
ResponseAction Run() override;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -80,7 +81,7 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
|
||||||
bool CanDisableExtension(const Extension* extension) override;
|
bool CanDisableExtension(const Extension* extension) override;
|
||||||
bool ShouldBlockExtension(const Extension* extension) override;
|
bool ShouldBlockExtension(const Extension* extension) override;
|
||||||
|
|
||||||
content::BrowserContext* browser_context_; // Not owned.
|
raw_ptr<content::BrowserContext> browser_context_; // Not owned.
|
||||||
|
|
||||||
// Registers and unregisters extensions.
|
// Registers and unregisters extensions.
|
||||||
ExtensionRegistrar extension_registrar_;
|
ExtensionRegistrar extension_registrar_;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/task/sequenced_task_runner_helpers.h"
|
#include "base/task/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"
|
||||||
|
@ -63,7 +64,7 @@ class ElectronExtensionMessageFilter : public content::BrowserMessageFilter {
|
||||||
// be accessed on the UI thread! Furthermore since this class is refcounted it
|
// be accessed on the UI thread! Furthermore since this class is refcounted it
|
||||||
// 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_;
|
raw_ptr<content::BrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -92,7 +93,7 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
||||||
scoped_refptr<Extension> extension);
|
scoped_refptr<Extension> extension);
|
||||||
void LoadComponentExtensions();
|
void LoadComponentExtensions();
|
||||||
|
|
||||||
content::BrowserContext* browser_context_; // Not owned.
|
raw_ptr<content::BrowserContext> browser_context_; // Not owned.
|
||||||
|
|
||||||
std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
|
std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
|
||||||
std::unique_ptr<QuotaService> quota_service_;
|
std::unique_ptr<QuotaService> quota_service_;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -188,8 +189,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||||
|
|
||||||
// The RenderFrameHost and WebContents for the page showing a file dialog
|
// The RenderFrameHost and WebContents for the page showing a file dialog
|
||||||
// (may only be one such dialog).
|
// (may only be one such dialog).
|
||||||
content::RenderFrameHost* render_frame_host_;
|
raw_ptr<content::RenderFrameHost> render_frame_host_;
|
||||||
content::WebContents* web_contents_;
|
raw_ptr<content::WebContents> web_contents_;
|
||||||
|
|
||||||
// |listener_| receives the result of the FileSelectHelper.
|
// |listener_| receives the result of the FileSelectHelper.
|
||||||
scoped_refptr<content::FileSelectListener> listener_;
|
scoped_refptr<content::FileSelectListener> listener_;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/containers/queue.h"
|
#include "base/containers/queue.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/unguessable_token.h"
|
#include "base/unguessable_token.h"
|
||||||
|
@ -117,7 +118,7 @@ class HidChooserContext : public KeyedService,
|
||||||
const url::Origin& origin,
|
const url::Origin& origin,
|
||||||
const device::mojom::HidDeviceInfo& device);
|
const device::mojom::HidDeviceInfo& device);
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
|
|
||||||
bool is_initialized_ = false;
|
bool is_initialized_ = false;
|
||||||
base::queue<device::mojom::HidManager::GetDevicesCallback>
|
base::queue<device::mojom::HidManager::GetDevicesCallback>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -42,7 +43,7 @@ class JavascriptEnvironment {
|
||||||
v8::Isolate* Initialize(uv_loop_t* event_loop, bool setup_wasm_streaming);
|
v8::Isolate* Initialize(uv_loop_t* event_loop, bool setup_wasm_streaming);
|
||||||
std::unique_ptr<node::MultiIsolatePlatform> platform_;
|
std::unique_ptr<node::MultiIsolatePlatform> platform_;
|
||||||
|
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
gin::IsolateHolder isolate_holder_;
|
gin::IsolateHolder isolate_holder_;
|
||||||
v8::Locker locker_;
|
v8::Locker locker_;
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ class NodeEnvironment {
|
||||||
node::Environment* env() { return env_; }
|
node::Environment* env() { return env_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
node::Environment* env_;
|
raw_ptr<node::Environment> env_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/bluetooth_chooser.h"
|
#include "content/public/browser/bluetooth_chooser.h"
|
||||||
#include "shell/browser/api/electron_api_web_contents.h"
|
#include "shell/browser/api/electron_api_web_contents.h"
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ class BluetoothChooser : public content::BluetoothChooser {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, std::u16string> device_map_;
|
std::map<std::string, std::u16string> device_map_;
|
||||||
api::WebContents* api_web_contents_;
|
raw_ptr<api::WebContents> api_web_contents_;
|
||||||
EventHandler event_handler_;
|
EventHandler event_handler_;
|
||||||
bool refreshing_ = false;
|
bool refreshing_ = false;
|
||||||
bool rescan_ = false;
|
bool rescan_ = false;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.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"
|
||||||
|
@ -42,7 +43,7 @@ class PowerObserverLinux {
|
||||||
bool success);
|
bool success);
|
||||||
|
|
||||||
base::RepeatingCallback<bool()> should_shutdown_;
|
base::RepeatingCallback<bool()> should_shutdown_;
|
||||||
base::PowerSuspendObserver* suspend_observer_ = nullptr;
|
raw_ptr<base::PowerSuspendObserver> suspend_observer_ = nullptr;
|
||||||
|
|
||||||
scoped_refptr<dbus::ObjectProxy> logind_;
|
scoped_refptr<dbus::ObjectProxy> logind_;
|
||||||
std::string lock_owner_name_;
|
std::string lock_owner_name_;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||||
|
|
||||||
|
@ -74,7 +75,7 @@ class TransactionObserver {
|
||||||
const std::vector<Transaction>& transactions) = 0;
|
const std::vector<Transaction>& transactions) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InAppTransactionObserver* observer_;
|
RAW_PTR_EXCLUSION InAppTransactionObserver* observer_;
|
||||||
|
|
||||||
base::WeakPtrFactory<TransactionObserver> weak_ptr_factory_{this};
|
base::WeakPtrFactory<TransactionObserver> weak_ptr_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_
|
#ifndef ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_
|
#define ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/task/task_observer.h"
|
#include "base/task/task_observer.h"
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
|
@ -29,7 +30,7 @@ class MicrotasksRunner : public base::TaskObserver {
|
||||||
void DidProcessTask(const base::PendingTask& pending_task) override;
|
void DidProcessTask(const base::PendingTask& pending_task) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.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 "third_party/skia/include/core/SkColor.h"
|
#include "third_party/skia/include/core/SkColor.h"
|
||||||
|
@ -54,7 +55,7 @@ class NativeBrowserView : public content::WebContentsObserver {
|
||||||
// content::WebContentsObserver:
|
// content::WebContentsObserver:
|
||||||
void WebContentsDestroyed() override;
|
void WebContentsDestroyed() override;
|
||||||
|
|
||||||
InspectableWebContents* inspectable_web_contents_;
|
raw_ptr<InspectableWebContents> inspectable_web_contents_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/supports_user_data.h"
|
#include "base/supports_user_data.h"
|
||||||
|
@ -425,7 +426,7 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
static int32_t next_id_;
|
static int32_t next_id_;
|
||||||
|
|
||||||
// The content view, weak ref.
|
// The content view, weak ref.
|
||||||
views::View* content_view_ = nullptr;
|
raw_ptr<views::View> content_view_ = nullptr;
|
||||||
|
|
||||||
// Whether window has standard frame.
|
// Whether window has standard frame.
|
||||||
bool has_frame_ = true;
|
bool has_frame_ = true;
|
||||||
|
@ -458,7 +459,7 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
gfx::Size aspect_ratio_extraSize_;
|
gfx::Size aspect_ratio_extraSize_;
|
||||||
|
|
||||||
// The parent window, it is guaranteed to be valid during this window's life.
|
// The parent window, it is guaranteed to be valid during this window's life.
|
||||||
NativeWindow* parent_ = nullptr;
|
raw_ptr<NativeWindow> parent_ = nullptr;
|
||||||
|
|
||||||
// Is this a modal window.
|
// Is this a modal window.
|
||||||
bool is_modal_ = false;
|
bool is_modal_ = false;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/cxx17_backports.h"
|
#include "base/cxx17_backports.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
|
@ -163,7 +164,7 @@ class NativeWindowClientView : public views::ClientView {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NativeWindowViews* window_;
|
raw_ptr<NativeWindowViews> window_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "ui/views/widget/widget_observer.h"
|
#include "ui/views/widget/widget_observer.h"
|
||||||
|
|
||||||
#if defined(USE_OZONE)
|
#if defined(USE_OZONE)
|
||||||
|
@ -252,7 +253,7 @@ class NativeWindowViews : public NativeWindow,
|
||||||
std::unique_ptr<RootView> root_view_;
|
std::unique_ptr<RootView> root_view_;
|
||||||
|
|
||||||
// The view should be focused by default.
|
// The view should be focused by default.
|
||||||
views::View* focused_view_ = nullptr;
|
raw_ptr<views::View> focused_view_ = nullptr;
|
||||||
|
|
||||||
// The "resizable" flag on Linux is implemented by setting size constraints,
|
// The "resizable" flag on Linux is implemented by setting size constraints,
|
||||||
// we need to make sure size constraints are restored when window becomes
|
// we need to make sure size constraints are restored when window becomes
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
|
#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "chrome/browser/net/proxy_config_monitor.h"
|
#include "chrome/browser/net/proxy_config_monitor.h"
|
||||||
#include "components/keyed_service/core/keyed_service.h"
|
#include "components/keyed_service/core/keyed_service.h"
|
||||||
#include "mojo/public/cpp/bindings/remote.h"
|
#include "mojo/public/cpp/bindings/remote.h"
|
||||||
|
@ -36,7 +37,7 @@ class NetworkContextService : public KeyedService {
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
const base::FilePath& path);
|
const base::FilePath& path);
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
ProxyConfigMonitor proxy_config_monitor_;
|
ProxyConfigMonitor proxy_config_monitor_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "mojo/public/cpp/bindings/pending_remote.h"
|
#include "mojo/public/cpp/bindings/pending_remote.h"
|
||||||
#include "mojo/public/cpp/bindings/receiver.h"
|
#include "mojo/public/cpp/bindings/receiver.h"
|
||||||
#include "mojo/public/cpp/bindings/remote.h"
|
#include "mojo/public/cpp/bindings/remote.h"
|
||||||
|
@ -68,7 +69,7 @@ class NodeStreamLoader : public network::mojom::URLLoader {
|
||||||
mojo::Receiver<network::mojom::URLLoader> url_loader_;
|
mojo::Receiver<network::mojom::URLLoader> url_loader_;
|
||||||
mojo::Remote<network::mojom::URLLoaderClient> client_;
|
mojo::Remote<network::mojom::URLLoaderClient> client_;
|
||||||
|
|
||||||
v8::Isolate* isolate_;
|
raw_ptr<v8::Isolate> isolate_;
|
||||||
v8::Global<v8::Object> emitter_;
|
v8::Global<v8::Object> emitter_;
|
||||||
v8::Global<v8::Value> buffer_;
|
v8::Global<v8::Value> buffer_;
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
#include "content/public/browser/render_frame_host.h"
|
#include "content/public/browser/render_frame_host.h"
|
||||||
|
@ -131,7 +132,7 @@ class ProxyingURLLoaderFactory
|
||||||
void OnRequestError(const network::URLLoaderCompletionStatus& status);
|
void OnRequestError(const network::URLLoaderCompletionStatus& status);
|
||||||
void HandleBeforeRequestRedirect();
|
void HandleBeforeRequestRedirect();
|
||||||
|
|
||||||
ProxyingURLLoaderFactory* const factory_;
|
raw_ptr<ProxyingURLLoaderFactory> const factory_;
|
||||||
network::ResourceRequest request_;
|
network::ResourceRequest request_;
|
||||||
const absl::optional<url::Origin> original_initiator_;
|
const absl::optional<url::Origin> original_initiator_;
|
||||||
const uint64_t request_id_ = 0;
|
const uint64_t request_id_ = 0;
|
||||||
|
@ -247,7 +248,7 @@ class ProxyingURLLoaderFactory
|
||||||
bool ShouldIgnoreConnectionsLimit(const network::ResourceRequest& request);
|
bool ShouldIgnoreConnectionsLimit(const network::ResourceRequest& request);
|
||||||
|
|
||||||
// Passed from api::WebRequest.
|
// Passed from api::WebRequest.
|
||||||
WebRequestAPI* web_request_api_;
|
raw_ptr<WebRequestAPI> web_request_api_;
|
||||||
|
|
||||||
// This is passed from api::Protocol.
|
// This is passed from api::Protocol.
|
||||||
//
|
//
|
||||||
|
@ -260,7 +261,7 @@ class ProxyingURLLoaderFactory
|
||||||
|
|
||||||
const int render_process_id_;
|
const int render_process_id_;
|
||||||
const int frame_routing_id_;
|
const int frame_routing_id_;
|
||||||
uint64_t* request_id_generator_; // managed by ElectronBrowserClient
|
raw_ptr<uint64_t> request_id_generator_; // managed by ElectronBrowserClient
|
||||||
std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data_;
|
std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data_;
|
||||||
absl::optional<int64_t> navigation_id_;
|
absl::optional<int64_t> navigation_id_;
|
||||||
mojo::ReceiverSet<network::mojom::URLLoaderFactory> proxy_receivers_;
|
mojo::ReceiverSet<network::mojom::URLLoaderFactory> proxy_receivers_;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
#include "extensions/browser/api/web_request/web_request_info.h"
|
#include "extensions/browser/api/web_request/web_request_info.h"
|
||||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||||
|
@ -137,7 +138,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||||
void OnMojoConnectionError();
|
void OnMojoConnectionError();
|
||||||
|
|
||||||
// Passed from api::WebRequest.
|
// Passed from api::WebRequest.
|
||||||
WebRequestAPI* web_request_api_;
|
raw_ptr<WebRequestAPI> web_request_api_;
|
||||||
|
|
||||||
// Saved to feed the api::WebRequest.
|
// Saved to feed the api::WebRequest.
|
||||||
network::ResourceRequest request_;
|
network::ResourceRequest request_;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "mojo/public/cpp/bindings/receiver.h"
|
#include "mojo/public/cpp/bindings/receiver.h"
|
||||||
#include "net/base/address_list.h"
|
#include "net/base/address_list.h"
|
||||||
|
@ -58,7 +59,7 @@ class ResolveHostFunction
|
||||||
mojo::Receiver<network::mojom::ResolveHostClient> receiver_{this};
|
mojo::Receiver<network::mojom::ResolveHostClient> receiver_{this};
|
||||||
|
|
||||||
// Weak Ref
|
// Weak Ref
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
std::string host_;
|
std::string host_;
|
||||||
network::mojom::ResolveHostParametersPtr params_;
|
network::mojom::ResolveHostParametersPtr params_;
|
||||||
ResolveHostCallback callback_;
|
ResolveHostCallback callback_;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "mojo/public/cpp/bindings/receiver.h"
|
#include "mojo/public/cpp/bindings/receiver.h"
|
||||||
#include "services/network/public/mojom/proxy_lookup_client.mojom.h"
|
#include "services/network/public/mojom/proxy_lookup_client.mojom.h"
|
||||||
|
@ -70,7 +71,7 @@ class ResolveProxyHelper
|
||||||
mojo::Receiver<network::mojom::ProxyLookupClient> receiver_{this};
|
mojo::Receiver<network::mojom::ProxyLookupClient> receiver_{this};
|
||||||
|
|
||||||
// Weak Ref
|
// Weak Ref
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
#include "base/strings/string_split.h"
|
#include "base/strings/string_split.h"
|
||||||
#include "chrome/browser/browser_process.h"
|
#include "chrome/browser/browser_process.h"
|
||||||
|
@ -141,7 +142,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem
|
||||||
~URLLoaderFactoryForSystem() override = default;
|
~URLLoaderFactoryForSystem() override = default;
|
||||||
|
|
||||||
SEQUENCE_CHECKER(sequence_checker_);
|
SEQUENCE_CHECKER(sequence_checker_);
|
||||||
SystemNetworkContextManager* manager_;
|
raw_ptr<SystemNetworkContextManager> manager_;
|
||||||
};
|
};
|
||||||
|
|
||||||
network::mojom::NetworkContext* SystemNetworkContextManager::GetContext() {
|
network::mojom::NetworkContext* SystemNetworkContextManager::GetContext() {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
#ifndef ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
#define ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
|
#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
@ -29,7 +30,7 @@ class NetworkHintsHandlerImpl
|
||||||
private:
|
private:
|
||||||
explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
|
explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
|
||||||
|
|
||||||
content::BrowserContext* browser_context_ = nullptr;
|
raw_ptr<content::BrowserContext> browser_context_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
#endif // ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
|
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
|
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "library_loaders/libnotify_loader.h"
|
#include "library_loaders/libnotify_loader.h"
|
||||||
#include "shell/browser/notifications/notification.h"
|
#include "shell/browser/notifications/notification.h"
|
||||||
#include "ui/base/glib/glib_signal.h"
|
#include "ui/base/glib/glib_signal.h"
|
||||||
|
@ -34,7 +35,7 @@ class LibnotifyNotification : public Notification {
|
||||||
NotifyNotification*,
|
NotifyNotification*,
|
||||||
char*);
|
char*);
|
||||||
|
|
||||||
NotifyNotification* notification_ = nullptr;
|
RAW_PTR_EXCLUSION NotifyNotification* notification_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "third_party/skia/include/core/SkBitmap.h"
|
#include "third_party/skia/include/core/SkBitmap.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
|
@ -81,8 +82,8 @@ class Notification {
|
||||||
NotificationPresenter* presenter);
|
NotificationPresenter* presenter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NotificationDelegate* delegate_;
|
raw_ptr<NotificationDelegate> delegate_;
|
||||||
NotificationPresenter* presenter_;
|
raw_ptr<NotificationPresenter> presenter_;
|
||||||
std::string notification_id_;
|
std::string notification_id_;
|
||||||
|
|
||||||
base::WeakPtrFactory<Notification> weak_factory_{this};
|
base::WeakPtrFactory<Notification> weak_factory_{this};
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/platform_notification_service.h"
|
#include "content/public/browser/platform_notification_service.h"
|
||||||
|
|
||||||
namespace electron {
|
namespace electron {
|
||||||
|
@ -50,7 +51,7 @@ class PlatformNotificationService
|
||||||
base::Time ReadNextTriggerTimestamp() override;
|
base::Time ReadNextTriggerTimestamp() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ElectronBrowserClient* browser_client_;
|
raw_ptr<ElectronBrowserClient> browser_client_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "base/functional/callback_helpers.h"
|
#include "base/functional/callback_helpers.h"
|
||||||
#include "base/location.h"
|
#include "base/location.h"
|
||||||
#include "base/memory/ptr_util.h"
|
#include "base/memory/ptr_util.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/task/single_thread_task_runner.h"
|
#include "base/task/single_thread_task_runner.h"
|
||||||
#include "base/time/time.h"
|
#include "base/time/time.h"
|
||||||
#include "components/viz/common/features.h"
|
#include "components/viz/common/features.h"
|
||||||
|
@ -167,7 +168,7 @@ class ElectronDelegatedFrameHostClient
|
||||||
void InvalidateLocalSurfaceIdOnEviction() override {}
|
void InvalidateLocalSurfaceIdOnEviction() override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OffScreenRenderWidgetHostView* const view_;
|
const raw_ptr<OffScreenRenderWidgetHostView> view_;
|
||||||
};
|
};
|
||||||
|
|
||||||
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
||||||
|
@ -635,7 +636,7 @@ OffScreenRenderWidgetHostView::CreateHostDisplayClient(
|
||||||
base::BindRepeating(&OffScreenRenderWidgetHostView::OnPaint,
|
base::BindRepeating(&OffScreenRenderWidgetHostView::OnPaint,
|
||||||
weak_ptr_factory_.GetWeakPtr()));
|
weak_ptr_factory_.GetWeakPtr()));
|
||||||
host_display_client_->SetActive(IsPainting());
|
host_display_client_->SetActive(IsPainting());
|
||||||
return base::WrapUnique(host_display_client_);
|
return base::WrapUnique(host_display_client_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenRenderWidgetHostView::InstallTransparency() {
|
bool OffScreenRenderWidgetHostView::InstallTransparency() {
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/process/kill.h"
|
#include "base/process/kill.h"
|
||||||
#include "base/threading/thread.h"
|
#include "base/threading/thread.h"
|
||||||
#include "base/time/time.h"
|
#include "base/time/time.h"
|
||||||
|
@ -243,11 +244,11 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
||||||
void UpdateBackgroundColorFromRenderer(SkColor color);
|
void UpdateBackgroundColorFromRenderer(SkColor color);
|
||||||
|
|
||||||
// Weak ptrs.
|
// Weak ptrs.
|
||||||
content::RenderWidgetHostImpl* render_widget_host_;
|
raw_ptr<content::RenderWidgetHostImpl> render_widget_host_;
|
||||||
|
|
||||||
OffScreenRenderWidgetHostView* parent_host_view_ = nullptr;
|
raw_ptr<OffScreenRenderWidgetHostView> parent_host_view_ = nullptr;
|
||||||
OffScreenRenderWidgetHostView* popup_host_view_ = nullptr;
|
raw_ptr<OffScreenRenderWidgetHostView> popup_host_view_ = nullptr;
|
||||||
OffScreenRenderWidgetHostView* child_host_view_ = nullptr;
|
raw_ptr<OffScreenRenderWidgetHostView> child_host_view_ = nullptr;
|
||||||
std::set<OffScreenRenderWidgetHostView*> guest_host_views_;
|
std::set<OffScreenRenderWidgetHostView*> guest_host_views_;
|
||||||
std::set<OffscreenViewProxy*> proxy_views_;
|
std::set<OffscreenViewProxy*> proxy_views_;
|
||||||
|
|
||||||
|
@ -285,7 +286,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
||||||
|
|
||||||
std::unique_ptr<content::CursorManager> cursor_manager_;
|
std::unique_ptr<content::CursorManager> cursor_manager_;
|
||||||
|
|
||||||
OffScreenHostDisplayClient* host_display_client_;
|
raw_ptr<OffScreenHostDisplayClient> host_display_client_;
|
||||||
std::unique_ptr<OffScreenVideoConsumer> video_consumer_;
|
std::unique_ptr<OffScreenVideoConsumer> video_consumer_;
|
||||||
|
|
||||||
std::unique_ptr<ElectronDelegatedFrameHostClient>
|
std::unique_ptr<ElectronDelegatedFrameHostClient>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
||||||
#include "media/capture/mojom/video_capture_buffer.mojom-forward.h"
|
#include "media/capture/mojom/video_capture_buffer.mojom-forward.h"
|
||||||
|
@ -52,7 +53,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer {
|
||||||
|
|
||||||
OnPaintCallback callback_;
|
OnPaintCallback callback_;
|
||||||
|
|
||||||
OffScreenRenderWidgetHostView* view_;
|
raw_ptr<OffScreenRenderWidgetHostView> view_;
|
||||||
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
||||||
|
|
||||||
base::WeakPtrFactory<OffScreenVideoConsumer> weak_ptr_factory_{this};
|
base::WeakPtrFactory<OffScreenVideoConsumer> weak_ptr_factory_{this};
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "third_party/skia/include/core/SkBitmap.h"
|
#include "third_party/skia/include/core/SkBitmap.h"
|
||||||
#include "ui/events/event.h"
|
#include "ui/events/event.h"
|
||||||
#include "ui/gfx/geometry/rect.h"
|
#include "ui/gfx/geometry/rect.h"
|
||||||
|
@ -41,12 +42,12 @@ class OffscreenViewProxy {
|
||||||
void ResetView() { view_ = nullptr; }
|
void ResetView() { view_ = nullptr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
views::View* view_;
|
raw_ptr<views::View> view_;
|
||||||
|
|
||||||
gfx::Rect view_bounds_;
|
gfx::Rect view_bounds_;
|
||||||
std::unique_ptr<SkBitmap> view_bitmap_;
|
std::unique_ptr<SkBitmap> view_bitmap_;
|
||||||
|
|
||||||
OffscreenViewProxyObserver* observer_ = nullptr;
|
raw_ptr<OffscreenViewProxyObserver> observer_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "shell/browser/native_window.h"
|
#include "shell/browser/native_window.h"
|
||||||
#include "shell/browser/native_window_observer.h"
|
#include "shell/browser/native_window_observer.h"
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/browser/renderer_host/render_view_host_delegate_view.h" // nogncheck
|
#include "content/browser/renderer_host/render_view_host_delegate_view.h" // nogncheck
|
||||||
#include "content/browser/web_contents/web_contents_view.h" // nogncheck
|
#include "content/browser/web_contents/web_contents_view.h" // nogncheck
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
|
@ -92,7 +93,7 @@ class OffScreenWebContentsView : public content::WebContentsView,
|
||||||
|
|
||||||
OffScreenRenderWidgetHostView* GetView() const;
|
OffScreenRenderWidgetHostView* GetView() const;
|
||||||
|
|
||||||
NativeWindow* native_window_ = nullptr;
|
raw_ptr<NativeWindow> native_window_ = nullptr;
|
||||||
|
|
||||||
const bool transparent_;
|
const bool transparent_;
|
||||||
bool painting_ = true;
|
bool painting_ = true;
|
||||||
|
@ -100,7 +101,7 @@ class OffScreenWebContentsView : public content::WebContentsView,
|
||||||
OnPaintCallback callback_;
|
OnPaintCallback callback_;
|
||||||
|
|
||||||
// Weak refs.
|
// Weak refs.
|
||||||
content::WebContents* web_contents_ = nullptr;
|
raw_ptr<content::WebContents> web_contents_ = nullptr;
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
OffScreenView* offScreenView_;
|
OffScreenView* offScreenView_;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/unguessable_token.h"
|
#include "base/unguessable_token.h"
|
||||||
|
@ -107,7 +108,7 @@ class SerialChooserContext : public KeyedService,
|
||||||
mojo::Receiver<device::mojom::SerialPortManagerClient> client_receiver_{this};
|
mojo::Receiver<device::mojom::SerialPortManagerClient> client_receiver_{this};
|
||||||
base::ObserverList<PortObserver> port_observer_list_;
|
base::ObserverList<PortObserver> port_observer_list_;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
|
|
||||||
base::WeakPtrFactory<SerialChooserContext> weak_factory_{this};
|
base::WeakPtrFactory<SerialChooserContext> weak_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/browser/ui/electron_menu_model.h"
|
#include "shell/browser/ui/electron_menu_model.h"
|
||||||
#include "ui/base/accelerators/accelerator.h"
|
#include "ui/base/accelerators/accelerator.h"
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ namespace accelerator_util {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
size_t position;
|
size_t position;
|
||||||
electron::ElectronMenuModel* model;
|
raw_ptr<electron::ElectronMenuModel> model;
|
||||||
} MenuItem;
|
} MenuItem;
|
||||||
typedef std::map<ui::Accelerator, MenuItem> AcceleratorTable;
|
typedef std::map<ui::Accelerator, MenuItem> AcceleratorTable;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/render_frame_host.h"
|
#include "content/public/browser/render_frame_host.h"
|
||||||
#include "shell/browser/ui/views/autofill_popup_view.h"
|
#include "shell/browser/ui/views/autofill_popup_view.h"
|
||||||
#include "ui/color/color_id.h"
|
#include "ui/color/color_id.h"
|
||||||
|
@ -79,13 +80,13 @@ class AutofillPopup : public views::ViewObserver {
|
||||||
|
|
||||||
// For sending the accepted suggestion to the render frame that
|
// For sending the accepted suggestion to the render frame that
|
||||||
// asked to open the popup
|
// asked to open the popup
|
||||||
content::RenderFrameHost* frame_host_ = nullptr;
|
raw_ptr<content::RenderFrameHost> frame_host_ = nullptr;
|
||||||
|
|
||||||
// The popup view. The lifetime is managed by the owning Widget
|
// The popup view. The lifetime is managed by the owning Widget
|
||||||
AutofillPopupView* view_ = nullptr;
|
raw_ptr<AutofillPopupView> view_ = nullptr;
|
||||||
|
|
||||||
// The parent view that the popup view shows on. Weak ref.
|
// The parent view that the popup view shows on. Weak ref.
|
||||||
views::View* parent_ = nullptr;
|
raw_ptr<views::View> parent_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
|
#ifndef ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
|
#define ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/scoped_observation.h"
|
#include "base/scoped_observation.h"
|
||||||
#include "shell/browser/native_window_views.h"
|
#include "shell/browser/native_window_views.h"
|
||||||
#include "shell/browser/ui/views/client_frame_view_linux.h"
|
#include "shell/browser/ui/views/client_frame_view_linux.h"
|
||||||
|
@ -59,7 +60,7 @@ class ElectronDesktopWindowTreeHostLinux
|
||||||
void UpdateClientDecorationHints(ClientFrameViewLinux* view);
|
void UpdateClientDecorationHints(ClientFrameViewLinux* view);
|
||||||
void UpdateWindowState(ui::PlatformWindowState new_state);
|
void UpdateWindowState(ui::PlatformWindowState new_state);
|
||||||
|
|
||||||
NativeWindowViews* native_window_view_; // weak ref
|
raw_ptr<NativeWindowViews> native_window_view_; // weak ref
|
||||||
|
|
||||||
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
|
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
|
||||||
theme_observation_{this};
|
theme_observation_{this};
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/observer_list_types.h"
|
#include "base/observer_list_types.h"
|
||||||
|
@ -112,7 +113,7 @@ class ElectronMenuModel : public ui::SimpleMenuModel {
|
||||||
ElectronMenuModel* GetSubmenuModelAt(size_t index);
|
ElectronMenuModel* GetSubmenuModelAt(size_t index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Delegate* delegate_; // weak ref.
|
raw_ptr<Delegate> delegate_; // weak ref.
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
absl::optional<SharingItem> sharing_item_;
|
absl::optional<SharingItem> sharing_item_;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "shell/common/gin_helper/dictionary.h"
|
#include "shell/common/gin_helper/dictionary.h"
|
||||||
#include "shell/common/gin_helper/promise.h"
|
#include "shell/common/gin_helper/promise.h"
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ enum SaveFileDialogProperty {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DialogSettings {
|
struct DialogSettings {
|
||||||
electron::NativeWindow* parent_window = nullptr;
|
RAW_PTR_EXCLUSION electron::NativeWindow* parent_window = nullptr;
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string message;
|
std::string message;
|
||||||
std::string button_label;
|
std::string button_label;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "electron/electron_gtk_stubs.h"
|
#include "electron/electron_gtk_stubs.h"
|
||||||
#include "shell/browser/javascript_environment.h"
|
#include "shell/browser/javascript_environment.h"
|
||||||
|
@ -219,10 +221,10 @@ class FileChooserDialog {
|
||||||
private:
|
private:
|
||||||
void AddFilters(const Filters& filters);
|
void AddFilters(const Filters& filters);
|
||||||
|
|
||||||
electron::NativeWindowViews* parent_;
|
raw_ptr<electron::NativeWindowViews> parent_;
|
||||||
|
|
||||||
GtkFileChooser* dialog_;
|
RAW_PTR_EXCLUSION GtkFileChooser* dialog_;
|
||||||
GtkWidget* preview_;
|
RAW_PTR_EXCLUSION GtkWidget* preview_;
|
||||||
|
|
||||||
Filters filters_;
|
Filters filters_;
|
||||||
std::unique_ptr<gin_helper::Promise<gin_helper::Dictionary>> save_promise_;
|
std::unique_ptr<gin_helper::Promise<gin_helper::Dictionary>> save_promise_;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "base/json/json_reader.h"
|
#include "base/json/json_reader.h"
|
||||||
#include "base/json/json_writer.h"
|
#include "base/json/json_writer.h"
|
||||||
#include "base/json/string_escape.h"
|
#include "base/json/string_escape.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/metrics/histogram.h"
|
#include "base/metrics/histogram.h"
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/strings/pattern.h"
|
#include "base/strings/pattern.h"
|
||||||
|
@ -314,7 +315,7 @@ class InspectableWebContents::NetworkResourceLoader
|
||||||
void OnRetry(base::OnceClosure start_retry) override {}
|
void OnRetry(base::OnceClosure start_retry) override {}
|
||||||
|
|
||||||
const int stream_id_;
|
const int stream_id_;
|
||||||
InspectableWebContents* const bindings_;
|
raw_ptr<InspectableWebContents> const bindings_;
|
||||||
const network::ResourceRequest resource_request_;
|
const network::ResourceRequest resource_request_;
|
||||||
const net::NetworkTrafficAnnotationTag traffic_annotation_;
|
const net::NetworkTrafficAnnotationTag traffic_annotation_;
|
||||||
std::unique_ptr<network::SimpleURLLoader> loader_;
|
std::unique_ptr<network::SimpleURLLoader> loader_;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include "base/containers/span.h"
|
#include "base/containers/span.h"
|
||||||
#include "base/containers/unique_ptr_adapters.h"
|
#include "base/containers/unique_ptr_adapters.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
||||||
#include "chrome/browser/devtools/devtools_embedder_message_dispatcher.h"
|
#include "chrome/browser/devtools/devtools_embedder_message_dispatcher.h"
|
||||||
|
@ -211,9 +212,10 @@ class InspectableWebContents
|
||||||
std::string dock_state_;
|
std::string dock_state_;
|
||||||
bool activate_ = true;
|
bool activate_ = true;
|
||||||
|
|
||||||
InspectableWebContentsDelegate* delegate_ = nullptr; // weak references.
|
raw_ptr<InspectableWebContentsDelegate> delegate_ =
|
||||||
|
nullptr; // weak references.
|
||||||
|
|
||||||
PrefService* pref_service_; // weak reference.
|
raw_ptr<PrefService> pref_service_; // weak reference.
|
||||||
|
|
||||||
std::unique_ptr<content::WebContents> web_contents_;
|
std::unique_ptr<content::WebContents> web_contents_;
|
||||||
|
|
||||||
|
@ -221,7 +223,7 @@ class InspectableWebContents
|
||||||
// one assigned by SetDevToolsWebContents.
|
// one assigned by SetDevToolsWebContents.
|
||||||
std::unique_ptr<content::WebContents> managed_devtools_web_contents_;
|
std::unique_ptr<content::WebContents> managed_devtools_web_contents_;
|
||||||
// The external devtools assigned by SetDevToolsWebContents.
|
// The external devtools assigned by SetDevToolsWebContents.
|
||||||
content::WebContents* external_devtools_web_contents_ = nullptr;
|
raw_ptr<content::WebContents> external_devtools_web_contents_ = nullptr;
|
||||||
|
|
||||||
bool is_guest_;
|
bool is_guest_;
|
||||||
std::unique_ptr<InspectableWebContentsView> view_;
|
std::unique_ptr<InspectableWebContentsView> view_;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/common/api/api.mojom.h"
|
#include "shell/common/api/api.mojom.h"
|
||||||
#include "ui/gfx/native_widget_types.h"
|
#include "ui/gfx/native_widget_types.h"
|
||||||
|
|
||||||
|
@ -64,10 +65,11 @@ class InspectableWebContentsView {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Owns us.
|
// Owns us.
|
||||||
InspectableWebContents* inspectable_web_contents_;
|
raw_ptr<InspectableWebContents> inspectable_web_contents_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InspectableWebContentsViewDelegate* delegate_ = nullptr; // weak references.
|
raw_ptr<InspectableWebContentsViewDelegate> delegate_ =
|
||||||
|
nullptr; // weak references.
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/functional/callback_forward.h"
|
#include "base/functional/callback_forward.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||||
#include "ui/gfx/image/image_skia.h"
|
#include "ui/gfx/image/image_skia.h"
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ enum class MessageBoxType {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MessageBoxSettings {
|
struct MessageBoxSettings {
|
||||||
electron::NativeWindow* parent_window = nullptr;
|
RAW_PTR_EXCLUSION electron::NativeWindow* parent_window = nullptr;
|
||||||
MessageBoxType type = electron::MessageBoxType::kNone;
|
MessageBoxType type = electron::MessageBoxType::kNone;
|
||||||
std::vector<std::string> buttons;
|
std::vector<std::string> buttons;
|
||||||
absl::optional<int> id;
|
absl::optional<int> id;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
#include "base/containers/contains.h"
|
#include "base/containers/contains.h"
|
||||||
#include "base/functional/callback.h"
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "base/no_destructor.h"
|
#include "base/no_destructor.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
@ -194,8 +196,8 @@ class GtkMessageBox : public NativeWindowObserver {
|
||||||
|
|
||||||
bool checkbox_checked_ = false;
|
bool checkbox_checked_ = false;
|
||||||
|
|
||||||
NativeWindow* parent_;
|
raw_ptr<NativeWindow> parent_;
|
||||||
GtkWidget* dialog_;
|
RAW_PTR_EXCLUSION GtkWidget* dialog_;
|
||||||
MessageBoxCallback callback_;
|
MessageBoxCallback callback_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "shell/browser/ui/autofill_popup.h"
|
#include "shell/browser/ui/autofill_popup.h"
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "content/public/browser/render_widget_host.h"
|
#include "content/public/browser/render_widget_host.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
@ -130,10 +131,10 @@ class AutofillPopupView : public views::WidgetDelegateView,
|
||||||
void RemoveObserver();
|
void RemoveObserver();
|
||||||
|
|
||||||
// Controller for this popup. Weak reference.
|
// Controller for this popup. Weak reference.
|
||||||
AutofillPopup* popup_;
|
raw_ptr<AutofillPopup> popup_;
|
||||||
|
|
||||||
// The widget of the window that triggered this popup. Weak reference.
|
// The widget of the window that triggered this popup. Weak reference.
|
||||||
views::Widget* parent_widget_;
|
raw_ptr<views::Widget> parent_widget_;
|
||||||
|
|
||||||
// The time when the popup was shown.
|
// The time when the popup was shown.
|
||||||
base::Time show_time_;
|
base::Time show_time_;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
#include "base/scoped_observation.h"
|
#include "base/scoped_observation.h"
|
||||||
#include "shell/browser/ui/views/frameless_view.h"
|
#include "shell/browser/ui/views/frameless_view.h"
|
||||||
#include "ui/base/ui_base_types.h"
|
#include "ui/base/ui_base_types.h"
|
||||||
|
@ -85,7 +87,7 @@ class ClientFrameViewLinux : public FramelessView,
|
||||||
void (views::Widget::*callback)();
|
void (views::Widget::*callback)();
|
||||||
int accessibility_id;
|
int accessibility_id;
|
||||||
int hit_test_id;
|
int hit_test_id;
|
||||||
views::ImageButton* button{nullptr};
|
RAW_PTR_EXCLUSION views::ImageButton* button{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ThemeValues {
|
struct ThemeValues {
|
||||||
|
@ -119,10 +121,10 @@ class ClientFrameViewLinux : public FramelessView,
|
||||||
|
|
||||||
gfx::Size SizeWithDecorations(gfx::Size size) const;
|
gfx::Size SizeWithDecorations(gfx::Size size) const;
|
||||||
|
|
||||||
ui::NativeTheme* theme_;
|
raw_ptr<ui::NativeTheme> theme_;
|
||||||
ThemeValues theme_values_;
|
ThemeValues theme_values_;
|
||||||
|
|
||||||
views::Label* title_;
|
RAW_PTR_EXCLUSION views::Label* title_;
|
||||||
|
|
||||||
std::unique_ptr<ui::NavButtonProvider> nav_button_provider_;
|
std::unique_ptr<ui::NavButtonProvider> nav_button_provider_;
|
||||||
std::array<NavButton, kNavButtonCount> nav_buttons_;
|
std::array<NavButton, kNavButtonCount> nav_buttons_;
|
||||||
|
@ -132,7 +134,7 @@ class ClientFrameViewLinux : public FramelessView,
|
||||||
|
|
||||||
bool host_supports_client_frame_shadow_ = false;
|
bool host_supports_client_frame_shadow_ = false;
|
||||||
|
|
||||||
ui::WindowFrameProvider* frame_provider_;
|
raw_ptr<ui::WindowFrameProvider> frame_provider_;
|
||||||
|
|
||||||
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
|
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
|
||||||
native_theme_observer_{this};
|
native_theme_observer_{this};
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
|
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
|
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "ui/views/window/non_client_view.h"
|
#include "ui/views/window/non_client_view.h"
|
||||||
|
|
||||||
namespace views {
|
namespace views {
|
||||||
|
@ -57,8 +58,8 @@ class FramelessView : public views::NonClientFrameView {
|
||||||
const char* GetClassName() const override;
|
const char* GetClassName() const override;
|
||||||
|
|
||||||
// Not owned.
|
// Not owned.
|
||||||
NativeWindowViews* window_ = nullptr;
|
raw_ptr<NativeWindowViews> window_ = nullptr;
|
||||||
views::Widget* frame_ = nullptr;
|
raw_ptr<views::Widget> frame_ = nullptr;
|
||||||
|
|
||||||
friend class NativeWindowsViews;
|
friend class NativeWindowsViews;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/memory/ref_counted.h"
|
#include "base/memory/ref_counted.h"
|
||||||
#include "base/memory/singleton.h"
|
#include "base/memory/singleton.h"
|
||||||
#include "ui/base/glib/glib_signal.h"
|
#include "ui/base/glib/glib_signal.h"
|
||||||
|
@ -53,7 +54,7 @@ class GlobalMenuBarRegistrarX11 {
|
||||||
GObject*,
|
GObject*,
|
||||||
GParamSpec*);
|
GParamSpec*);
|
||||||
|
|
||||||
GDBusProxy* registrar_proxy_ = nullptr;
|
raw_ptr<GDBusProxy> registrar_proxy_ = nullptr;
|
||||||
|
|
||||||
// x11::Window which want to be registered, but haven't yet been because
|
// x11::Window which want to be registered, but haven't yet been because
|
||||||
// we're waiting for the proxy to become available.
|
// we're waiting for the proxy to become available.
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/browser/ui/electron_menu_model.h"
|
#include "shell/browser/ui/electron_menu_model.h"
|
||||||
#include "ui/base/glib/glib_signal.h"
|
#include "ui/base/glib/glib_signal.h"
|
||||||
#include "ui/gfx/native_widget_types.h"
|
#include "ui/gfx/native_widget_types.h"
|
||||||
|
@ -72,10 +73,10 @@ class GlobalMenuBarX11 {
|
||||||
unsigned int);
|
unsigned int);
|
||||||
CHROMEG_CALLBACK_0(GlobalMenuBarX11, void, OnSubMenuShow, DbusmenuMenuitem*);
|
CHROMEG_CALLBACK_0(GlobalMenuBarX11, void, OnSubMenuShow, DbusmenuMenuitem*);
|
||||||
|
|
||||||
NativeWindowViews* window_;
|
raw_ptr<NativeWindowViews> window_;
|
||||||
x11::Window xwindow_;
|
x11::Window xwindow_;
|
||||||
|
|
||||||
DbusmenuServer* server_ = nullptr;
|
raw_ptr<DbusmenuServer> server_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "shell/browser/ui/drag_util.h"
|
#include "shell/browser/ui/drag_util.h"
|
||||||
#include "shell/browser/ui/inspectable_web_contents.h"
|
#include "shell/browser/ui/inspectable_web_contents.h"
|
||||||
|
@ -66,9 +67,9 @@ class DevToolsWindowDelegate : public views::ClientView,
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InspectableWebContentsViewViews* shell_;
|
raw_ptr<InspectableWebContentsViewViews> shell_;
|
||||||
views::View* view_;
|
raw_ptr<views::View> view_;
|
||||||
views::Widget* widget_;
|
raw_ptr<views::Widget> widget_;
|
||||||
ui::ImageModel icon_;
|
ui::ImageModel icon_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,8 +96,8 @@ InspectableWebContentsViewViews::InspectableWebContentsViewViews(
|
||||||
}
|
}
|
||||||
|
|
||||||
devtools_web_view_->SetVisible(false);
|
devtools_web_view_->SetVisible(false);
|
||||||
AddChildView(devtools_web_view_);
|
AddChildView(devtools_web_view_.get());
|
||||||
AddChildView(contents_web_view_);
|
AddChildView(contents_web_view_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
InspectableWebContentsViewViews::~InspectableWebContentsViewViews() {
|
InspectableWebContentsViewViews::~InspectableWebContentsViewViews() {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
|
||||||
#include "shell/browser/ui/inspectable_web_contents_view.h"
|
#include "shell/browser/ui/inspectable_web_contents_view.h"
|
||||||
#include "third_party/skia/include/core/SkRegion.h"
|
#include "third_party/skia/include/core/SkRegion.h"
|
||||||
|
@ -48,13 +49,13 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<views::Widget> devtools_window_;
|
std::unique_ptr<views::Widget> devtools_window_;
|
||||||
views::WebView* devtools_window_web_view_ = nullptr;
|
raw_ptr<views::WebView> devtools_window_web_view_ = nullptr;
|
||||||
views::View* contents_web_view_ = nullptr;
|
raw_ptr<views::View> contents_web_view_ = nullptr;
|
||||||
views::WebView* devtools_web_view_ = nullptr;
|
raw_ptr<views::WebView> devtools_web_view_ = nullptr;
|
||||||
|
|
||||||
DevToolsContentsResizingStrategy strategy_;
|
DevToolsContentsResizingStrategy strategy_;
|
||||||
bool devtools_visible_ = false;
|
bool devtools_visible_ = false;
|
||||||
views::WidgetDelegate* devtools_window_delegate_ = nullptr;
|
raw_ptr<views::WidgetDelegate> devtools_window_delegate_ = nullptr;
|
||||||
std::u16string title_;
|
std::u16string title_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_
|
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_
|
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/browser/native_window_observer.h"
|
#include "shell/browser/native_window_observer.h"
|
||||||
#include "shell/browser/ui/electron_menu_model.h"
|
#include "shell/browser/ui/electron_menu_model.h"
|
||||||
#include "shell/browser/ui/views/menu_delegate.h"
|
#include "shell/browser/ui/views/menu_delegate.h"
|
||||||
|
@ -87,9 +88,9 @@ class MenuBar : public views::AccessiblePaneView,
|
||||||
SkColor disabled_color_;
|
SkColor disabled_color_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NativeWindow* window_;
|
raw_ptr<NativeWindow> window_;
|
||||||
RootView* root_view_;
|
raw_ptr<RootView> root_view_;
|
||||||
ElectronMenuModel* menu_model_ = nullptr;
|
raw_ptr<ElectronMenuModel> menu_model_ = nullptr;
|
||||||
bool accelerator_installed_ = false;
|
bool accelerator_installed_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "shell/browser/ui/electron_menu_model.h"
|
#include "shell/browser/ui/electron_menu_model.h"
|
||||||
#include "ui/views/controls/menu/menu_delegate.h"
|
#include "ui/views/controls/menu/menu_delegate.h"
|
||||||
|
@ -66,13 +67,13 @@ class MenuDelegate : public views::MenuDelegate {
|
||||||
views::MenuButton** button) override;
|
views::MenuButton** button) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MenuBar* menu_bar_;
|
raw_ptr<MenuBar> menu_bar_;
|
||||||
int id_ = -1;
|
int id_ = -1;
|
||||||
std::unique_ptr<views::MenuDelegate> adapter_;
|
std::unique_ptr<views::MenuDelegate> adapter_;
|
||||||
std::unique_ptr<views::MenuRunner> menu_runner_;
|
std::unique_ptr<views::MenuRunner> menu_runner_;
|
||||||
|
|
||||||
// The menu button to switch to.
|
// The menu button to switch to.
|
||||||
views::MenuButton* button_to_open_ = nullptr;
|
raw_ptr<views::MenuButton> button_to_open_ = nullptr;
|
||||||
bool hold_first_switch_ = false;
|
bool hold_first_switch_ = false;
|
||||||
|
|
||||||
base::ObserverList<Observer>::Unchecked observers_;
|
base::ObserverList<Observer>::Unchecked observers_;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
|
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
|
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/browser/ui/electron_menu_model.h"
|
#include "shell/browser/ui/electron_menu_model.h"
|
||||||
#include "ui/views/controls/menu/menu_model_adapter.h"
|
#include "ui/views/controls/menu/menu_model_adapter.h"
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ class MenuModelAdapter : public views::MenuModelAdapter {
|
||||||
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
|
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ElectronMenuModel* menu_model_;
|
raw_ptr<ElectronMenuModel> menu_model_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "ui/views/window/native_frame_view.h"
|
#include "ui/views/window/native_frame_view.h"
|
||||||
|
|
||||||
namespace electron {
|
namespace electron {
|
||||||
|
@ -29,7 +30,7 @@ class NativeFrameView : public views::NativeFrameView {
|
||||||
const char* GetClassName() const override;
|
const char* GetClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NativeWindow* window_; // weak ref.
|
raw_ptr<NativeWindow> window_; // weak ref.
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace electron
|
} // namespace electron
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "shell/browser/ui/accelerator_util.h"
|
#include "shell/browser/ui/accelerator_util.h"
|
||||||
#include "ui/gfx/geometry/insets.h"
|
#include "ui/gfx/geometry/insets.h"
|
||||||
#include "ui/views/view.h"
|
#include "ui/views/view.h"
|
||||||
|
@ -53,7 +54,7 @@ class RootView : public views::View {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Parent window, weak ref.
|
// Parent window, weak ref.
|
||||||
NativeWindow* window_;
|
raw_ptr<NativeWindow> window_;
|
||||||
|
|
||||||
// Menu bar.
|
// Menu bar.
|
||||||
std::unique_ptr<MenuBar> menu_bar_;
|
std::unique_ptr<MenuBar> menu_bar_;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/containers/queue.h"
|
#include "base/containers/queue.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/observer_list.h"
|
#include "base/observer_list.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
@ -112,7 +113,7 @@ class UsbChooserContext : public KeyedService,
|
||||||
client_receiver_{this};
|
client_receiver_{this};
|
||||||
base::ObserverList<DeviceObserver> device_observer_list_;
|
base::ObserverList<DeviceObserver> device_observer_list_;
|
||||||
|
|
||||||
ElectronBrowserContext* browser_context_;
|
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||||
|
|
||||||
base::WeakPtrFactory<UsbChooserContext> weak_factory_{this};
|
base::WeakPtrFactory<UsbChooserContext> weak_factory_{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
|
#ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
|
||||||
#define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
|
#define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "content/public/browser/media_stream_request.h"
|
#include "content/public/browser/media_stream_request.h"
|
||||||
#include "content/public/browser/web_contents_user_data.h"
|
#include "content/public/browser/web_contents_user_data.h"
|
||||||
|
@ -71,7 +72,7 @@ class WebContentsPermissionHelper
|
||||||
|
|
||||||
// TODO(clavin): refactor to use the WebContents provided by the
|
// TODO(clavin): refactor to use the WebContents provided by the
|
||||||
// WebContentsUserData base class instead of storing a duplicate ref
|
// WebContentsUserData base class instead of storing a duplicate ref
|
||||||
content::WebContents* web_contents_;
|
raw_ptr<content::WebContents> web_contents_;
|
||||||
|
|
||||||
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "content/public/browser/web_contents_user_data.h"
|
#include "content/public/browser/web_contents_user_data.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
@ -92,7 +93,7 @@ class WebContentsPreferences
|
||||||
|
|
||||||
// TODO(clavin): refactor to use the WebContents provided by the
|
// TODO(clavin): refactor to use the WebContents provided by the
|
||||||
// WebContentsUserData base class instead of storing a duplicate ref
|
// WebContentsUserData base class instead of storing a duplicate ref
|
||||||
content::WebContents* web_contents_;
|
raw_ptr<content::WebContents> web_contents_;
|
||||||
|
|
||||||
bool plugins_;
|
bool plugins_;
|
||||||
bool experimental_features_;
|
bool experimental_features_;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue