refactor: remove public method BrowserWindow::GetWeakPtr()
(#46797)
refactor: remove public method electron::api::BrowserWindow::GetWeakPtr() Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
96db57f36f
commit
8e5735e499
2 changed files with 1 additions and 5 deletions
|
@ -132,7 +132,7 @@ void BrowserWindow::OnActivateContents() {
|
|||
void BrowserWindow::OnPageTitleUpdated(const std::u16string& title,
|
||||
bool explicit_set) {
|
||||
// Change window title to page title.
|
||||
auto self = GetWeakPtr();
|
||||
auto self = weak_factory_.GetWeakPtr();
|
||||
if (!Emit("page-title-updated", title, explicit_set)) {
|
||||
// |this| might be deleted, or marked as destroyed by close().
|
||||
if (self && !IsDestroyed())
|
||||
|
|
|
@ -32,10 +32,6 @@ class BrowserWindow : public BaseWindow,
|
|||
static v8::Local<v8::Value> From(v8::Isolate* isolate,
|
||||
NativeWindow* native_window);
|
||||
|
||||
base::WeakPtr<BrowserWindow> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
// disable copy
|
||||
BrowserWindow(const BrowserWindow&) = delete;
|
||||
BrowserWindow& operator=(const BrowserWindow&) = delete;
|
||||
|
|
Loading…
Add table
Reference in a new issue