Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: ui/views/controls/scrollbar/base_scroll_bar_thumb.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/size.h" 9 #include "ui/gfx/size.h"
10 #include "ui/views/controls/button/custom_button.h" 10 #include "ui/views/controls/button/custom_button.h"
11 #include "ui/views/controls/scrollbar/scroll_bar.h" 11 #include "ui/views/controls/scrollbar/scroll_bar.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Canvas; 15 class CanvasSkia;
16 } 16 }
17 17
18 namespace views { 18 namespace views {
19 19
20 class BaseScrollBar; 20 class BaseScrollBar;
21 21
22 /////////////////////////////////////////////////////////////////////////////// 22 ///////////////////////////////////////////////////////////////////////////////
23 // 23 //
24 // BaseScrollBarThumb 24 // BaseScrollBarThumb
25 // 25 //
(...skipping 16 matching lines...) Expand all
42 void SetPosition(int position); 42 void SetPosition(int position);
43 43
44 // Gets the position of the thumb on the x or y axis. 44 // Gets the position of the thumb on the x or y axis.
45 int GetPosition() const; 45 int GetPosition() const;
46 46
47 // View overrides: 47 // View overrides:
48 virtual gfx::Size GetPreferredSize() OVERRIDE = 0; 48 virtual gfx::Size GetPreferredSize() OVERRIDE = 0;
49 49
50 protected: 50 protected:
51 // View overrides: 51 // View overrides:
52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0; 52 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE = 0;
53 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; 53 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE;
54 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; 54 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE;
55 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; 55 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
56 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; 56 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE;
57 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; 57 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
58 virtual void OnMouseCaptureLost() OVERRIDE; 58 virtual void OnMouseCaptureLost() OVERRIDE;
59 59
60 CustomButton::ButtonState GetState() const; 60 CustomButton::ButtonState GetState() const;
61 // Update our state and schedule a repaint when the mouse moves over us. 61 // Update our state and schedule a repaint when the mouse moves over us.
62 void SetState(CustomButton::ButtonState state); 62 void SetState(CustomButton::ButtonState state);
(...skipping 10 matching lines...) Expand all
73 73
74 // The current state of the thumb button. 74 // The current state of the thumb button.
75 CustomButton::ButtonState state_; 75 CustomButton::ButtonState state_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(BaseScrollBarThumb); 77 DISALLOW_COPY_AND_ASSIGN(BaseScrollBarThumb);
78 }; 78 };
79 79
80 } // namespace views 80 } // namespace views
81 81
82 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_ 82 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_THUMB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698