OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ | 5 #ifndef VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ |
6 #define VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ | 6 #define VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ |
7 | 7 |
8 #include "views/controls/native_control_win.h" | 8 #include "views/controls/native_control_win.h" |
9 #include "views/controls/scrollbar/native_scroll_bar_wrapper.h" | 9 #include "views/controls/scrollbar/native_scroll_bar_wrapper.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual int GetPosition() const; | 44 virtual int GetPosition() const; |
45 virtual View* GetView(); | 45 virtual View* GetView(); |
46 virtual void Update(int viewport_size, int content_size, int current_pos); | 46 virtual void Update(int viewport_size, int content_size, int current_pos); |
47 | 47 |
48 // The NativeScrollBar we are bound to. | 48 // The NativeScrollBar we are bound to. |
49 NativeScrollBar* native_scroll_bar_; | 49 NativeScrollBar* native_scroll_bar_; |
50 | 50 |
51 // sb_container_ is a custom hwnd that we use to wrap the real | 51 // sb_container_ is a custom hwnd that we use to wrap the real |
52 // windows scrollbar. We need to do this to get the scroll events | 52 // windows scrollbar. We need to do this to get the scroll events |
53 // without having to do anything special in the high level hwnd. | 53 // without having to do anything special in the high level hwnd. |
54 ScrollBarContainer* sb_container_; | 54 scoped_ptr<ScrollBarContainer> sb_container_; |
| 55 |
| 56 // Last scrollbar state we wrote to the scrollbar. We keep it here, so we can |
| 57 // reinitialize the scrollbar to its previous state in case it gets hidden and |
| 58 // recreated. |
| 59 SCROLLINFO scroll_info_; |
55 | 60 |
56 DISALLOW_COPY_AND_ASSIGN(NativeScrollBarWin); | 61 DISALLOW_COPY_AND_ASSIGN(NativeScrollBarWin); |
57 }; | 62 }; |
58 | 63 |
59 } // namespace views | 64 } // namespace views |
60 | 65 |
61 #endif // #ifndef VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ | 66 #endif // #ifndef VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ |
62 | |
OLD | NEW |