Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 27f9a45fc1c1a884b0473ebf7d8966ece433723b..1d6c9d6bc622f1c53c2968b9a48ebe91c71b3135 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -233,6 +233,8 @@ RenderViewHostImpl::RenderViewHostImpl(
close_timeout_.reset(new TimeoutMonitor(base::Bind(
&RenderViewHostImpl::ClosePageTimeout, weak_factory_.GetWeakPtr())));
+
+ input_device_change_observer_ = new InputDeviceChangeObserver(this);
}
RenderViewHostImpl::~RenderViewHostImpl() {
@@ -243,7 +245,7 @@ RenderViewHostImpl::~RenderViewHostImpl() {
base::Unretained(ResourceDispatcherHostImpl::Get()),
GetProcess()->GetID(), GetRoutingID()));
}
-
+ delete input_device_change_observer_;
delegate_->RenderViewDeleted(this);
GetProcess()->RemoveObserver(this);
}
@@ -905,6 +907,15 @@ void RenderViewHostImpl::OnWebkitPreferencesChanged() {
updating_web_preferences_ = false;
}
+bool RenderViewHostImpl::InputDeviceFeaturesChanged() {
+ WebPreferences prefs = GetWebkitPreferences();
+ int available_pointer_types, available_hover_types;
+ std::tie(available_pointer_types, available_hover_types) =
+ ui::GetAvailablePointerAndHoverTypes();
+ return prefs.available_pointer_types != available_pointer_types ||
+ prefs.available_hover_types != available_hover_types;
+}
+
void RenderViewHostImpl::DisableScrollbarsForThreshold(const gfx::Size& size) {
Send(new ViewMsg_DisableScrollbarsForSmallWindows(GetRoutingID(), size));
}

Powered by Google App Engine
This is Rietveld 408576698