OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "views/controls/scrollbar/native_scroll_bar.h" | 5 #include "views/controls/scrollbar/native_scroll_bar.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "views/controls/scrollbar/native_scroll_bar_wrapper.h" | 11 #include "views/controls/scrollbar/native_scroll_bar_wrapper.h" |
12 #include "views/widget/widget.h" | 12 #include "views/widget/widget.h" |
13 | 13 |
| 14 #if defined(USE_AURA) |
| 15 #include "views/controls/scrollbar/native_scroll_bar_views.h" |
| 16 #endif |
| 17 |
14 namespace views { | 18 namespace views { |
15 | 19 |
16 // static | 20 // static |
17 const char NativeScrollBar::kViewClassName[] = "views/NativeScrollBar"; | 21 const char NativeScrollBar::kViewClassName[] = "views/NativeScrollBar"; |
18 | 22 |
19 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
20 // NativeScrollBar, public: | 24 // NativeScrollBar, public: |
21 NativeScrollBar::NativeScrollBar(bool is_horizontal) | 25 NativeScrollBar::NativeScrollBar(bool is_horizontal) |
22 : ScrollBar(is_horizontal), | 26 : ScrollBar(is_horizontal), |
23 native_wrapper_(NULL) { | 27 native_wrapper_(NULL) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return IsHorizontal() ? | 94 return IsHorizontal() ? |
91 GetHorizontalScrollBarHeight() : GetVerticalScrollBarWidth(); | 95 GetHorizontalScrollBarHeight() : GetVerticalScrollBarWidth(); |
92 } | 96 } |
93 | 97 |
94 int NativeScrollBar::GetPosition() const { | 98 int NativeScrollBar::GetPosition() const { |
95 if (!native_wrapper_) | 99 if (!native_wrapper_) |
96 return 0; | 100 return 0; |
97 return native_wrapper_->GetPosition(); | 101 return native_wrapper_->GetPosition(); |
98 } | 102 } |
99 | 103 |
100 | |
101 #if defined(USE_AURA) | |
102 | |
103 // static | |
104 NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper( | |
105 NativeScrollBar* scroll_bar) { | |
106 NOTIMPLEMENTED(); | |
107 return NULL; | |
108 } | |
109 | |
110 // static | |
111 int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() { | |
112 NOTIMPLEMENTED(); | |
113 return 16; | |
114 } | |
115 | |
116 // static | |
117 int NativeScrollBarWrapper::GetVerticalScrollBarWidth() { | |
118 NOTIMPLEMENTED(); | |
119 return 16; | |
120 } | |
121 | |
122 #endif | |
123 | |
124 } // namespace views | 104 } // namespace views |
125 | 105 |
OLD | NEW |