summaryrefslogtreecommitdiffstats
path: root/views/controls/scrollbar
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 01:25:03 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 01:25:03 +0000
commit2e86d3a4d76c51d3fcd37cfcd2281db711f9af95 (patch)
treec9ca6cfa6363ac30f12e191edcd1034ba38b1498 /views/controls/scrollbar
parent094b052eb3708bef1affa9b04d3d3d87018eab0e (diff)
downloadchromium_src-2e86d3a4d76c51d3fcd37cfcd2281db711f9af95.zip
chromium_src-2e86d3a4d76c51d3fcd37cfcd2281db711f9af95.tar.gz
chromium_src-2e86d3a4d76c51d3fcd37cfcd2281db711f9af95.tar.bz2
aura: Fix views_unittests and aura_unittests on linux.
. Use NativeScrollBarViews in aura and wayland. . Disable clipboard-related tests in TextfieldViewsModelTest until aura on linux has clipboard support. . Use osmesa implementation for aura_unittests. TBR=evan@chromium.org BUG=97845, 99128 TEST=views_unittests passes on linux with use_aura Review URL: http://codereview.chromium.org/8143021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/scrollbar')
-rw-r--r--views/controls/scrollbar/native_scroll_bar.cc30
-rw-r--r--views/controls/scrollbar/native_scroll_bar_views.cc21
-rw-r--r--views/controls/scrollbar/native_scroll_bar_wayland.cc30
3 files changed, 26 insertions, 55 deletions
diff --git a/views/controls/scrollbar/native_scroll_bar.cc b/views/controls/scrollbar/native_scroll_bar.cc
index 5372b17..44fbafb 100644
--- a/views/controls/scrollbar/native_scroll_bar.cc
+++ b/views/controls/scrollbar/native_scroll_bar.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -11,6 +11,10 @@
#include "views/controls/scrollbar/native_scroll_bar_wrapper.h"
#include "views/widget/widget.h"
+#if defined(USE_AURA)
+#include "views/controls/scrollbar/native_scroll_bar_views.h"
+#endif
+
namespace views {
// static
@@ -97,29 +101,5 @@ int NativeScrollBar::GetPosition() const {
return native_wrapper_->GetPosition();
}
-
-#if defined(USE_AURA)
-
-// static
-NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
- NativeScrollBar* scroll_bar) {
- NOTIMPLEMENTED();
- return NULL;
-}
-
-// static
-int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
- NOTIMPLEMENTED();
- return 16;
-}
-
-// static
-int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
- NOTIMPLEMENTED();
- return 16;
-}
-
-#endif
-
} // namespace views
diff --git a/views/controls/scrollbar/native_scroll_bar_views.cc b/views/controls/scrollbar/native_scroll_bar_views.cc
index f007b50..aaa86c1 100644
--- a/views/controls/scrollbar/native_scroll_bar_views.cc
+++ b/views/controls/scrollbar/native_scroll_bar_views.cc
@@ -384,4 +384,25 @@ gfx::Rect NativeScrollBarViews::GetTrackBounds() const {
return bounds;
}
+#if !defined(TOOLKIT_USES_GTK)
+////////////////////////////////////////////////////////////////////////////////
+// NativewScrollBarWrapper, public:
+
+// static
+NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
+ NativeScrollBar* scroll_bar) {
+ return new NativeScrollBarViews(scroll_bar);
+}
+
+// static
+int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
+ return 20;
+}
+
+// static
+int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
+ return 20;
+}
+#endif
+
} // namespace views
diff --git a/views/controls/scrollbar/native_scroll_bar_wayland.cc b/views/controls/scrollbar/native_scroll_bar_wayland.cc
deleted file mode 100644
index 706647f..0000000
--- a/views/controls/scrollbar/native_scroll_bar_wayland.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "views/controls/scrollbar/native_scroll_bar.h"
-#include "views/controls/scrollbar/native_scroll_bar_views.h"
-#include "views/controls/scrollbar/native_scroll_bar_wrapper.h"
-
-namespace views {
-
-////////////////////////////////////////////////////////////////////////////////
-// NativewScrollBarWrapper, public:
-
-// static
-NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
- NativeScrollBar* scroll_bar) {
- return new NativeScrollBarViews(scroll_bar);
-}
-
-// static
-int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
- return 20;
-}
-
-// static
-int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
- return 20;
-}
-
-} // namespace views