Handle focus correctly.
This commit is contained in:
parent
bd0f9df96c
commit
1943d88bdc
2 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,10 @@ class ContainerView : public views::View {
|
|||
web_contents_view_->inspectable_web_contents()->GetWebContents());
|
||||
}
|
||||
|
||||
views::View* GetWebView() const {
|
||||
return web_view_.get();
|
||||
}
|
||||
|
||||
void ShowDevTools() {
|
||||
if (IsDevToolsViewShowing())
|
||||
return;
|
||||
|
@ -45,6 +49,7 @@ class ContainerView : public views::View {
|
|||
NULL));
|
||||
AddChildView(split_view_.get());
|
||||
Layout();
|
||||
devtools_view_->RequestFocus();
|
||||
}
|
||||
|
||||
void CloseDevTools() {
|
||||
|
@ -111,6 +116,10 @@ views::View* InspectableWebContentsViewWin::GetView() const {
|
|||
return container_.get();
|
||||
}
|
||||
|
||||
views::View* InspectableWebContentsViewWin::GetWebView() const {
|
||||
return container_->GetWebView();
|
||||
}
|
||||
|
||||
gfx::NativeView InspectableWebContentsViewWin::GetNativeView() const {
|
||||
auto web_contents = inspectable_web_contents_->GetWebContents();
|
||||
return web_contents->GetView()->GetNativeView();
|
||||
|
|
|
@ -24,6 +24,7 @@ class InspectableWebContentsViewWin : public InspectableWebContentsView {
|
|||
~InspectableWebContentsViewWin();
|
||||
|
||||
views::View* GetView() const;
|
||||
views::View* GetWebView() const;
|
||||
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual void ShowDevTools() OVERRIDE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue