OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_CHANGE_OBSERVER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_CHANGE_OBSERVER_H_ |
| 7 |
| 8 #include "content/public/browser/render_view_host.h" |
| 9 #include "ui/events/devices/input_device_event_observer.h" |
| 10 |
| 11 // This class monitors input changes on all platforms. |
| 12 // |
| 13 // It is responsible to instantiate the various platforms observers |
| 14 // and it gets notified whenever the input capabilities change. Whenever |
| 15 // a change is detected the WebKit preferences are getting updated so the |
| 16 // interactions media-queries can be updated. |
| 17 namespace content { |
| 18 class CONTENT_EXPORT InputDeviceChangeObserver |
| 19 : public ui::InputDeviceEventObserver { |
| 20 public: |
| 21 InputDeviceChangeObserver(RenderViewHost* rvh); |
| 22 ~InputDeviceChangeObserver() override; |
| 23 |
| 24 // InputDeviceEventObserver public overrides. |
| 25 void OnTouchscreenDeviceConfigurationChanged() override; |
| 26 void OnKeyboardDeviceConfigurationChanged() override; |
| 27 void OnMouseDeviceConfigurationChanged() override; |
| 28 void OnTouchpadDeviceConfigurationChanged() override; |
| 29 |
| 30 private: |
| 31 RenderViewHost* render_view_host_; |
| 32 void NotifyRenderViewHost(); |
| 33 DISALLOW_COPY_AND_ASSIGN(InputDeviceChangeObserver); |
| 34 }; |
| 35 |
| 36 } // namespace content |
| 37 |
| 38 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_DEVICE_CHANGE_OBSERVER_H_ |
OLD | NEW |