diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-14 22:34:45 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-14 22:34:45 +0000 |
commit | 40be2019b4847656a11f0eaed72e3cef04e6feca (patch) | |
tree | 5244fc8d51032d3bee3fc93ebfe5528cc051891b /webkit/glue | |
parent | a68c660bd1bcfa93d9759bdac2b384587e911c04 (diff) | |
download | chromium_src-40be2019b4847656a11f0eaed72e3cef04e6feca.zip chromium_src-40be2019b4847656a11f0eaed72e3cef04e6feca.tar.gz chromium_src-40be2019b4847656a11f0eaed72e3cef04e6feca.tar.bz2 |
ui: Move NativeTheme files into ui/base/native_theme/ directory.
BUG=103304,125844
R=ben@chromium.org
TBR=tony@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10310136
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webthemeengine_impl_android.cc | 64 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_linux.cc | 66 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.cc | 438 |
3 files changed, 284 insertions, 284 deletions
diff --git a/webkit/glue/webthemeengine_impl_android.cc b/webkit/glue/webthemeengine_impl_android.cc index efa3675..30b3e76 100644 --- a/webkit/glue/webthemeengine_impl_android.cc +++ b/webkit/glue/webthemeengine_impl_android.cc @@ -8,7 +8,7 @@ #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" -#include "ui/gfx/native_theme.h" +#include "ui/base/native_theme/native_theme.h" using WebKit::WebCanvas; using WebKit::WebColor; @@ -17,69 +17,69 @@ using WebKit::WebThemeEngine; namespace webkit_glue { -static gfx::NativeTheme::Part NativeThemePart( +static ui::NativeTheme::Part NativeThemePart( WebThemeEngine::Part part) { switch (part) { case WebThemeEngine::PartScrollbarDownArrow: - return gfx::NativeTheme::kScrollbarDownArrow; + return ui::NativeTheme::kScrollbarDownArrow; case WebThemeEngine::PartScrollbarLeftArrow: - return gfx::NativeTheme::kScrollbarLeftArrow; + return ui::NativeTheme::kScrollbarLeftArrow; case WebThemeEngine::PartScrollbarRightArrow: - return gfx::NativeTheme::kScrollbarRightArrow; + return ui::NativeTheme::kScrollbarRightArrow; case WebThemeEngine::PartScrollbarUpArrow: - return gfx::NativeTheme::kScrollbarUpArrow; + return ui::NativeTheme::kScrollbarUpArrow; case WebThemeEngine::PartScrollbarHorizontalThumb: // Android doesn't draw scrollbars. NOTREACHED(); - return static_cast<gfx::NativeTheme::Part>(0); + return static_cast<ui::NativeTheme::Part>(0); case WebThemeEngine::PartScrollbarVerticalThumb: // Android doesn't draw scrollbars. NOTREACHED(); - return static_cast<gfx::NativeTheme::Part>(0); + return static_cast<ui::NativeTheme::Part>(0); case WebThemeEngine::PartScrollbarHorizontalTrack: // Android doesn't draw scrollbars. NOTREACHED(); - return static_cast<gfx::NativeTheme::Part>(0); + return static_cast<ui::NativeTheme::Part>(0); case WebThemeEngine::PartScrollbarVerticalTrack: // Android doesn't draw scrollbars. NOTREACHED(); - return static_cast<gfx::NativeTheme::Part>(0); + return static_cast<ui::NativeTheme::Part>(0); case WebThemeEngine::PartCheckbox: - return gfx::NativeTheme::kCheckbox; + return ui::NativeTheme::kCheckbox; case WebThemeEngine::PartRadio: - return gfx::NativeTheme::kRadio; + return ui::NativeTheme::kRadio; case WebThemeEngine::PartButton: - return gfx::NativeTheme::kPushButton; + return ui::NativeTheme::kPushButton; case WebThemeEngine::PartTextField: - return gfx::NativeTheme::kTextField; + return ui::NativeTheme::kTextField; case WebThemeEngine::PartMenuList: - return gfx::NativeTheme::kMenuList; + return ui::NativeTheme::kMenuList; case WebThemeEngine::PartSliderTrack: - return gfx::NativeTheme::kSliderTrack; + return ui::NativeTheme::kSliderTrack; case WebThemeEngine::PartSliderThumb: - return gfx::NativeTheme::kSliderThumb; + return ui::NativeTheme::kSliderThumb; case WebThemeEngine::PartInnerSpinButton: - return gfx::NativeTheme::kInnerSpinButton; + return ui::NativeTheme::kInnerSpinButton; case WebThemeEngine::PartProgressBar: - return gfx::NativeTheme::kProgressBar; + return ui::NativeTheme::kProgressBar; default: - return gfx::NativeTheme::kScrollbarDownArrow; + return ui::NativeTheme::kScrollbarDownArrow; } } -static gfx::NativeTheme::State NativeThemeState( +static ui::NativeTheme::State NativeThemeState( WebThemeEngine::State state) { switch (state) { case WebThemeEngine::StateDisabled: - return gfx::NativeTheme::kDisabled; + return ui::NativeTheme::kDisabled; case WebThemeEngine::StateHover: - return gfx::NativeTheme::kHovered; + return ui::NativeTheme::kHovered; case WebThemeEngine::StateNormal: - return gfx::NativeTheme::kNormal; + return ui::NativeTheme::kNormal; case WebThemeEngine::StatePressed: - return gfx::NativeTheme::kPressed; + return ui::NativeTheme::kPressed; default: - return gfx::NativeTheme::kDisabled; + return ui::NativeTheme::kDisabled; } } @@ -87,7 +87,7 @@ static void GetNativeThemeExtraParams( WebThemeEngine::Part part, WebThemeEngine::State state, const WebThemeEngine::ExtraParams* extra_params, - gfx::NativeTheme::ExtraParams* native_theme_extra_params) { + ui::NativeTheme::ExtraParams* native_theme_extra_params) { switch (part) { case WebThemeEngine::PartScrollbarHorizontalTrack: case WebThemeEngine::PartScrollbarVerticalTrack: @@ -160,9 +160,9 @@ static void GetNativeThemeExtraParams( } WebKit::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { - gfx::NativeTheme::ExtraParams extra; - return gfx::NativeTheme::instance()->GetPartSize( - NativeThemePart(part), gfx::NativeTheme::kNormal, extra); + ui::NativeTheme::ExtraParams extra; + return ui::NativeTheme::instance()->GetPartSize( + NativeThemePart(part), ui::NativeTheme::kNormal, extra); } void WebThemeEngineImpl::paint( @@ -171,10 +171,10 @@ void WebThemeEngineImpl::paint( WebThemeEngine::State state, const WebKit::WebRect& rect, const WebThemeEngine::ExtraParams* extra_params) { - gfx::NativeTheme::ExtraParams native_theme_extra_params; + ui::NativeTheme::ExtraParams native_theme_extra_params; GetNativeThemeExtraParams( part, state, extra_params, &native_theme_extra_params); - gfx::NativeTheme::instance()->Paint( + ui::NativeTheme::instance()->Paint( canvas, NativeThemePart(part), NativeThemeState(state), diff --git a/webkit/glue/webthemeengine_impl_linux.cc b/webkit/glue/webthemeengine_impl_linux.cc index 4a23959..8bd81f4 100644 --- a/webkit/glue/webthemeengine_impl_linux.cc +++ b/webkit/glue/webthemeengine_impl_linux.cc @@ -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. @@ -7,7 +7,7 @@ #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" -#include "ui/gfx/native_theme.h" +#include "ui/base/native_theme/native_theme.h" using WebKit::WebCanvas; using WebKit::WebColor; @@ -16,61 +16,61 @@ using WebKit::WebThemeEngine; namespace webkit_glue { -static gfx::NativeTheme::Part NativeThemePart( +static ui::NativeTheme::Part NativeThemePart( WebThemeEngine::Part part) { switch (part) { case WebThemeEngine::PartScrollbarDownArrow: - return gfx::NativeTheme::kScrollbarDownArrow; + return ui::NativeTheme::kScrollbarDownArrow; case WebThemeEngine::PartScrollbarLeftArrow: - return gfx::NativeTheme::kScrollbarLeftArrow; + return ui::NativeTheme::kScrollbarLeftArrow; case WebThemeEngine::PartScrollbarRightArrow: - return gfx::NativeTheme::kScrollbarRightArrow; + return ui::NativeTheme::kScrollbarRightArrow; case WebThemeEngine::PartScrollbarUpArrow: - return gfx::NativeTheme::kScrollbarUpArrow; + return ui::NativeTheme::kScrollbarUpArrow; case WebThemeEngine::PartScrollbarHorizontalThumb: - return gfx::NativeTheme::kScrollbarHorizontalThumb; + return ui::NativeTheme::kScrollbarHorizontalThumb; case WebThemeEngine::PartScrollbarVerticalThumb: - return gfx::NativeTheme::kScrollbarVerticalThumb; + return ui::NativeTheme::kScrollbarVerticalThumb; case WebThemeEngine::PartScrollbarHorizontalTrack: - return gfx::NativeTheme::kScrollbarHorizontalTrack; + return ui::NativeTheme::kScrollbarHorizontalTrack; case WebThemeEngine::PartScrollbarVerticalTrack: - return gfx::NativeTheme::kScrollbarVerticalTrack; + return ui::NativeTheme::kScrollbarVerticalTrack; case WebThemeEngine::PartCheckbox: - return gfx::NativeTheme::kCheckbox; + return ui::NativeTheme::kCheckbox; case WebThemeEngine::PartRadio: - return gfx::NativeTheme::kRadio; + return ui::NativeTheme::kRadio; case WebThemeEngine::PartButton: - return gfx::NativeTheme::kPushButton; + return ui::NativeTheme::kPushButton; case WebThemeEngine::PartTextField: - return gfx::NativeTheme::kTextField; + return ui::NativeTheme::kTextField; case WebThemeEngine::PartMenuList: - return gfx::NativeTheme::kMenuList; + return ui::NativeTheme::kMenuList; case WebThemeEngine::PartSliderTrack: - return gfx::NativeTheme::kSliderTrack; + return ui::NativeTheme::kSliderTrack; case WebThemeEngine::PartSliderThumb: - return gfx::NativeTheme::kSliderThumb; + return ui::NativeTheme::kSliderThumb; case WebThemeEngine::PartInnerSpinButton: - return gfx::NativeTheme::kInnerSpinButton; + return ui::NativeTheme::kInnerSpinButton; case WebThemeEngine::PartProgressBar: - return gfx::NativeTheme::kProgressBar; + return ui::NativeTheme::kProgressBar; default: - return gfx::NativeTheme::kScrollbarDownArrow; + return ui::NativeTheme::kScrollbarDownArrow; } } -static gfx::NativeTheme::State NativeThemeState( +static ui::NativeTheme::State NativeThemeState( WebThemeEngine::State state) { switch (state) { case WebThemeEngine::StateDisabled: - return gfx::NativeTheme::kDisabled; + return ui::NativeTheme::kDisabled; case WebThemeEngine::StateHover: - return gfx::NativeTheme::kHovered; + return ui::NativeTheme::kHovered; case WebThemeEngine::StateNormal: - return gfx::NativeTheme::kNormal; + return ui::NativeTheme::kNormal; case WebThemeEngine::StatePressed: - return gfx::NativeTheme::kPressed; + return ui::NativeTheme::kPressed; default: - return gfx::NativeTheme::kDisabled; + return ui::NativeTheme::kDisabled; } } @@ -78,7 +78,7 @@ static void GetNativeThemeExtraParams( WebThemeEngine::Part part, WebThemeEngine::State state, const WebThemeEngine::ExtraParams* extra_params, - gfx::NativeTheme::ExtraParams* native_theme_extra_params) { + ui::NativeTheme::ExtraParams* native_theme_extra_params) { switch (part) { case WebThemeEngine::PartScrollbarHorizontalTrack: case WebThemeEngine::PartScrollbarVerticalTrack: @@ -157,9 +157,9 @@ static void GetNativeThemeExtraParams( } WebKit::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { - gfx::NativeTheme::ExtraParams extra; - return gfx::NativeTheme::instance()->GetPartSize(NativeThemePart(part), - gfx::NativeTheme::kNormal, + ui::NativeTheme::ExtraParams extra; + return ui::NativeTheme::instance()->GetPartSize(NativeThemePart(part), + ui::NativeTheme::kNormal, extra); } @@ -169,10 +169,10 @@ void WebThemeEngineImpl::paint( WebThemeEngine::State state, const WebKit::WebRect& rect, const WebThemeEngine::ExtraParams* extra_params) { - gfx::NativeTheme::ExtraParams native_theme_extra_params; + ui::NativeTheme::ExtraParams native_theme_extra_params; GetNativeThemeExtraParams( part, state, extra_params, &native_theme_extra_params); - gfx::NativeTheme::instance()->Paint( + ui::NativeTheme::instance()->Paint( canvas, NativeThemePart(part), NativeThemeState(state), diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc index f90b158..d717b32 100644 --- a/webkit/glue/webthemeengine_impl_win.cc +++ b/webkit/glue/webthemeengine_impl_win.cc @@ -1,16 +1,16 @@ -// 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. #include "webkit/glue/webthemeengine_impl_win.h" -#include <vsstyle.h> // To convert to gfx::NativeTheme::State +#include <vsstyle.h> // To convert to ui::NativeTheme::State #include "base/logging.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/skia_utils_win.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" -#include "ui/gfx/native_theme.h" +#include "ui/base/native_theme/native_theme.h" using WebKit::WebCanvas; using WebKit::WebColor; @@ -27,44 +27,44 @@ static RECT WebRectToRECT(const WebRect& rect) { return result; } -static gfx::NativeTheme::State WebButtonStateToGfx( - int part, int state, gfx::NativeTheme::ButtonExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebButtonStateToGfx( + int part, int state, ui::NativeTheme::ButtonExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; if (part == BP_PUSHBUTTON) { switch (state) { case PBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case PBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case PBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case PBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case PBS_DEFAULTED: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = true; break; case PBS_DEFAULTED_ANIMATING: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = true; @@ -75,49 +75,49 @@ static gfx::NativeTheme::State WebButtonStateToGfx( } else if (part == BP_RADIOBUTTON) { switch (state) { case RBS_UNCHECKEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case RBS_UNCHECKEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case RBS_UNCHECKEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case RBS_UNCHECKEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case RBS_CHECKEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case RBS_CHECKEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case RBS_CHECKEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case RBS_CHECKEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = true; extra->indeterminate = false; extra->is_default = false; @@ -129,121 +129,121 @@ static gfx::NativeTheme::State WebButtonStateToGfx( } else if (part == BP_CHECKBOX) { switch (state) { case CBS_UNCHECKEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_UNCHECKEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_UNCHECKEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_UNCHECKEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_CHECKEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case CBS_CHECKEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case CBS_CHECKEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case CBS_CHECKEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = true; extra->indeterminate = false; extra->is_default = false; break; case CBS_MIXEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = true; extra->is_default = false; break; case CBS_MIXEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = true; extra->is_default = false; break; case CBS_MIXEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = true; extra->is_default = false; break; case CBS_MIXEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = true; extra->is_default = false; break; case CBS_IMPLICITNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_IMPLICITHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_IMPLICITPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_IMPLICITDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_EXCLUDEDNORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_EXCLUDEDHOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_EXCLUDEDPRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CBS_EXCLUDEDDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; @@ -255,13 +255,13 @@ static gfx::NativeTheme::State WebButtonStateToGfx( } else if (part == BP_GROUPBOX) { switch (state) { case GBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case GBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; @@ -273,37 +273,37 @@ static gfx::NativeTheme::State WebButtonStateToGfx( } else if (part == BP_COMMANDLINK) { switch (state) { case CMDLS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLS_DEFAULTED: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = true; break; case CMDLS_DEFAULTED_ANIMATING: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = true; @@ -315,31 +315,31 @@ static gfx::NativeTheme::State WebButtonStateToGfx( } else if (part == BP_COMMANDLINKGLYPH) { switch (state) { case CMDLGS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLGS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLGS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLGS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->checked = false; extra->indeterminate = false; extra->is_default = false; break; case CMDLGS_DEFAULTED: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->checked = false; extra->indeterminate = false; extra->is_default = true; @@ -355,47 +355,47 @@ static gfx::NativeTheme::State WebButtonStateToGfx( void WebThemeEngineImpl::paintButton( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::Part native_part = gfx::NativeTheme::kPushButton; + ui::NativeTheme::Part native_part = ui::NativeTheme::kPushButton; switch (part) { case BP_PUSHBUTTON: - native_part = gfx::NativeTheme::kPushButton; + native_part = ui::NativeTheme::kPushButton; break; case BP_CHECKBOX: - native_part = gfx::NativeTheme::kCheckbox; + native_part = ui::NativeTheme::kCheckbox; break; case BP_RADIOBUTTON: - native_part = gfx::NativeTheme::kRadio; + native_part = ui::NativeTheme::kRadio; break; default: NOTREACHED() << "Invalid part: " << part; break; } - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebButtonStateToGfx(part, state, + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebButtonStateToGfx(part, state, &extra.button); extra.button.classic_state = classic_state; gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebListMenuStateToGfx(int part, int state) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebListMenuStateToGfx(int part, int state) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (part) { case CP_DROPDOWNBUTTON: switch (state) { case CBXS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; break; case CBXS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; break; case CBXS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; break; case CBXS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; break; default: NOTREACHED() << "Invalid state: " << state; @@ -412,126 +412,126 @@ static gfx::NativeTheme::State WebListMenuStateToGfx(int part, int state) { void WebThemeEngineImpl::paintMenuList( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::Part native_part = gfx::NativeTheme::kMenuList; + ui::NativeTheme::Part native_part = ui::NativeTheme::kMenuList; switch (part) { case CP_DROPDOWNBUTTON: - native_part = gfx::NativeTheme::kMenuList; + native_part = ui::NativeTheme::kMenuList; break; default: NOTREACHED() << "Invalid part: " << part; break; } - gfx::NativeTheme::State native_state = WebListMenuStateToGfx(part, state); + ui::NativeTheme::State native_state = WebListMenuStateToGfx(part, state); gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::ExtraParams extra; + ui::NativeTheme::ExtraParams extra; extra.menu_list.classic_state = classic_state; - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebScrollbarArrowStateToGfx( - int state, gfx::NativeTheme::Part* part, - gfx::NativeTheme::ScrollbarArrowExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebScrollbarArrowStateToGfx( + int state, ui::NativeTheme::Part* part, + ui::NativeTheme::ScrollbarArrowExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (state) { case ABS_UPNORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *part = gfx::NativeTheme::kScrollbarUpArrow; + gfx_state = ui::NativeTheme::kNormal; + *part = ui::NativeTheme::kScrollbarUpArrow; extra->is_hovering = false; break; case ABS_UPHOT: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarUpArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarUpArrow; extra->is_hovering = false; break; case ABS_UPPRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *part = gfx::NativeTheme::kScrollbarUpArrow; + gfx_state = ui::NativeTheme::kPressed; + *part = ui::NativeTheme::kScrollbarUpArrow; extra->is_hovering = false; break; case ABS_UPDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *part = gfx::NativeTheme::kScrollbarUpArrow; + gfx_state = ui::NativeTheme::kDisabled; + *part = ui::NativeTheme::kScrollbarUpArrow; extra->is_hovering = false; break; case ABS_DOWNNORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *part = gfx::NativeTheme::kScrollbarDownArrow; + gfx_state = ui::NativeTheme::kNormal; + *part = ui::NativeTheme::kScrollbarDownArrow; extra->is_hovering = false; break; case ABS_DOWNHOT: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarDownArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarDownArrow; extra->is_hovering = false; break; case ABS_DOWNPRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *part = gfx::NativeTheme::kScrollbarDownArrow; + gfx_state = ui::NativeTheme::kPressed; + *part = ui::NativeTheme::kScrollbarDownArrow; extra->is_hovering = false; break; case ABS_DOWNDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *part = gfx::NativeTheme::kScrollbarDownArrow; + gfx_state = ui::NativeTheme::kDisabled; + *part = ui::NativeTheme::kScrollbarDownArrow; extra->is_hovering = false; break; case ABS_LEFTNORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *part = gfx::NativeTheme::kScrollbarLeftArrow; + gfx_state = ui::NativeTheme::kNormal; + *part = ui::NativeTheme::kScrollbarLeftArrow; extra->is_hovering = false; break; case ABS_LEFTHOT: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarLeftArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarLeftArrow; extra->is_hovering = false; break; case ABS_LEFTPRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *part = gfx::NativeTheme::kScrollbarLeftArrow; + gfx_state = ui::NativeTheme::kPressed; + *part = ui::NativeTheme::kScrollbarLeftArrow; extra->is_hovering = false; break; case ABS_LEFTDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *part = gfx::NativeTheme::kScrollbarLeftArrow; + gfx_state = ui::NativeTheme::kDisabled; + *part = ui::NativeTheme::kScrollbarLeftArrow; extra->is_hovering = false; break; case ABS_RIGHTNORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *part = gfx::NativeTheme::kScrollbarRightArrow; + gfx_state = ui::NativeTheme::kNormal; + *part = ui::NativeTheme::kScrollbarRightArrow; extra->is_hovering = false; break; case ABS_RIGHTHOT: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarRightArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarRightArrow; extra->is_hovering = false; break; case ABS_RIGHTPRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *part = gfx::NativeTheme::kScrollbarRightArrow; + gfx_state = ui::NativeTheme::kPressed; + *part = ui::NativeTheme::kScrollbarRightArrow; extra->is_hovering = false; break; case ABS_RIGHTDISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *part = gfx::NativeTheme::kScrollbarRightArrow; + gfx_state = ui::NativeTheme::kDisabled; + *part = ui::NativeTheme::kScrollbarRightArrow; extra->is_hovering = false; break; case ABS_UPHOVER: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarUpArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarUpArrow; extra->is_hovering = true; break; case ABS_DOWNHOVER: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarDownArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarDownArrow; extra->is_hovering = true; break; case ABS_LEFTHOVER: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarLeftArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarLeftArrow; extra->is_hovering = true; break; case ABS_RIGHTHOVER: - gfx_state = gfx::NativeTheme::kHovered; - *part = gfx::NativeTheme::kScrollbarRightArrow; + gfx_state = ui::NativeTheme::kHovered; + *part = ui::NativeTheme::kScrollbarRightArrow; extra->is_hovering = true; break; default: @@ -543,37 +543,37 @@ static gfx::NativeTheme::State WebScrollbarArrowStateToGfx( void WebThemeEngineImpl::paintScrollbarArrow( WebCanvas* canvas, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::Part native_part; - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebScrollbarArrowStateToGfx( + ui::NativeTheme::Part native_part; + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebScrollbarArrowStateToGfx( state, &native_part, &extra.scrollbar_arrow); gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebScrollbarThumbStateToGfx( - int state, gfx::NativeTheme::ScrollbarThumbExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebScrollbarThumbStateToGfx( + int state, ui::NativeTheme::ScrollbarThumbExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (state) { case SCRBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->is_hovering = false; break; case SCRBS_HOVER: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->is_hovering = true; break; case SCRBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->is_hovering = false; break; case SCRBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->is_hovering = false; break; case SCRBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->is_hovering = false; break; default: @@ -586,54 +586,54 @@ static gfx::NativeTheme::State WebScrollbarThumbStateToGfx( void WebThemeEngineImpl::paintScrollbarThumb( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::Part native_part; + ui::NativeTheme::Part native_part; if (part == SBP_THUMBBTNHORZ) { - native_part = gfx::NativeTheme::kScrollbarHorizontalThumb; + native_part = ui::NativeTheme::kScrollbarHorizontalThumb; } else if (part == SBP_THUMBBTNVERT) { - native_part = gfx::NativeTheme::kScrollbarVerticalThumb; + native_part = ui::NativeTheme::kScrollbarVerticalThumb; } else if (part == SBP_GRIPPERHORZ) { - native_part = gfx::NativeTheme::kScrollbarHorizontalGripper; + native_part = ui::NativeTheme::kScrollbarHorizontalGripper; } else if (part == SBP_GRIPPERVERT) { - native_part = gfx::NativeTheme::kScrollbarVerticalGripper; + native_part = ui::NativeTheme::kScrollbarVerticalGripper; } else { NOTREACHED() << "Invalid part: " << part; } - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebScrollbarThumbStateToGfx( + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebScrollbarThumbStateToGfx( state, &extra.scrollbar_thumb); gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebScrollbarTrackStateToGfx( - int part, int state, gfx::NativeTheme::Part* gfx_part, - gfx::NativeTheme::ScrollbarTrackExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebScrollbarTrackStateToGfx( + int part, int state, ui::NativeTheme::Part* gfx_part, + ui::NativeTheme::ScrollbarTrackExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (part) { case SBP_LOWERTRACKHORZ: switch (state) { case SCRBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kNormal; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = false; break; case SCRBS_HOVER: case SCRBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kHovered; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = false; break; case SCRBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kPressed; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = false; break; case SCRBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kDisabled; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = false; break; default: @@ -644,24 +644,24 @@ static gfx::NativeTheme::State WebScrollbarTrackStateToGfx( case SBP_UPPERTRACKHORZ: switch (state) { case SCRBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kNormal; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = true; break; case SCRBS_HOVER: case SCRBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kHovered; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = true; break; case SCRBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kPressed; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = true; break; case SCRBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *gfx_part = gfx::NativeTheme::kScrollbarHorizontalTrack; + gfx_state = ui::NativeTheme::kDisabled; + *gfx_part = ui::NativeTheme::kScrollbarHorizontalTrack; extra->is_upper = true; break; default: @@ -672,24 +672,24 @@ static gfx::NativeTheme::State WebScrollbarTrackStateToGfx( case SBP_LOWERTRACKVERT: switch (state) { case SCRBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kNormal; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = false; break; case SCRBS_HOVER: case SCRBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kHovered; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = false; break; case SCRBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kPressed; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = false; break; case SCRBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kDisabled; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = false; break; default: @@ -700,24 +700,24 @@ static gfx::NativeTheme::State WebScrollbarTrackStateToGfx( case SBP_UPPERTRACKVERT: switch (state) { case SCRBS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kNormal; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = true; break; case SCRBS_HOVER: case SCRBS_HOT: - gfx_state = gfx::NativeTheme::kHovered; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kHovered; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = true; break; case SCRBS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kPressed; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = true; break; case SCRBS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; - *gfx_part = gfx::NativeTheme::kScrollbarVerticalTrack; + gfx_state = ui::NativeTheme::kDisabled; + *gfx_part = ui::NativeTheme::kScrollbarVerticalTrack; extra->is_upper = true; break; default: @@ -735,9 +735,9 @@ static gfx::NativeTheme::State WebScrollbarTrackStateToGfx( void WebThemeEngineImpl::paintScrollbarTrack( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect, const WebRect& align_rect) { - gfx::NativeTheme::Part native_part; - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebScrollbarTrackStateToGfx( + ui::NativeTheme::Part native_part; + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebScrollbarTrackStateToGfx( part, state, &native_part, &extra.scrollbar_track); extra.scrollbar_track.classic_state = classic_state; extra.scrollbar_track.track_x = align_rect.x; @@ -746,33 +746,33 @@ void WebThemeEngineImpl::paintScrollbarTrack( extra.scrollbar_track.track_height = align_rect.height; gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebSpinButtonStateToGfx( - int part, int state, gfx::NativeTheme::InnerSpinButtonExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebSpinButtonStateToGfx( + int part, int state, ui::NativeTheme::InnerSpinButtonExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (part) { case SPNP_UP: switch (state) { case UPS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->spin_up = true; extra->read_only = false; break; case UPS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->spin_up = true; extra->read_only = false; break; case UPS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->spin_up = true; extra->read_only = false; break; case UPS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->spin_up = true; extra->read_only = false; break; @@ -784,22 +784,22 @@ static gfx::NativeTheme::State WebSpinButtonStateToGfx( case SPNP_DOWN: switch (state) { case DNS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->spin_up = false; extra->read_only = false; break; case DNS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->spin_up = false; extra->read_only = false; break; case DNS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->spin_up = false; extra->read_only = false; break; case DNS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->spin_up = false; extra->read_only = false; break; @@ -818,51 +818,51 @@ static gfx::NativeTheme::State WebSpinButtonStateToGfx( void WebThemeEngineImpl::paintSpinButton( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebSpinButtonStateToGfx( + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebSpinButtonStateToGfx( part, state, &extra.inner_spin); extra.inner_spin.classic_state = classic_state; gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, - gfx::NativeTheme::kInnerSpinButton, + ui::NativeTheme::instance()->Paint(canvas, + ui::NativeTheme::kInnerSpinButton, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebTextFieldStateToGfx( - int part, int state, gfx::NativeTheme::TextFieldExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; +static ui::NativeTheme::State WebTextFieldStateToGfx( + int part, int state, ui::NativeTheme::TextFieldExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (part) { case EP_EDITTEXT: switch (state) { case ETS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->is_read_only = false; extra->is_focused = false; break; case ETS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; extra->is_read_only = false; extra->is_focused = false; break; case ETS_SELECTED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; extra->is_read_only = false; extra->is_focused = false; break; case ETS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; extra->is_read_only = false; extra->is_focused = false; break; case ETS_FOCUSED: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->is_read_only = false; extra->is_focused = true; break; case ETS_READONLY: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; extra->is_read_only = true; extra->is_focused = false; break; @@ -882,8 +882,8 @@ void WebThemeEngineImpl::paintTextField( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect, WebColor color, bool fill_content_area, bool draw_edges) { - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebTextFieldStateToGfx( + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebTextFieldStateToGfx( part, state, &extra.text_field); extra.text_field.fill_content_area = fill_content_area; extra.text_field.draw_edges = draw_edges; @@ -891,27 +891,27 @@ void WebThemeEngineImpl::paintTextField( extra.text_field.classic_state = classic_state; gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); - gfx::NativeTheme::instance()->Paint(canvas, - gfx::NativeTheme::kTextField, native_state, gfx_rect, extra); + ui::NativeTheme::instance()->Paint(canvas, + ui::NativeTheme::kTextField, native_state, gfx_rect, extra); } -static gfx::NativeTheme::State WebTrackbarStateToGfx( +static ui::NativeTheme::State WebTrackbarStateToGfx( int part, int state, - gfx::NativeTheme::TrackbarExtraParams* extra) { - gfx::NativeTheme::State gfx_state = gfx::NativeTheme::kNormal; + ui::NativeTheme::TrackbarExtraParams* extra) { + ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; switch (state) { case TUS_NORMAL: - gfx_state = gfx::NativeTheme::kNormal; + gfx_state = ui::NativeTheme::kNormal; break; case TUS_HOT: - gfx_state = gfx::NativeTheme::kHovered; + gfx_state = ui::NativeTheme::kHovered; break; case TUS_PRESSED: - gfx_state = gfx::NativeTheme::kPressed; + gfx_state = ui::NativeTheme::kPressed; break; case TUS_DISABLED: - gfx_state = gfx::NativeTheme::kDisabled; + gfx_state = ui::NativeTheme::kDisabled; break; default: NOTREACHED() << "Invalid state: " << state; @@ -938,27 +938,27 @@ static gfx::NativeTheme::State WebTrackbarStateToGfx( void WebThemeEngineImpl::paintTrackbar( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - gfx::NativeTheme::Part native_part = gfx::NativeTheme::kTrackbarTrack; + ui::NativeTheme::Part native_part = ui::NativeTheme::kTrackbarTrack; switch (part) { case TKP_TRACK: case TKP_TRACKVERT: - native_part = gfx::NativeTheme::kTrackbarTrack; + native_part = ui::NativeTheme::kTrackbarTrack; break; case TKP_THUMBBOTTOM: case TKP_THUMBVERT: - native_part = gfx::NativeTheme::kTrackbarThumb; + native_part = ui::NativeTheme::kTrackbarThumb; break; default: NOTREACHED() << "Invalid part: " << part; break; } - gfx::NativeTheme::ExtraParams extra; - gfx::NativeTheme::State native_state = WebTrackbarStateToGfx(part, state, + ui::NativeTheme::ExtraParams extra; + ui::NativeTheme::State native_state = WebTrackbarStateToGfx(part, state, &extra.trackbar); gfx::Rect gfx_rect(rect.x, rect.y, rect.width, rect.height); extra.trackbar.classic_state = classic_state; - gfx::NativeTheme::instance()->Paint(canvas, native_part, + ui::NativeTheme::instance()->Paint(canvas, native_part, native_state, gfx_rect, extra); } @@ -967,15 +967,15 @@ void WebThemeEngineImpl::paintProgressBar( bool determinate, double animatedSeconds) { gfx::Rect gfx_rect(barRect.x, barRect.y, barRect.width, barRect.height); - gfx::NativeTheme::ExtraParams extra; + ui::NativeTheme::ExtraParams extra; extra.progress_bar.animated_seconds = animatedSeconds; extra.progress_bar.determinate = determinate; extra.progress_bar.value_rect_x = valueRect.x; extra.progress_bar.value_rect_y = valueRect.y; extra.progress_bar.value_rect_width = valueRect.width; extra.progress_bar.value_rect_height = valueRect.height; - gfx::NativeTheme::instance()->Paint(canvas, gfx::NativeTheme::kProgressBar, - gfx::NativeTheme::kNormal, gfx_rect, + ui::NativeTheme::instance()->Paint(canvas, ui::NativeTheme::kProgressBar, + ui::NativeTheme::kNormal, gfx_rect, extra); } |