Remove NativeWindow's webview APIs
This commit is contained in:
parent
5a4c2fb61d
commit
eea4e60b73
3 changed files with 4 additions and 21 deletions
|
@ -803,15 +803,16 @@ double BrowserWindow::GetOpacity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::FocusOnWebView() {
|
void BrowserWindow::FocusOnWebView() {
|
||||||
window_->FocusOnWebView();
|
web_contents()->GetRenderViewHost()->GetWidget()->Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::BlurWebView() {
|
void BrowserWindow::BlurWebView() {
|
||||||
window_->BlurWebView();
|
web_contents()->GetRenderViewHost()->GetWidget()->Blur();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BrowserWindow::IsWebViewFocused() {
|
bool BrowserWindow::IsWebViewFocused() {
|
||||||
return window_->IsWebViewFocused();
|
auto host_view = web_contents()->GetRenderViewHost()->GetWidget()->GetView();
|
||||||
|
return host_view && host_view->HasFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::SetRepresentedFilename(const std::string& filename) {
|
void BrowserWindow::SetRepresentedFilename(const std::string& filename) {
|
||||||
|
|
|
@ -354,19 +354,6 @@ void NativeWindow::SetEscapeTouchBarItem(
|
||||||
const mate::PersistentDictionary& item) {
|
const mate::PersistentDictionary& item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::FocusOnWebView() {
|
|
||||||
web_contents()->GetRenderViewHost()->GetWidget()->Focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NativeWindow::BlurWebView() {
|
|
||||||
web_contents()->GetRenderViewHost()->GetWidget()->Blur();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NativeWindow::IsWebViewFocused() {
|
|
||||||
auto host_view = web_contents()->GetRenderViewHost()->GetWidget()->GetView();
|
|
||||||
return host_view && host_view->HasFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NativeWindow::SetAutoHideMenuBar(bool auto_hide) {
|
void NativeWindow::SetAutoHideMenuBar(bool auto_hide) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,11 +194,6 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
virtual void ToggleTabBar();
|
virtual void ToggleTabBar();
|
||||||
virtual bool AddTabbedWindow(NativeWindow* window);
|
virtual bool AddTabbedWindow(NativeWindow* window);
|
||||||
|
|
||||||
// Webview APIs.
|
|
||||||
virtual void FocusOnWebView();
|
|
||||||
virtual void BlurWebView();
|
|
||||||
virtual bool IsWebViewFocused();
|
|
||||||
|
|
||||||
// Toggle the menu bar.
|
// Toggle the menu bar.
|
||||||
virtual void SetAutoHideMenuBar(bool auto_hide);
|
virtual void SetAutoHideMenuBar(bool auto_hide);
|
||||||
virtual bool IsMenuBarAutoHide();
|
virtual bool IsMenuBarAutoHide();
|
||||||
|
|
Loading…
Reference in a new issue