diff options
author | sl.ostapenko@samsung.com <sl.ostapenko@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 18:12:53 +0000 |
---|---|---|
committer | sl.ostapenko@samsung.com <sl.ostapenko@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 18:12:53 +0000 |
commit | 8f3fdb1030ffda316b496c886ea69be933d3ac35 (patch) | |
tree | ff0ea47f5f9d596b79475472054f69204e72cc41 /content/port | |
parent | 4837a98696485a8e07b1e4ad742a60ab02c73f08 (diff) | |
download | chromium_src-8f3fdb1030ffda316b496c886ea69be933d3ac35.zip chromium_src-8f3fdb1030ffda316b496c886ea69be933d3ac35.tar.gz chromium_src-8f3fdb1030ffda316b496c886ea69be933d3ac35.tar.bz2 |
Make VibrationMessageFilter available to other platforms.
Adds VibrationProvider interface that simplifies adding vibration API handlers for other platforms and moves Android implementation into VibrationProviderAndroid.
Also adds ContentBrowserClient::OverrideVibrationProvider() method that allows embedder application override handling of blink Vibration API.
BUG=222504
Review URL: https://codereview.chromium.org/23496051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port')
-rw-r--r-- | content/port/browser/vibration_provider.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/content/port/browser/vibration_provider.h b/content/port/browser/vibration_provider.h new file mode 100644 index 0000000..df2587f --- /dev/null +++ b/content/port/browser/vibration_provider.h @@ -0,0 +1,23 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_PORT_BROWSER_VIBRATION_PROVIDER_H_ +#define CONTENT_PORT_BROWSER_VIBRATION_PROVIDER_H_ + +namespace content { + +class VibrationProvider { + public: + // Device should start vibrating for N milliseconds. + virtual void Vibrate(int64 milliseconds) = 0; + + // Cancels vibration of the device. + virtual void CancelVibration() = 0; + + virtual ~VibrationProvider() {} +}; + +} // namespace content + +#endif // CONTENT_PORT_BROWSER_VIBRATION_PROVIDER_H_ |