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

Unified Diff: content/browser/renderer_host/input/input_device_change_observer.cc

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Patch for landing, added the mojo bits Created 3 years, 7 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/input/input_device_change_observer.cc
diff --git a/content/browser/renderer_host/input/input_device_change_observer.cc b/content/browser/renderer_host/input/input_device_change_observer.cc
index 7ef1041c01170bb3d2f3653ec115d74932de39ea..f8481a6ef2d9adb38b68e99f9cc4533036c8000b 100644
--- a/content/browser/renderer_host/input/input_device_change_observer.cc
+++ b/content/browser/renderer_host/input/input_device_change_observer.cc
@@ -8,6 +8,8 @@
#if defined(OS_WIN)
#include "ui/events/devices/input_device_observer_win.h"
+#elif defined(OS_LINUX)
+#include "ui/events/devices/device_data_manager.h"
#endif
namespace content {
@@ -16,12 +18,16 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(RenderViewHost* rvh) {
render_view_host_ = rvh;
#if defined(OS_WIN)
ui::InputDeviceObserverWin::GetInstance()->AddObserver(this);
+#elif defined(OS_LINUX)
+ ui::DeviceDataManager::GetInstance()->AddObserver(this);
#endif
}
InputDeviceChangeObserver::~InputDeviceChangeObserver() {
#if defined(OS_WIN)
ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this);
+#elif defined(OS_LINUX)
+ ui::DeviceDataManager::GetInstance()->RemoveObserver(this);
#endif
render_view_host_ = nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698