[refactor] Remove Unused API from RenderViewHostDelegate
The methods removed have been initially added in
https://codereview.chromium.org/712723002 in regards to "link
disambiguation popup suppression in the presence of virtual keyboard".
The logic however was later removed in:
https://codereview.chromium.org/1926173002
which rendered removed methods useless. This CL removes the said
methods from RenderViewHostDelegate.
Bug: 605299
Change-Id: Ib4c942132dcb2ebd2364bc15898ccf84520d1b48
Reviewed-on: https://chromium-review.googlesource.com/665419
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Charlie Reis (slow) <creis@chromium.org>
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501986}
diff --git a/content/browser/renderer_host/render_view_host_delegate.cc b/content/browser/renderer_host/render_view_host_delegate.cc
index 3a2506d..6f56365 100644
--- a/content/browser/renderer_host/render_view_host_delegate.cc
+++ b/content/browser/renderer_host/render_view_host_delegate.cc
@@ -45,10 +45,6 @@
return false;
}
-bool RenderViewHostDelegate::IsVirtualKeyboardRequested() {
- return false;
-}
-
bool RenderViewHostDelegate::IsOverridingUserAgent() {
return false;
}
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index a464b648..36d6c48 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -173,13 +173,6 @@
// created by the RenderViewHost.
virtual FrameTree* GetFrameTree();
- // Optional state storage for if the Virtual Keyboard has been requested by
- // this page or not. If it has, this can be used to suppress things like the
- // link disambiguation dialog, which doesn't interact well with the virtual
- // keyboard.
- virtual void SetIsVirtualKeyboardRequested(bool requested) {}
- virtual bool IsVirtualKeyboardRequested();
-
// Whether the user agent is overridden using the Chrome for Android "Request
// Desktop Site" feature.
virtual bool IsOverridingUserAgent();
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 728d412..5c9776c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -772,10 +772,6 @@
const gfx::Point& location_dips_screen,
bool editable) {
#if defined(OS_WIN)
- RenderViewHost* rvh = RenderViewHost::From(host_);
- if (rvh && rvh->GetDelegate())
- rvh->GetDelegate()->SetIsVirtualKeyboardRequested(editable);
-
ui::OnScreenKeyboardDisplayManager* osk_display_manager =
ui::OnScreenKeyboardDisplayManager::GetInstance();
DCHECK(osk_display_manager);
@@ -1710,10 +1706,6 @@
if (!editable && virtual_keyboard_requested_) {
virtual_keyboard_requested_ = false;
- RenderViewHost* rvh = RenderViewHost::From(host_);
- if (rvh && rvh->GetDelegate())
- rvh->GetDelegate()->SetIsVirtualKeyboardRequested(false);
-
DCHECK(ui::OnScreenKeyboardDisplayManager::GetInstance());
ui::OnScreenKeyboardDisplayManager::GetInstance()->DismissVirtualKeyboard();
}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8ba9af8..edd6f61 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -541,7 +541,6 @@
BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()),
audio_stream_monitor_(this),
bluetooth_connected_device_count_(0),
- virtual_keyboard_requested_(false),
#if !defined(OS_ANDROID)
page_scale_factor_is_one_(true),
#endif // !defined(OS_ANDROID)
@@ -2682,14 +2681,6 @@
return &frame_tree_;
}
-void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) {
- virtual_keyboard_requested_ = requested;
-}
-
-bool WebContentsImpl::IsVirtualKeyboardRequested() {
- return virtual_keyboard_requested_;
-}
-
bool WebContentsImpl::IsOverridingUserAgent() {
return GetController().GetVisibleEntry() &&
GetController().GetVisibleEntry()->GetIsOverridingUserAgent();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 02dbddce..3e92189 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -629,8 +629,6 @@
double GetPendingPageZoomLevel() override;
#endif // !defined(OS_ANDROID)
FrameTree* GetFrameTree() override;
- void SetIsVirtualKeyboardRequested(bool requested) override;
- bool IsVirtualKeyboardRequested() override;
bool IsOverridingUserAgent() override;
bool IsJavaScriptDialogShowing() const override;
bool ShouldIgnoreUnresponsiveRenderer() override;
@@ -1629,8 +1627,6 @@
size_t bluetooth_connected_device_count_;
- bool virtual_keyboard_requested_;
-
// Notifies ResourceDispatcherHostImpl of various events related to loading.
std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_;