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

Side by Side Diff: sky/engine/core/page/EventWithHitTestResults.h

Issue 870413002: Remove PlatformEvent (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
(Empty)
1 /*
2 Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2006 Apple Computer, Inc.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */
20
21 #ifndef SKY_ENGINE_CORE_PAGE_EVENTWITHHITTESTRESULTS_H_
22 #define SKY_ENGINE_CORE_PAGE_EVENTWITHHITTESTRESULTS_H_
23
24 #include "sky/engine/core/rendering/HitTestResult.h"
25 #include "sky/engine/platform/PlatformEvent.h"
26
27 namespace blink {
28
29 class Scrollbar;
30
31 template <typename EventType>
32 class EventWithHitTestResults {
33 STACK_ALLOCATED();
34
35 public:
36 EventWithHitTestResults(const EventType& event, const HitTestResult& hitTest Result)
37 : m_event(event)
38 , m_hitTestResult(hitTestResult)
39 {
40 }
41
42 const EventType& event() const { return m_event; }
43 const HitTestResult& hitTestResult() const { return m_hitTestResult; }
44 LayoutPoint localPoint() const { return m_hitTestResult.localPoint(); }
45 Scrollbar* scrollbar() const { return m_hitTestResult.scrollbar(); }
46 bool isOverLink() const { return m_hitTestResult.isOverLink(); }
47 bool isOverWidget() const { return m_hitTestResult.isOverWidget(); }
48 Node* targetNode() const { return m_hitTestResult.targetNode(); }
49
50 private:
51 EventType m_event;
52 HitTestResult m_hitTestResult;
53 };
54
55 } // namespace blink
56
57 #endif // SKY_ENGINE_CORE_PAGE_EVENTWITHHITTESTRESULTS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/page/EventHandler.cpp ('k') | sky/engine/core/rendering/RenderLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698