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

Side by Side Diff: chrome/test/webdriver/keymap.h

Issue 3064012: Base implementation of WebDriver for Chrome. This checkin includes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/webdriver/error_codes.h ('k') | chrome/test/webdriver/keymap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_WEBDRIVER_KEYMAP_H_
6 #define CHROME_TEST_WEBDRIVER_KEYMAP_H_
7
8 #include <map>
9
10 #include "base/keyboard_codes.h"
11 #include "chrome/test/automation/window_proxy.h"
12
13 namespace webdriver {
14
15 // Maps the key space used by WebDriver to Chrome for Linux/Mac/Windows.
16 class KeyMap {
17 public:
18 KeyMap();
19 base::KeyboardCode Get(const wchar_t& key) const;
20
21 bool Press(const scoped_refptr<WindowProxy>& window,
22 const base::KeyboardCode key_code,
23 const wchar_t& key);
24
25 // Sets the Shift, Alt, Cntl, and Cmd keys to not pressed
26 void ClearModifiers();
27
28 private:
29 bool shift_;
30 bool alt_;
31 bool control_;
32 bool command_;
33 std::map<wchar_t, base::KeyboardCode> keys_;
34 std::map<wchar_t, base::KeyboardCode> shifted_keys_;
35 DISALLOW_COPY_AND_ASSIGN(KeyMap);
36 };
37 } // namespace webdriver
38 #endif // CHROME_TEST_WEBDRIVER_KEYMAP_H_
39
OLDNEW
« no previous file with comments | « chrome/test/webdriver/error_codes.h ('k') | chrome/test/webdriver/keymap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698