diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 18:19:22 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 18:19:22 +0000 |
commit | 38a12c6cbfd87306a4bb2704cab819dd386a12fd (patch) | |
tree | 4079d66cafbf7d7858b2d41d1924ddcc6b375ef4 /webkit | |
parent | 9166f7419417f317c6bacc43381ad7b9f0c3821c (diff) | |
download | chromium_src-38a12c6cbfd87306a4bb2704cab819dd386a12fd.zip chromium_src-38a12c6cbfd87306a4bb2704cab819dd386a12fd.tar.gz chromium_src-38a12c6cbfd87306a4bb2704cab819dd386a12fd.tar.bz2 |
Aura doesn't use scrollbar buttons.
With https://bugs.webkit.org/show_bug.cgi?id=89264 we get webkit to delegate the size determination to WebThemeEngineImpl, and then we can retrieve it from the either native_theme_aura or native_theme_win.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10532207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.cc | 16 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.h | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc index 30464e0..7e60501 100644 --- a/webkit/glue/webthemeengine_impl_win.cc +++ b/webkit/glue/webthemeengine_impl_win.cc @@ -15,6 +15,7 @@ using WebKit::WebCanvas; using WebKit::WebColor; using WebKit::WebRect; +using WebKit::WebSize; namespace webkit_glue { @@ -981,4 +982,19 @@ void WebThemeEngineImpl::paintProgressBar( extra); } +WebSize WebThemeEngineImpl::getSize(int part) { + switch (part) { + case SBP_ARROWBTN: { + gfx::Size size = ui::NativeTheme::instance()->GetPartSize( + ui::NativeTheme::kScrollbarUpArrow, + ui::NativeTheme::kNormal, + ui::NativeTheme::ExtraParams()); + return WebSize(size.width(), size.height()); + } + default: + NOTREACHED() << "Unhandled part: " << part; + } + return WebSize(); +} + } // namespace webkit_glue diff --git a/webkit/glue/webthemeengine_impl_win.h b/webkit/glue/webthemeengine_impl_win.h index 49a05cf..be6642b 100644 --- a/webkit/glue/webthemeengine_impl_win.h +++ b/webkit/glue/webthemeengine_impl_win.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -41,6 +41,7 @@ class WebThemeEngineImpl : public WebKit::WebThemeEngine { WebKit::WebCanvas* canvas, const WebKit::WebRect& barRect, const WebKit::WebRect& valueRect, bool determinate, double animatedSeconds); + virtual WebKit::WebSize getSize(int part); }; } // namespace webkit_glue |