mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: make electron::api::BaseWindow fields private (#46689)
refactor: make electron::api::BaseWindow fields private
This commit is contained in:
@@ -42,7 +42,8 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
NativeWindow* window() const { return window_.get(); }
|
||||
const NativeWindow* window() const { return window_.get(); }
|
||||
NativeWindow* window() { return window_.get(); }
|
||||
|
||||
protected:
|
||||
// Common constructor.
|
||||
@@ -262,6 +263,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
#endif
|
||||
int32_t GetID() const;
|
||||
|
||||
private:
|
||||
// Helpers.
|
||||
|
||||
// Remove this window from parent window's |child_windows_|.
|
||||
@@ -290,7 +292,6 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
// Reference to JS wrapper to prevent garbage collection.
|
||||
v8::Global<v8::Value> self_ref_;
|
||||
|
||||
private:
|
||||
base::WeakPtrFactory<BaseWindow> weak_factory_{this};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user