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:
parent
8e3dcc8b17
commit
127584dc37
13 changed files with 90 additions and 5 deletions
|
@ -209,6 +209,10 @@ void InspectableWebContentsViewViews::SetTitle(const std::u16string& title) {
|
|||
}
|
||||
}
|
||||
|
||||
const std::u16string InspectableWebContentsViewViews::GetTitle() {
|
||||
return title_;
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewViews::Layout() {
|
||||
if (!devtools_web_view_->GetVisible()) {
|
||||
contents_web_view_->SetBoundsRect(GetContentsBounds());
|
||||
|
|
|
@ -39,12 +39,11 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
|||
void SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) override;
|
||||
void SetTitle(const std::u16string& title) override;
|
||||
const std::u16string GetTitle() override;
|
||||
|
||||
// views::View:
|
||||
void Layout() override;
|
||||
|
||||
const std::u16string& GetTitle() const { return title_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<views::Widget> devtools_window_;
|
||||
raw_ptr<views::WebView> devtools_window_web_view_ = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue