feat: add a 'title' parameter to openDevTools() (#39047)

* [Feature Request]: Add a parameter to openDevTools() that sets the DevTools window title bar

* all titles->title

* add GetDevToolsTitle(),update docs

* fix:lint error

* fix:lint error

* add setDevToolTitle

* lint errror

* lint errror

* ling errror (.md)

* build error

* build error in mac

* build error

* build error

* change docs

* std::string->std::u16string

* lint error

* build error

* build error
This commit is contained in:
wgsheng 2023-08-15 13:32:53 +08:00 committed by GitHub
parent 8e3dcc8b17
commit 127584dc37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 90 additions and 5 deletions

View file

@ -50,6 +50,7 @@ using electron::InspectableWebContentsViewMac;
- (void)setContentsResizingStrategy:
(const DevToolsContentsResizingStrategy&)strategy;
- (void)setTitle:(NSString*)title;
- (NSString*)getTitle;
- (void)redispatchContextMenuEvent:(base::apple::OwnedNSEvent)theEvent;

View file

@ -244,6 +244,10 @@
[devtools_window_ setTitle:title];
}
- (NSString*)getTitle {
return [devtools_window_ title];
}
- (void)viewDidBecomeFirstResponder:(NSNotification*)notification {
auto* inspectable_web_contents =
inspectableWebContentsView_->inspectable_web_contents();