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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.h

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "platform/heap/Handle.h" 32 #include "platform/heap/Handle.h"
33 #include "platform/scroll/ScrollTypes.h" 33 #include "platform/scroll/ScrollTypes.h"
34 #include "platform/scroll/ScrollbarThemeClient.h" 34 #include "platform/scroll/ScrollbarThemeClient.h"
35 #include "wtf/MathExtras.h" 35 #include "wtf/MathExtras.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class GraphicsContext; 39 class GraphicsContext;
40 class HostWindow; 40 class HostWindow;
41 class IntRect; 41 class IntRect;
42 class PlatformMouseEvent;
43 class ScrollableArea; 42 class ScrollableArea;
44 class ScrollbarTheme; 43 class ScrollbarTheme;
45 class WebGestureEvent; 44 class WebGestureEvent;
45 class WebMouseEvent;
46 46
47 class PLATFORM_EXPORT Scrollbar : public Widget, 47 class PLATFORM_EXPORT Scrollbar : public Widget,
48 public ScrollbarThemeClient, 48 public ScrollbarThemeClient,
49 public DisplayItemClient { 49 public DisplayItemClient {
50 public: 50 public:
51 static Scrollbar* create(ScrollableArea* scrollableArea, 51 static Scrollbar* create(ScrollableArea* scrollableArea,
52 ScrollbarOrientation orientation, 52 ScrollbarOrientation orientation,
53 ScrollbarControlSize size, 53 ScrollbarControlSize size,
54 HostWindow* hostWindow) { 54 HostWindow* hostWindow) {
55 return new Scrollbar(scrollableArea, orientation, size, hostWindow); 55 return new Scrollbar(scrollableArea, orientation, size, hostWindow);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Return if the gesture event was handled. |shouldUpdateCapture| 139 // Return if the gesture event was handled. |shouldUpdateCapture|
140 // will be set to true if the handler should update the capture 140 // will be set to true if the handler should update the capture
141 // state for this scrollbar. 141 // state for this scrollbar.
142 bool gestureEvent(const WebGestureEvent&, bool* shouldUpdateCapture); 142 bool gestureEvent(const WebGestureEvent&, bool* shouldUpdateCapture);
143 143
144 // These methods are used for platform scrollbars to give :hover feedback. 144 // These methods are used for platform scrollbars to give :hover feedback.
145 // They will not get called when the mouse went down in a scrollbar, since it 145 // They will not get called when the mouse went down in a scrollbar, since it
146 // is assumed the scrollbar will start 146 // is assumed the scrollbar will start
147 // grabbing all events in that case anyway. 147 // grabbing all events in that case anyway.
148 void mouseMoved(const PlatformMouseEvent&); 148 void mouseMoved(const WebMouseEvent&);
149 void mouseEntered(); 149 void mouseEntered();
150 void mouseExited(); 150 void mouseExited();
151 151
152 // Used by some platform scrollbars to know when they've been released from 152 // Used by some platform scrollbars to know when they've been released from
153 // capture. 153 // capture.
154 void mouseUp(const PlatformMouseEvent&); 154 void mouseUp(const WebMouseEvent&);
155 void mouseDown(const PlatformMouseEvent&); 155 void mouseDown(const WebMouseEvent&);
156 156
157 ScrollbarTheme& theme() const { return m_theme; } 157 ScrollbarTheme& theme() const { return m_theme; }
158 158
159 IntRect convertToContainingWidget(const IntRect&) const override; 159 IntRect convertToContainingWidget(const IntRect&) const override;
160 IntRect convertFromContainingWidget(const IntRect&) const override; 160 IntRect convertFromContainingWidget(const IntRect&) const override;
161 161
162 IntPoint convertToContainingWidget(const IntPoint&) const override; 162 IntPoint convertToContainingWidget(const IntPoint&) const override;
163 IntPoint convertFromContainingWidget(const IntPoint&) const override; 163 IntPoint convertFromContainingWidget(const IntPoint&) const override;
164 164
165 void moveThumb(int pos, bool draggingDocument = false); 165 void moveThumb(int pos, bool draggingDocument = false);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 DEFINE_TYPE_CASTS(Scrollbar, 260 DEFINE_TYPE_CASTS(Scrollbar,
261 Widget, 261 Widget,
262 widget, 262 widget,
263 widget->isScrollbar(), 263 widget->isScrollbar(),
264 widget.isScrollbar()); 264 widget.isScrollbar());
265 265
266 } // namespace blink 266 } // namespace blink
267 267
268 #endif // Scrollbar_h 268 #endif // Scrollbar_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/WebMouseEvent.cpp ('k') | third_party/WebKit/Source/platform/scroll/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698