diff --git a/libcef/browser/native/browser_platform_delegate_native_aura.cc b/libcef/browser/native/browser_platform_delegate_native_aura.cc index db8d14907..518f67754 100644 --- a/libcef/browser/native/browser_platform_delegate_native_aura.cc +++ b/libcef/browser/native/browser_platform_delegate_native_aura.cc @@ -182,6 +182,11 @@ gfx::Vector2d CefBrowserPlatformDelegateNativeAura::GetUiWheelEventOffset( return gfx::Vector2d(deltaX, deltaY); } +// static +base::TimeTicks CefBrowserPlatformDelegateNativeAura::GetEventTimeStamp() { + return base::TimeTicks::Now(); +} + // static int CefBrowserPlatformDelegateNativeAura::TranslateUiEventModifiers( uint32 cef_modifiers) { diff --git a/libcef/browser/native/browser_platform_delegate_native_aura.h b/libcef/browser/native/browser_platform_delegate_native_aura.h index 63d9546b8..0e7d7efdb 100644 --- a/libcef/browser/native/browser_platform_delegate_native_aura.h +++ b/libcef/browser/native/browser_platform_delegate_native_aura.h @@ -66,9 +66,9 @@ class CefBrowserPlatformDelegateNativeAura int deltaX, int deltaY) const; virtual gfx::Vector2d GetUiWheelEventOffset(int deltaX, int deltaY) const; - virtual base::TimeTicks GetEventTimeStamp() const = 0; protected: + static base::TimeTicks GetEventTimeStamp(); static int TranslateUiEventModifiers(uint32 cef_modifiers); static int TranslateUiChangedButtonFlags(uint32 cef_modifiers); diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index c7ba57b96..940d6778e 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -4,8 +4,6 @@ #include "libcef/browser/native/browser_platform_delegate_native_linux.h" -#include - #include "libcef/browser/browser_host_base.h" #include "libcef/browser/context.h" #include "libcef/browser/native/menu_runner_linux.h" @@ -30,18 +28,6 @@ #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" #endif -namespace { - -// Returns the number of seconds since system boot. -long GetSystemUptime() { - struct sysinfo info; - if (sysinfo(&info) == 0) - return info.uptime; - return 0; -} - -} // namespace - CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux( const CefWindowInfo& window_info, SkColor background_color) @@ -328,8 +314,3 @@ CefBrowserPlatformDelegateNativeLinux::TranslateWebKeyEvent( } return content::NativeWebKeyboardEvent(ui_event); } - -base::TimeTicks CefBrowserPlatformDelegateNativeLinux::GetEventTimeStamp() - const { - return base::TimeTicks() + base::TimeDelta::FromSeconds(GetSystemUptime()); -} diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.h b/libcef/browser/native/browser_platform_delegate_native_linux.h index ce724f682..f791ff7ed 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.h +++ b/libcef/browser/native/browser_platform_delegate_native_linux.h @@ -41,7 +41,6 @@ class CefBrowserPlatformDelegateNativeLinux ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override; content::NativeWebKeyboardEvent TranslateWebKeyEvent( const CefKeyEvent& key_event) const override; - base::TimeTicks GetEventTimeStamp() const override; private: // True if the host window has been created. diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index 65fc0ef6d..421712a38 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -486,10 +486,6 @@ gfx::Vector2d CefBrowserPlatformDelegateNativeWin::GetUiWheelEventOffset( return gfx::Vector2d(scrollDeltaX, scrollDeltaY); } -base::TimeTicks CefBrowserPlatformDelegateNativeWin::GetEventTimeStamp() const { - return base::TimeTicks::Now(); -} - // static void CefBrowserPlatformDelegateNativeWin::RegisterWindowClass() { static bool registered = false; diff --git a/libcef/browser/native/browser_platform_delegate_native_win.h b/libcef/browser/native/browser_platform_delegate_native_win.h index a0cdcf3e8..6c8f7484e 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.h +++ b/libcef/browser/native/browser_platform_delegate_native_win.h @@ -41,7 +41,6 @@ class CefBrowserPlatformDelegateNativeWin // CefBrowserPlatformDelegateNativeAura methods: ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override; gfx::Vector2d GetUiWheelEventOffset(int deltaX, int deltaY) const override; - base::TimeTicks GetEventTimeStamp() const override; private: static void RegisterWindowClass();