OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/shell/renderer/test_runner/event_sender.h" | 5 #include "content/shell/renderer/test_runner/event_sender.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "content/public/common/page_zoom.h" | 10 #include "content/public/common/page_zoom.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return WebInputEvent::MetaKey; | 86 return WebInputEvent::MetaKey; |
87 #endif | 87 #endif |
88 } else if (!strcmp(characters, "autoRepeat")) { | 88 } else if (!strcmp(characters, "autoRepeat")) { |
89 return WebInputEvent::IsAutoRepeat; | 89 return WebInputEvent::IsAutoRepeat; |
90 } else if (!strcmp(characters, "copyKey")) { | 90 } else if (!strcmp(characters, "copyKey")) { |
91 #ifdef __APPLE__ | 91 #ifdef __APPLE__ |
92 return WebInputEvent::AltKey; | 92 return WebInputEvent::AltKey; |
93 #else | 93 #else |
94 return WebInputEvent::ControlKey; | 94 return WebInputEvent::ControlKey; |
95 #endif | 95 #endif |
| 96 } else if (!strcmp(characters, "leftButton")) { |
| 97 return WebInputEvent::LeftButtonDown; |
| 98 } else if (!strcmp(characters, "middleButton")) { |
| 99 return WebInputEvent::MiddleButtonDown; |
| 100 } else if (!strcmp(characters, "rightButton")) { |
| 101 return WebInputEvent::RightButtonDown; |
96 } | 102 } |
97 | 103 |
98 return 0; | 104 return 0; |
99 } | 105 } |
100 | 106 |
101 int GetKeyModifiers(const std::vector<std::string>& modifier_names) { | 107 int GetKeyModifiers(const std::vector<std::string>& modifier_names) { |
102 int modifiers = 0; | 108 int modifiers = 0; |
103 for (std::vector<std::string>::const_iterator it = modifier_names.begin(); | 109 for (std::vector<std::string>::const_iterator it = modifier_names.begin(); |
104 it != modifier_names.end(); ++it) { | 110 it != modifier_names.end(); ++it) { |
105 modifiers |= GetKeyModifier(*it); | 111 modifiers |= GetKeyModifier(*it); |
(...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2296 } | 2302 } |
2297 default: | 2303 default: |
2298 NOTREACHED(); | 2304 NOTREACHED(); |
2299 } | 2305 } |
2300 } | 2306 } |
2301 | 2307 |
2302 replaying_saved_events_ = false; | 2308 replaying_saved_events_ = false; |
2303 } | 2309 } |
2304 | 2310 |
2305 } // namespace content | 2311 } // namespace content |
OLD | NEW |