mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Remove GetNativeView() when compiled with views toolkit.
This commit is contained in:
@@ -24,9 +24,10 @@ class InspectableWebContentsView {
|
||||
// Returns the web view control, which can be used by the
|
||||
// GetInitiallyFocusedView() to set initial focus to web view.
|
||||
virtual views::View* GetWebView() = 0;
|
||||
#else
|
||||
virtual gfx::NativeView GetNativeView() const = 0;
|
||||
#endif
|
||||
|
||||
virtual gfx::NativeView GetNativeView() const = 0;
|
||||
virtual void ShowDevTools() = 0;
|
||||
// Hide the DevTools view.
|
||||
virtual void CloseDevTools() = 0;
|
||||
|
||||
@@ -90,12 +90,6 @@ views::View* InspectableWebContentsViewViews::GetWebView() {
|
||||
return contents_web_view_;
|
||||
}
|
||||
|
||||
gfx::NativeView InspectableWebContentsViewViews::GetNativeView() const {
|
||||
NOTREACHED() << "GetNativeView() shouldn't be used when having views library, "
|
||||
"use GetView() instead";
|
||||
return inspectable_web_contents_->GetWebContents()->GetView()->GetNativeView();
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewViews::ShowDevTools() {
|
||||
if (devtools_visible_)
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,6 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
||||
// InspectableWebContentsView:
|
||||
virtual views::View* GetView() OVERRIDE;
|
||||
virtual views::View* GetWebView() OVERRIDE;
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual void ShowDevTools() OVERRIDE;
|
||||
virtual void CloseDevTools() OVERRIDE;
|
||||
virtual bool IsDevToolsViewShowing() OVERRIDE;
|
||||
|
||||
Reference in New Issue
Block a user