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

Side by Side Diff: chrome/test/chromedriver/key_converter.h

Issue 16753002: Use a direct include of strings headers in chrome/test/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « chrome/test/chromedriver/element_util.cc ('k') | chrome/test/chromedriver/key_converter.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_
6 #define CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_ 6 #define CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/string16.h" 11 #include "base/strings/string16.h"
12 #include "ui/base/keycodes/keyboard_codes.h" 12 #include "ui/base/keycodes/keyboard_codes.h"
13 13
14 struct KeyEvent; 14 struct KeyEvent;
15 class Status; 15 class Status;
16 16
17 // Convenience functions for creating |KeyEvent|s. Used by unittests. 17 // Convenience functions for creating |KeyEvent|s. Used by unittests.
18 KeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers); 18 KeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers);
19 KeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers); 19 KeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers);
20 KeyEvent CreateCharEvent(const std::string& unmodified_text, 20 KeyEvent CreateCharEvent(const std::string& unmodified_text,
21 const std::string& modified_text, 21 const std::string& modified_text,
22 int modifiers); 22 int modifiers);
23 23
24 // Converts keys into appropriate |KeyEvent|s. This will do a best effort 24 // Converts keys into appropriate |KeyEvent|s. This will do a best effort
25 // conversion. However, if the input is invalid it will return a status with 25 // conversion. However, if the input is invalid it will return a status with
26 // an error message. If |release_modifiers| is true, all modifiers would be 26 // an error message. If |release_modifiers| is true, all modifiers would be
27 // depressed. |modifiers| acts both an input and an output, however, only when 27 // depressed. |modifiers| acts both an input and an output, however, only when
28 // the conversion process is successful will |modifiers| be changed. 28 // the conversion process is successful will |modifiers| be changed.
29 Status ConvertKeysToKeyEvents(const string16& keys, 29 Status ConvertKeysToKeyEvents(const string16& keys,
30 bool release_modifiers, 30 bool release_modifiers,
31 int* modifiers, 31 int* modifiers,
32 std::list<KeyEvent>* key_events); 32 std::list<KeyEvent>* key_events);
33 33
34 #endif // CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_ 34 #endif // CHROME_TEST_CHROMEDRIVER_KEY_CONVERTER_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_util.cc ('k') | chrome/test/chromedriver/key_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698