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

Side by Side Diff: ui/aura/test/event_generator.cc

Issue 13594009: Correct scale for touch radius & scroll offset ordinal (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tests added 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
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/aura/test/event_generator.h" 5 #include "ui/aura/test/event_generator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 : KeyEvent(native_event, is_char) { 54 : KeyEvent(native_event, is_char) {
55 set_flags(flags); 55 set_flags(flags);
56 } 56 }
57 }; 57 };
58 58
59 class TestTouchEvent : public ui::TouchEvent { 59 class TestTouchEvent : public ui::TouchEvent {
60 public: 60 public:
61 TestTouchEvent(ui::EventType type, 61 TestTouchEvent(ui::EventType type,
62 const gfx::Point& root_location, 62 const gfx::Point& root_location,
63 int flags) 63 int flags)
64 : TouchEvent(type, root_location, 0, ui::EventTimeForNow()) { 64 : TouchEvent(type, root_location, flags, 0, ui::EventTimeForNow(),
65 set_flags(flags); 65 1.0f, 1.0f, 1.0f, 1.0f) {
66 } 66 }
67 67
68 private: 68 private:
69 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent); 69 DISALLOW_COPY_AND_ASSIGN(TestTouchEvent);
70 }; 70 };
71 71
72 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON; 72 const int kAllButtonMask = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON;
73 73
74 } // namespace 74 } // namespace
75 75
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 base::MessageLoopProxy::current()->PostTask( 535 base::MessageLoopProxy::current()->PostTask(
536 FROM_HERE, 536 FROM_HERE,
537 base::Bind(&EventGenerator::DispatchNextPendingEvent, 537 base::Bind(&EventGenerator::DispatchNextPendingEvent,
538 base::Unretained(this))); 538 base::Unretained(this)));
539 } 539 }
540 } 540 }
541 541
542 542
543 } // namespace test 543 } // namespace test
544 } // namespace aura 544 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698