Add ICU message format support
[chromium-blink-merge.git] / ui / views / controls / scrollbar / native_scroll_bar_wrapper.h
blob6f4e45aee88fdb59e4496abb237105f4c6a5113a
1 // Copyright (c) 2011 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.
5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WRAPPER_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WRAPPER_H_
8 #include "ui/views/views_export.h"
10 namespace ui {
11 class NativeTheme;
14 namespace views {
16 class NativeScrollBar;
17 class View;
19 // A specialization of NativeControlWrapper that hosts a platform-native
20 // scroll bar.
21 class VIEWS_EXPORT NativeScrollBarWrapper {
22 public:
23 virtual ~NativeScrollBarWrapper() {}
25 // Updates the scroll bar appearance given a viewport size, content size and
26 // current position.
27 virtual void Update(int viewport_size, int content_size, int current_pos) = 0;
29 // Retrieves the views::View that hosts the native control.
30 virtual View* GetView() = 0;
32 // Returns the position of the scrollbar.
33 virtual int GetPosition() const = 0;
35 // Creates an appropriate NativeScrollBarWrapper for the platform.
36 static NativeScrollBarWrapper* CreateWrapper(NativeScrollBar* button);
38 // Returns the system sizes of vertical/horizontal scroll bars.
39 static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme);
40 static int GetHorizontalScrollBarHeight(const ui::NativeTheme* theme);
43 } // namespace views
45 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WRAPPER_H_