diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:41:41 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:41:41 +0000 |
commit | 2629d65a605e07b47287af311f85c978c0e009c7 (patch) | |
tree | 659a0173a376d52a57f8adfeeada179ef314a1fa /app | |
parent | 961c3ee9e2f89148b9e001ea116e90b5b68681a4 (diff) | |
download | chromium_src-2629d65a605e07b47287af311f85c978c0e009c7.zip chromium_src-2629d65a605e07b47287af311f85c978c0e009c7.tar.gz chromium_src-2629d65a605e07b47287af311f85c978c0e009c7.tar.bz2 |
Change most callers of NativeScrollbar size functions to use a dedicated function that matches WebKit instead, since the callers really care about content area scrollbars.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/463061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/app_base.gypi | 2 | ||||
-rw-r--r-- | app/gfx/scrollbar_size.cc | 23 | ||||
-rw-r--r-- | app/gfx/scrollbar_size.h | 17 |
3 files changed, 42 insertions, 0 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi index 98f830e..a27ff88 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -142,6 +142,8 @@ 'gfx/path_gtk.cc', 'gfx/path_win.cc', 'gfx/path.h', + 'gfx/scrollbar_size.cc', + 'gfx/scrollbar_size.h', 'gfx/skbitmap_operations.cc', 'gfx/skbitmap_operations.h', 'gfx/text_elider.cc', diff --git a/app/gfx/scrollbar_size.cc b/app/gfx/scrollbar_size.cc new file mode 100644 index 0000000..0413d8a --- /dev/null +++ b/app/gfx/scrollbar_size.cc @@ -0,0 +1,23 @@ +// 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. + +#include "app/gfx/scrollbar_size.h" + +#include "base/compiler_specific.h" + +#if defined(OS_WIN) +#include <windows.h> +#endif + +namespace gfx { + +int scrollbar_size() { +#if defined(OS_WIN) + return GetSystemMetrics(SM_CXVSCROLL); +#else + return 15; +#endif +} + +} // namespace gfx diff --git a/app/gfx/scrollbar_size.h b/app/gfx/scrollbar_size.h new file mode 100644 index 0000000..aa993e3 --- /dev/null +++ b/app/gfx/scrollbar_size.h @@ -0,0 +1,17 @@ +// 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 APP_GFX_SCROLLBAR_SIZE_H_ +#define APP_GFX_SCROLLBAR_SIZE_H_ + +namespace gfx { + +// This should return the thickness, in pixels, of a scrollbar in web content. +// This needs to match the values in WebCore's +// ScrollbarThemeChromiumXXX.cpp::scrollbarThickness(). +int scrollbar_size(); + +} // namespace gfx + +#endif // APP_GFX_SCROLLBAR_SIZE_H_ |