feat: add multi BrowserView support to BrowserWindow (#16148)
* feat: add multi BrowserView support to BrowserWindow Add functions addBrowserView, removeBroserView, getBrowserViews to BrowserWindow class. Existing API as setBrowserView and getBrowserView code replaced to use new api inside. * fix: for lint and osx compile errors * fix: lint error in test code * feat: add multi BrowserView support to BrowserWindow Add functions addBrowserView, removeBroserView, getBrowserViews to BrowserWindow class. Existing API as setBrowserView and getBrowserView code replaced to use new api inside. * fix: for lint and osx compile errors * fix: lint error in test code * fix: method to be accessible on mac api impl * fix: missed function declarations for mac impl * fix: use base class reset function
This commit is contained in:
parent
18ca4b6a3a
commit
5ae3d1a1b2
12 changed files with 244 additions and 74 deletions
|
@ -165,6 +165,10 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
void SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> menu);
|
||||
void SetParentWindow(v8::Local<v8::Value> value, mate::Arguments* args);
|
||||
virtual void SetBrowserView(v8::Local<v8::Value> value);
|
||||
virtual void AddBrowserView(v8::Local<v8::Value> value);
|
||||
virtual void RemoveBrowserView(v8::Local<v8::Value> value);
|
||||
virtual std::vector<v8::Local<v8::Value>> GetBrowserViews() const;
|
||||
virtual void ResetBrowserViews();
|
||||
v8::Local<v8::Value> GetNativeWindowHandle();
|
||||
void SetProgressBar(double progress, mate::Arguments* args);
|
||||
void SetOverlayIcon(const gfx::Image& overlay,
|
||||
|
@ -195,7 +199,7 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
v8::Local<v8::Value> GetContentView() const;
|
||||
v8::Local<v8::Value> GetParentWindow() const;
|
||||
std::vector<v8::Local<v8::Object>> GetChildWindows() const;
|
||||
v8::Local<v8::Value> GetBrowserView() const;
|
||||
v8::Local<v8::Value> GetBrowserView(mate::Arguments* args) const;
|
||||
bool IsModal() const;
|
||||
|
||||
// Extra APIs added in JS.
|
||||
|
@ -238,7 +242,7 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
#endif
|
||||
|
||||
v8::Global<v8::Value> content_view_;
|
||||
v8::Global<v8::Value> browser_view_;
|
||||
std::map<int32_t, v8::Global<v8::Value>> browser_views_;
|
||||
v8::Global<v8::Value> menu_;
|
||||
v8::Global<v8::Value> parent_window_;
|
||||
KeyWeakMap<int> child_windows_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue