| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h" | 5 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkColor.h" | 7 #include "third_party/skia/include/core/SkColor.h" |
| 8 #include "third_party/skia/include/core/SkXfermode.h" | 8 #include "third_party/skia/include/core/SkXfermode.h" |
| 9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const int kThumbDefaultAlpha = 64; | 23 const int kThumbDefaultAlpha = 64; |
| 24 | 24 |
| 25 class OverlayScrollBarThumb : public BaseScrollBarThumb, | 25 class OverlayScrollBarThumb : public BaseScrollBarThumb, |
| 26 public gfx::AnimationDelegate { | 26 public gfx::AnimationDelegate { |
| 27 public: | 27 public: |
| 28 explicit OverlayScrollBarThumb(BaseScrollBar* scroll_bar); | 28 explicit OverlayScrollBarThumb(BaseScrollBar* scroll_bar); |
| 29 virtual ~OverlayScrollBarThumb(); | 29 virtual ~OverlayScrollBarThumb(); |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 // View overrides: | 32 // View overrides: |
| 33 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 33 virtual gfx::Size GetPreferredSize() const override; |
| 34 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 34 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 35 | 35 |
| 36 // gfx::AnimationDelegate overrides: | 36 // gfx::AnimationDelegate overrides: |
| 37 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 37 virtual void AnimationProgressed(const gfx::Animation* animation) override; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 double animation_opacity_; | 40 double animation_opacity_; |
| 41 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBarThumb); | 41 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBarThumb); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 OverlayScrollBarThumb::OverlayScrollBarThumb(BaseScrollBar* scroll_bar) | 44 OverlayScrollBarThumb::OverlayScrollBarThumb(BaseScrollBar* scroll_bar) |
| 45 : BaseScrollBarThumb(scroll_bar), | 45 : BaseScrollBarThumb(scroll_bar), |
| 46 animation_opacity_(0.0) { | 46 animation_opacity_(0.0) { |
| 47 // This is necessary, otherwise the thumb will be rendered below the views if | 47 // This is necessary, otherwise the thumb will be rendered below the views if |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 thumb_bounds.set_y(thumb->y()); | 152 thumb_bounds.set_y(thumb->y()); |
| 153 thumb_bounds.set_height(thumb->height()); | 153 thumb_bounds.set_height(thumb->height()); |
| 154 } | 154 } |
| 155 thumb->SetBoundsRect(thumb_bounds); | 155 thumb->SetBoundsRect(thumb_bounds); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void OverlayScrollBar::OnPaint(gfx::Canvas* canvas) { | 158 void OverlayScrollBar::OnPaint(gfx::Canvas* canvas) { |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace views | 161 } // namespace views |
| OLD | NEW |