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

Side by Side Diff: sky/engine/core/events/TouchEvent.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/events/TouchEvent.h ('k') | sky/engine/core/events/TouchEventContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 copyright 10 * * Redistributions in binary form must reproduce the above copyright
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 UIEventWithKeyState::preventDefault(); 94 UIEventWithKeyState::preventDefault();
95 95
96 // A common developer error is to wait too long before attempting to stop 96 // A common developer error is to wait too long before attempting to stop
97 // scrolling by consuming a touchmove event. Generate a warning if this 97 // scrolling by consuming a touchmove event. Generate a warning if this
98 // event is uncancelable. 98 // event is uncancelable.
99 if (!cancelable() && view() && view()->frame()) { 99 if (!cancelable() && view() && view()->frame()) {
100 view()->frame()->console().addMessage(ConsoleMessage::create(JSMessageSo urce, WarningMessageLevel, 100 view()->frame()->console().addMessage(ConsoleMessage::create(JSMessageSo urce, WarningMessageLevel,
101 "Ignored attempt to cancel a " + type() + " event with cancelable=fa lse, for example because scrolling is in progress and cannot be interrupted.")); 101 "Ignored attempt to cancel a " + type() + " event with cancelable=fa lse, for example because scrolling is in progress and cannot be interrupted."));
102 } 102 }
103 } 103 }
104 void TouchEvent::trace(Visitor* visitor)
105 {
106 visitor->trace(m_touches);
107 visitor->trace(m_targetTouches);
108 visitor->trace(m_changedTouches);
109 UIEventWithKeyState::trace(visitor);
110 }
111 104
112 PassRefPtr<TouchEventDispatchMediator> TouchEventDispatchMediator::create(PassRe fPtr<TouchEvent> touchEvent) 105 PassRefPtr<TouchEventDispatchMediator> TouchEventDispatchMediator::create(PassRe fPtr<TouchEvent> touchEvent)
113 { 106 {
114 return adoptRef(new TouchEventDispatchMediator(touchEvent)); 107 return adoptRef(new TouchEventDispatchMediator(touchEvent));
115 } 108 }
116 109
117 TouchEventDispatchMediator::TouchEventDispatchMediator(PassRefPtr<TouchEvent> to uchEvent) 110 TouchEventDispatchMediator::TouchEventDispatchMediator(PassRefPtr<TouchEvent> to uchEvent)
118 : EventDispatchMediator(touchEvent) 111 : EventDispatchMediator(touchEvent)
119 { 112 {
120 } 113 }
121 114
122 TouchEvent* TouchEventDispatchMediator::event() const 115 TouchEvent* TouchEventDispatchMediator::event() const
123 { 116 {
124 return toTouchEvent(EventDispatchMediator::event()); 117 return toTouchEvent(EventDispatchMediator::event());
125 } 118 }
126 119
127 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 120 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
128 { 121 {
129 event()->eventPath().adjustForTouchEvent(dispatcher->node(), *event()); 122 event()->eventPath().adjustForTouchEvent(dispatcher->node(), *event());
130 return dispatcher->dispatch(); 123 return dispatcher->dispatch();
131 } 124 }
132 125
133 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/events/TouchEvent.h ('k') | sky/engine/core/events/TouchEventContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698