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

Side by Side Diff: ui/views/widget/native_widget_aura_unittest.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/native_widget_delegate.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 210
211 void clear_got_gesture_event() { 211 void clear_got_gesture_event() {
212 got_gesture_event_ = false; 212 got_gesture_event_ = false;
213 } 213 }
214 bool got_gesture_event() const { 214 bool got_gesture_event() const {
215 return got_gesture_event_; 215 return got_gesture_event_;
216 } 216 }
217 217
218 // View overrides: 218 // View overrides:
219 virtual ui::GestureStatus OnGestureEvent( 219 virtual ui::EventResult OnGestureEvent(
220 const ui::GestureEvent& event) OVERRIDE { 220 const ui::GestureEvent& event) OVERRIDE {
221 got_gesture_event_ = true; 221 got_gesture_event_ = true;
222 return consume_gesture_event_ ? ui::GESTURE_STATUS_CONSUMED : 222 return consume_gesture_event_ ? ui::ER_CONSUMED :
223 ui::GESTURE_STATUS_UNKNOWN; 223 ui::ER_UNHANDLED;
224 } 224 }
225 225
226 private: 226 private:
227 // Was OnGestureEvent() invoked? 227 // Was OnGestureEvent() invoked?
228 bool got_gesture_event_; 228 bool got_gesture_event_;
229 229
230 // Dictates what OnGestureEvent() returns. 230 // Dictates what OnGestureEvent() returns.
231 bool consume_gesture_event_; 231 bool consume_gesture_event_;
232 232
233 DISALLOW_COPY_AND_ASSIGN(GestureTrackingView); 233 DISALLOW_COPY_AND_ASSIGN(GestureTrackingView);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 parent->GetNativeWindow()->GetEventHandlerForPoint( 367 parent->GetNativeWindow()->GetEventHandlerForPoint(
368 gfx::Point(20, 20))); 368 gfx::Point(20, 20)));
369 369
370 // Work around for bug in NativeWidgetAura. 370 // Work around for bug in NativeWidgetAura.
371 // TODO: fix bug and remove this. 371 // TODO: fix bug and remove this.
372 parent->Close(); 372 parent->Close();
373 } 373 }
374 374
375 } // namespace 375 } // namespace
376 } // namespace views 376 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/native_widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698