fix: WebContentsView removal should compare directly (#44673)
fix: `WebContentsView` removal should compare directly (#44656) * fix: WebContentsView removal should compare directly * fixup view comparision * chore: use erase_if * Apply review suggestions --------- Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
9c5c5d0fea
commit
2bd3a9fe65
3 changed files with 43 additions and 26 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
using ChildPair = std::pair<raw_ptr<views::View>, v8::Global<v8::Object>>;
|
||||
|
||||
class View : public gin_helper::EventEmitter<View>, public views::ViewObserver {
|
||||
public:
|
||||
static gin_helper::WrappableBase* New(gin::Arguments* args);
|
||||
|
|
@ -61,7 +63,7 @@ class View : public gin_helper::EventEmitter<View>, public views::ViewObserver {
|
|||
private:
|
||||
void ReorderChildView(gin::Handle<View> child, size_t index);
|
||||
|
||||
std::vector<v8::Global<v8::Object>> child_views_;
|
||||
std::vector<ChildPair> child_views_;
|
||||
|
||||
bool delete_view_ = true;
|
||||
raw_ptr<views::View> view_ = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue