| Index: ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| index 7eb2a084ef7d21e24176829d43f154391c8f39e6..72f47c3349e9dd6b1d00c532b477d9c9e00a8d4e 100644
|
| --- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| +++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| @@ -41,9 +41,9 @@ class ScrollBarButton : public BaseScrollBarButton {
|
| virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
|
|
| private:
|
| - gfx::NativeTheme::ExtraParams GetNativeThemeParams() const;
|
| - gfx::NativeTheme::Part GetNativeThemePart() const;
|
| - gfx::NativeTheme::State GetNativeThemeState() const;
|
| + ui::NativeTheme::ExtraParams GetNativeThemeParams() const;
|
| + ui::NativeTheme::Part GetNativeThemePart() const;
|
| + ui::NativeTheme::State GetNativeThemeState() const;
|
|
|
| Type type_;
|
| };
|
| @@ -63,9 +63,9 @@ class ScrollBarThumb : public BaseScrollBarThumb {
|
| virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
|
|
| private:
|
| - gfx::NativeTheme::ExtraParams GetNativeThemeParams() const;
|
| - gfx::NativeTheme::Part GetNativeThemePart() const;
|
| - gfx::NativeTheme::State GetNativeThemeState() const;
|
| + ui::NativeTheme::ExtraParams GetNativeThemeParams() const;
|
| + ui::NativeTheme::Part GetNativeThemePart() const;
|
| + ui::NativeTheme::State GetNativeThemeState() const;
|
|
|
| ScrollBar* scroll_bar_;
|
| };
|
| @@ -86,22 +86,22 @@ ScrollBarButton::~ScrollBarButton() {
|
| }
|
|
|
| gfx::Size ScrollBarButton::GetPreferredSize() {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
| return native_theme->GetPartSize(GetNativeThemePart(),
|
| GetNativeThemeState(),
|
| GetNativeThemeParams());
|
| }
|
|
|
| void ScrollBarButton::OnPaint(gfx::Canvas* canvas) {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
| gfx::Rect bounds(GetPreferredSize());
|
| native_theme->Paint(canvas->sk_canvas(), GetNativeThemePart(),
|
| GetNativeThemeState(), bounds, GetNativeThemeParams());
|
| }
|
|
|
| -gfx::NativeTheme::ExtraParams
|
| +ui::NativeTheme::ExtraParams
|
| ScrollBarButton::GetNativeThemeParams() const {
|
| - gfx::NativeTheme::ExtraParams params;
|
| + ui::NativeTheme::ExtraParams params;
|
|
|
| switch (state_) {
|
| case CustomButton::BS_HOT:
|
| @@ -115,39 +115,39 @@ gfx::NativeTheme::ExtraParams
|
| return params;
|
| }
|
|
|
| -gfx::NativeTheme::Part
|
| +ui::NativeTheme::Part
|
| ScrollBarButton::GetNativeThemePart() const {
|
| switch (type_) {
|
| case UP:
|
| - return gfx::NativeTheme::kScrollbarUpArrow;
|
| + return ui::NativeTheme::kScrollbarUpArrow;
|
| case DOWN:
|
| - return gfx::NativeTheme::kScrollbarDownArrow;
|
| + return ui::NativeTheme::kScrollbarDownArrow;
|
| case LEFT:
|
| - return gfx::NativeTheme::kScrollbarLeftArrow;
|
| + return ui::NativeTheme::kScrollbarLeftArrow;
|
| case RIGHT:
|
| - return gfx::NativeTheme::kScrollbarRightArrow;
|
| + return ui::NativeTheme::kScrollbarRightArrow;
|
| default:
|
| - return gfx::NativeTheme::kScrollbarUpArrow;
|
| + return ui::NativeTheme::kScrollbarUpArrow;
|
| }
|
| }
|
|
|
| -gfx::NativeTheme::State
|
| +ui::NativeTheme::State
|
| ScrollBarButton::GetNativeThemeState() const {
|
| - gfx::NativeTheme::State state;
|
| + ui::NativeTheme::State state;
|
|
|
| switch (state_) {
|
| case CustomButton::BS_HOT:
|
| - state = gfx::NativeTheme::kHovered;
|
| + state = ui::NativeTheme::kHovered;
|
| break;
|
| case CustomButton::BS_PUSHED:
|
| - state = gfx::NativeTheme::kPressed;
|
| + state = ui::NativeTheme::kPressed;
|
| break;
|
| case CustomButton::BS_DISABLED:
|
| - state = gfx::NativeTheme::kDisabled;
|
| + state = ui::NativeTheme::kDisabled;
|
| break;
|
| case CustomButton::BS_NORMAL:
|
| default:
|
| - state = gfx::NativeTheme::kNormal;
|
| + state = ui::NativeTheme::kNormal;
|
| break;
|
| }
|
|
|
| @@ -168,14 +168,14 @@ ScrollBarThumb::~ScrollBarThumb() {
|
| }
|
|
|
| gfx::Size ScrollBarThumb::GetPreferredSize() {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
| return native_theme->GetPartSize(GetNativeThemePart(),
|
| GetNativeThemeState(),
|
| GetNativeThemeParams());
|
| }
|
|
|
| void ScrollBarThumb::OnPaint(gfx::Canvas* canvas) {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
|
|
| native_theme->Paint(canvas->sk_canvas(),
|
| GetNativeThemePart(),
|
| @@ -184,9 +184,9 @@ void ScrollBarThumb::OnPaint(gfx::Canvas* canvas) {
|
| GetNativeThemeParams());
|
| }
|
|
|
| -gfx::NativeTheme::ExtraParams
|
| +ui::NativeTheme::ExtraParams
|
| ScrollBarThumb::GetNativeThemeParams() const {
|
| - gfx::NativeTheme::ExtraParams params;
|
| + ui::NativeTheme::ExtraParams params;
|
|
|
| switch (GetState()) {
|
| case CustomButton::BS_HOT:
|
| @@ -200,28 +200,28 @@ gfx::NativeTheme::ExtraParams
|
| return params;
|
| }
|
|
|
| -gfx::NativeTheme::Part ScrollBarThumb::GetNativeThemePart() const {
|
| +ui::NativeTheme::Part ScrollBarThumb::GetNativeThemePart() const {
|
| if (scroll_bar_->IsHorizontal())
|
| - return gfx::NativeTheme::kScrollbarHorizontalThumb;
|
| - return gfx::NativeTheme::kScrollbarVerticalThumb;
|
| + return ui::NativeTheme::kScrollbarHorizontalThumb;
|
| + return ui::NativeTheme::kScrollbarVerticalThumb;
|
| }
|
|
|
| -gfx::NativeTheme::State ScrollBarThumb::GetNativeThemeState() const {
|
| - gfx::NativeTheme::State state;
|
| +ui::NativeTheme::State ScrollBarThumb::GetNativeThemeState() const {
|
| + ui::NativeTheme::State state;
|
|
|
| switch (GetState()) {
|
| case CustomButton::BS_HOT:
|
| - state = gfx::NativeTheme::kHovered;
|
| + state = ui::NativeTheme::kHovered;
|
| break;
|
| case CustomButton::BS_PUSHED:
|
| - state = gfx::NativeTheme::kPressed;
|
| + state = ui::NativeTheme::kPressed;
|
| break;
|
| case CustomButton::BS_DISABLED:
|
| - state = gfx::NativeTheme::kDisabled;
|
| + state = ui::NativeTheme::kDisabled;
|
| break;
|
| case CustomButton::BS_NORMAL:
|
| default:
|
| - state = gfx::NativeTheme::kNormal;
|
| + state = ui::NativeTheme::kNormal;
|
| break;
|
| }
|
|
|
| @@ -246,15 +246,15 @@ NativeScrollBarViews::NativeScrollBarViews(NativeScrollBar* scroll_bar)
|
| prev_button_ = new ScrollBarButton(this, ScrollBarButton::LEFT);
|
| next_button_ = new ScrollBarButton(this, ScrollBarButton::RIGHT);
|
|
|
| - part_ = gfx::NativeTheme::kScrollbarHorizontalTrack;
|
| + part_ = ui::NativeTheme::kScrollbarHorizontalTrack;
|
| } else {
|
| prev_button_ = new ScrollBarButton(this, ScrollBarButton::UP);
|
| next_button_ = new ScrollBarButton(this, ScrollBarButton::DOWN);
|
|
|
| - part_ = gfx::NativeTheme::kScrollbarVerticalTrack;
|
| + part_ = ui::NativeTheme::kScrollbarVerticalTrack;
|
| }
|
|
|
| - state_ = gfx::NativeTheme::kNormal;
|
| + state_ = ui::NativeTheme::kNormal;
|
|
|
| AddChildView(prev_button_);
|
| AddChildView(next_button_);
|
| @@ -285,7 +285,7 @@ void NativeScrollBarViews::Layout() {
|
| }
|
|
|
| void NativeScrollBarViews::OnPaint(gfx::Canvas* canvas) {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
| gfx::Rect bounds = GetTrackBounds();
|
|
|
| if (bounds.IsEmpty())
|
| @@ -386,20 +386,20 @@ NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
|
|
|
| // static
|
| int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
|
|
| - gfx::NativeTheme::ExtraParams button_params;
|
| + ui::NativeTheme::ExtraParams button_params;
|
| button_params.scrollbar_arrow.is_hovering = false;
|
| gfx::Size button_size = native_theme->GetPartSize(
|
| - gfx::NativeTheme::kScrollbarLeftArrow,
|
| - gfx::NativeTheme::kNormal,
|
| + ui::NativeTheme::kScrollbarLeftArrow,
|
| + ui::NativeTheme::kNormal,
|
| button_params);
|
|
|
| - gfx::NativeTheme::ExtraParams thumb_params;
|
| + ui::NativeTheme::ExtraParams thumb_params;
|
| thumb_params.scrollbar_thumb.is_hovering = false;
|
| gfx::Size track_size = native_theme->GetPartSize(
|
| - gfx::NativeTheme::kScrollbarHorizontalThumb,
|
| - gfx::NativeTheme::kNormal,
|
| + ui::NativeTheme::kScrollbarHorizontalThumb,
|
| + ui::NativeTheme::kNormal,
|
| thumb_params);
|
|
|
| return std::max(track_size.height(), button_size.height());
|
| @@ -407,20 +407,20 @@ int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
|
|
|
| // static
|
| int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
|
| - const gfx::NativeTheme* native_theme = gfx::NativeTheme::instance();
|
| + const ui::NativeTheme* native_theme = ui::NativeTheme::instance();
|
|
|
| - gfx::NativeTheme::ExtraParams button_params;
|
| + ui::NativeTheme::ExtraParams button_params;
|
| button_params.scrollbar_arrow.is_hovering = false;
|
| gfx::Size button_size = native_theme->GetPartSize(
|
| - gfx::NativeTheme::kScrollbarUpArrow,
|
| - gfx::NativeTheme::kNormal,
|
| + ui::NativeTheme::kScrollbarUpArrow,
|
| + ui::NativeTheme::kNormal,
|
| button_params);
|
|
|
| - gfx::NativeTheme::ExtraParams thumb_params;
|
| + ui::NativeTheme::ExtraParams thumb_params;
|
| thumb_params.scrollbar_thumb.is_hovering = false;
|
| gfx::Size track_size = native_theme->GetPartSize(
|
| - gfx::NativeTheme::kScrollbarVerticalThumb,
|
| - gfx::NativeTheme::kNormal,
|
| + ui::NativeTheme::kScrollbarVerticalThumb,
|
| + ui::NativeTheme::kNormal,
|
| thumb_params);
|
|
|
| return std::max(track_size.width(), button_size.width());
|
|
|