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

Side by Side Diff: ui/aura/test/test_window_delegate.h

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/aura/test/test_event_handler.cc ('k') | ui/aura/test/test_window_delegate.cc » ('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 #ifndef UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 5 #ifndef UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 DISALLOW_COPY_AND_ASSIGN(MaskedWindowDelegate); 104 DISALLOW_COPY_AND_ASSIGN(MaskedWindowDelegate);
105 }; 105 };
106 106
107 // Keeps track of mouse/key events. 107 // Keeps track of mouse/key events.
108 class EventCountDelegate : public TestWindowDelegate { 108 class EventCountDelegate : public TestWindowDelegate {
109 public: 109 public:
110 EventCountDelegate(); 110 EventCountDelegate();
111 111
112 // Overridden from TestWindowDelegate: 112 // Overridden from TestWindowDelegate:
113 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; 113 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
114 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; 114 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
115 115
116 // Returns the counts of mouse motion events in the 116 // Returns the counts of mouse motion events in the
117 // form of "<enter> <move> <leave>". 117 // form of "<enter> <move> <leave>".
118 std::string GetMouseMotionCountsAndReset(); 118 std::string GetMouseMotionCountsAndReset();
119 119
120 // Returns the counts of mouse button events in the 120 // Returns the counts of mouse button events in the
121 // form of "<press> <release>". 121 // form of "<press> <release>".
122 std::string GetMouseButtonCountsAndReset(); 122 std::string GetMouseButtonCountsAndReset();
123 123
124 // Returns the counts of key events in the form of 124 // Returns the counts of key events in the form of
125 // "<press> <release>". 125 // "<press> <release>".
126 std::string GetKeyCountsAndReset(); 126 std::string GetKeyCountsAndReset();
127 127
128 private: 128 private:
129 int mouse_enter_count_; 129 int mouse_enter_count_;
130 int mouse_move_count_; 130 int mouse_move_count_;
131 int mouse_leave_count_; 131 int mouse_leave_count_;
132 int mouse_press_count_; 132 int mouse_press_count_;
133 int mouse_release_count_; 133 int mouse_release_count_;
134 int key_press_count_; 134 int key_press_count_;
135 int key_release_count_; 135 int key_release_count_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate); 137 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate);
138 }; 138 };
139 139
140 } // namespace test 140 } // namespace test
141 } // namespace aura 141 } // namespace aura
142 142
143 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ 143 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/aura/test/test_event_handler.cc ('k') | ui/aura/test/test_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698