Apply raw_ptr rewrite to libcef (see #3239)

This commit is contained in:
Marshall Greenblatt
2024-05-11 11:48:38 -04:00
parent 2156c9fd5d
commit 0170f431a0
109 changed files with 290 additions and 185 deletions

View File

@ -7,6 +7,7 @@
#pragma once
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "cef/include/views/cef_box_layout.h"
#include "cef/include/views/cef_fill_layout.h"
#include "cef/include/views/cef_layout.h"
@ -55,7 +56,7 @@ class CefLayoutImpl : public CefLayoutAdapter, public CefLayoutClass {
owner_view_ = owner_view;
layout_ref_ = CreateLayout();
DCHECK(layout_ref_);
owner_view->SetLayoutManager(base::WrapUnique(layout_ref_));
owner_view->SetLayoutManager(base::WrapUnique(layout_ref_.get()));
layout_util::Assign(this, owner_view);
}
@ -65,11 +66,11 @@ class CefLayoutImpl : public CefLayoutAdapter, public CefLayoutClass {
private:
// Unowned reference to the views::LayoutManager wrapped by this object. Will
// be nullptr after the views::LayoutManager is destroyed.
ViewsLayoutClass* layout_ref_ = nullptr;
raw_ptr<ViewsLayoutClass> layout_ref_ = nullptr;
// Unowned reference to the views::View that owns this object. Will be nullptr
// after the views::LayoutManager is destroyed.
views::View* owner_view_ = nullptr;
raw_ptr<views::View> owner_view_ = nullptr;
};
#endif // CEF_LIBCEF_BROWSER_VIEWS_LAYOUT_IMPL_H_