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

Side by Side Diff: Source/core/platform/chromium/FramelessScrollView.h

Issue 14280004: Revert removal of events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define FramelessScrollView_h 32 #define FramelessScrollView_h
33 33
34 #include "ScrollView.h" 34 #include "ScrollView.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class FramelessScrollViewClient; 38 class FramelessScrollViewClient;
39 class PlatformGestureEvent; 39 class PlatformGestureEvent;
40 class PlatformKeyboardEvent; 40 class PlatformKeyboardEvent;
41 class PlatformMouseEvent; 41 class PlatformMouseEvent;
42 #if ENABLE(TOUCH_EVENTS)
42 class PlatformTouchEvent; 43 class PlatformTouchEvent;
44 #endif
43 class PlatformWheelEvent; 45 class PlatformWheelEvent;
44 46
45 // A FramelessScrollView is a ScrollView that can be used to render custom 47 // A FramelessScrollView is a ScrollView that can be used to render custom
46 // content, which does not have an associated Frame. 48 // content, which does not have an associated Frame.
47 // 49 //
48 // NOTE: It may be better to just develop a custom subclass of Widget that 50 // NOTE: It may be better to just develop a custom subclass of Widget that
49 // can have scroll bars for this instead of trying to reuse ScrollView. 51 // can have scroll bars for this instead of trying to reuse ScrollView.
50 // 52 //
51 class FramelessScrollView : public ScrollView { 53 class FramelessScrollView : public ScrollView {
52 public: 54 public:
53 FramelessScrollView() : m_client(0) {} 55 FramelessScrollView() : m_client(0) {}
54 ~FramelessScrollView(); 56 ~FramelessScrollView();
55 57
56 FramelessScrollViewClient* client() const { return m_client; } 58 FramelessScrollViewClient* client() const { return m_client; }
57 void setClient(FramelessScrollViewClient* client) { m_client = client; } 59 void setClient(FramelessScrollViewClient* client) { m_client = client; }
58 60
59 // Event handlers that subclasses must implement. 61 // Event handlers that subclasses must implement.
60 virtual bool handleMouseDownEvent(const PlatformMouseEvent&) = 0; 62 virtual bool handleMouseDownEvent(const PlatformMouseEvent&) = 0;
61 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&) = 0; 63 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&) = 0;
62 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&) = 0; 64 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&) = 0;
63 virtual bool handleWheelEvent(const PlatformWheelEvent&) = 0; 65 virtual bool handleWheelEvent(const PlatformWheelEvent&) = 0;
64 virtual bool handleKeyEvent(const PlatformKeyboardEvent&) = 0; 66 virtual bool handleKeyEvent(const PlatformKeyboardEvent&) = 0;
67 #if ENABLE(TOUCH_EVENTS)
65 virtual bool handleTouchEvent(const PlatformTouchEvent&) = 0; 68 virtual bool handleTouchEvent(const PlatformTouchEvent&) = 0;
69 #endif
66 virtual bool handleGestureEvent(const PlatformGestureEvent&) = 0; 70 virtual bool handleGestureEvent(const PlatformGestureEvent&) = 0;
67 71
68 // ScrollableArea public methods: 72 // ScrollableArea public methods:
69 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRID E; 73 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRID E;
70 virtual bool isActive() const OVERRIDE; 74 virtual bool isActive() const OVERRIDE;
71 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE; 75 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE;
72 virtual bool scrollbarsCanBeActive() const OVERRIDE; 76 virtual bool scrollbarsCanBeActive() const OVERRIDE;
73 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; 77 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
74 78
75 // Widget public methods: 79 // Widget public methods:
76 virtual void invalidateRect(const IntRect&); 80 virtual void invalidateRect(const IntRect&);
77 81
78 // ScrollView public methods: 82 // ScrollView public methods:
79 virtual HostWindow* hostWindow() const; 83 virtual HostWindow* hostWindow() const;
80 virtual IntRect windowClipRect(bool clipToContents = true) const; 84 virtual IntRect windowClipRect(bool clipToContents = true) const;
81 85
82 protected: 86 protected:
83 // ScrollView protected methods: 87 // ScrollView protected methods:
84 virtual void paintContents(GraphicsContext*, const IntRect&); 88 virtual void paintContents(GraphicsContext*, const IntRect&);
85 virtual void contentsResized(); 89 virtual void contentsResized();
86 virtual void visibleContentsResized(); 90 virtual void visibleContentsResized();
87 91
88 private: 92 private:
89 FramelessScrollViewClient* m_client; 93 FramelessScrollViewClient* m_client;
90 }; 94 };
91 95
92 } // namespace WebCore 96 } // namespace WebCore
93 97
94 #endif 98 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/PlatformTouchPoint.h ('k') | Source/core/platform/chromium/PopupContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698