OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/util/drag_handle.h" | 5 #include "athena/util/drag_handle.h" |
6 | 6 |
7 #include "ui/views/background.h" | 7 #include "ui/views/background.h" |
8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
9 | 9 |
10 namespace athena { | 10 namespace athena { |
(...skipping 10 matching lines...) Expand all Loading... |
21 int preferred_width, | 21 int preferred_width, |
22 int preferred_height); | 22 int preferred_height); |
23 virtual ~DragHandleView(); | 23 virtual ~DragHandleView(); |
24 | 24 |
25 private: | 25 private: |
26 void SetColor(SkColor color); | 26 void SetColor(SkColor color); |
27 | 27 |
28 void SetIsScrolling(bool scrolling); | 28 void SetIsScrolling(bool scrolling); |
29 | 29 |
30 // views::View: | 30 // views::View: |
31 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 31 virtual gfx::Size GetPreferredSize() const override; |
32 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 32 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
33 | 33 |
34 bool scroll_in_progress_; | 34 bool scroll_in_progress_; |
35 DragHandleScrollDelegate* delegate_; | 35 DragHandleScrollDelegate* delegate_; |
36 DragHandleScrollDirection scroll_direction_; | 36 DragHandleScrollDirection scroll_direction_; |
37 SkColor color_; | 37 SkColor color_; |
38 float scroll_start_location_; | 38 float scroll_start_location_; |
39 const int preferred_width_; | 39 const int preferred_width_; |
40 const int preferred_height_; | 40 const int preferred_height_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(DragHandleView); | 42 DISALLOW_COPY_AND_ASSIGN(DragHandleView); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 views::View* CreateDragHandleView(DragHandleScrollDirection scroll_direction, | 133 views::View* CreateDragHandleView(DragHandleScrollDirection scroll_direction, |
134 DragHandleScrollDelegate* delegate, | 134 DragHandleScrollDelegate* delegate, |
135 int preferred_width, | 135 int preferred_width, |
136 int preferred_height) { | 136 int preferred_height) { |
137 views::View* view = new DragHandleView( | 137 views::View* view = new DragHandleView( |
138 scroll_direction, delegate, preferred_width, preferred_height); | 138 scroll_direction, delegate, preferred_width, preferred_height); |
139 return view; | 139 return view; |
140 } | 140 } |
141 | 141 |
142 } // namespace athena | 142 } // namespace athena |
OLD | NEW |