diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 22:28:22 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 22:28:22 +0000 |
commit | ae1a5145ea0b24a56b808b5b249c4b3910e81165 (patch) | |
tree | 8ddcae2154cc5e9a53ed19378f007426859a5e5b /views/controls/slider/native_slider_wrapper.h | |
parent | 8a7bcb02f938026aba0b7978818f7ae39688ff1a (diff) | |
download | chromium_src-ae1a5145ea0b24a56b808b5b249c4b3910e81165.zip chromium_src-ae1a5145ea0b24a56b808b5b249c4b3910e81165.tar.gz chromium_src-ae1a5145ea0b24a56b808b5b249c4b3910e81165.tar.bz2 |
Lands http://codereview.chromium.org/211002 for Charlie:
Add touchpad speed factor setting to Chrome OS touchpad settings page.
Created slider widget with native gtk widget.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/209016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/slider/native_slider_wrapper.h')
-rw-r--r-- | views/controls/slider/native_slider_wrapper.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/views/controls/slider/native_slider_wrapper.h b/views/controls/slider/native_slider_wrapper.h new file mode 100644 index 0000000..100def5 --- /dev/null +++ b/views/controls/slider/native_slider_wrapper.h @@ -0,0 +1,48 @@ +// Copyright (c) 2009 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 VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ +#define VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ + +#include "base/gfx/native_widget_types.h" + +namespace views { + +class Slider; +class View; + +// An interface implemented by an object that provides a platform-native slider. +class NativeSliderWrapper { + public: + // The Slider calls this when it is destroyed to clean up the wrapper object. + virtual ~NativeSliderWrapper() {} + + // Updates the enabled state of the native slider. + virtual void UpdateEnabled() = 0; + + // Gets the value of the slider. + virtual double GetValue() = 0; + + // Sets the value of the slider. + virtual void SetValue(double value) = 0; + + // Sets the focus to the slider. + virtual void SetFocus() = 0; + + // Returns the preferred size of the combobox. + virtual gfx::Size GetPreferredSize() = 0; + + // Retrieves the views::View that hosts the native control. + virtual View* GetView() = 0; + + // Returns a handle to the underlying native view for testing. + virtual gfx::NativeView GetTestingHandle() const = 0; + + // Creates an appropriate NativeSliderWrapper for the platform. + static NativeSliderWrapper* CreateWrapper(Slider* slider); +}; + +} // namespace views + +#endif // VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ |