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

Side by Side Diff: chrome/renderer/mock_keyboard_driver_win.h

Issue 115849: Fixed a bug with the unit_tests, which caused it to leave hebrew enabled... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « AUTHORS ('k') | chrome/renderer/mock_keyboard_driver_win.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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_ 5 #ifndef CHROME_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_
6 #define CHROME_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_ 6 #define CHROME_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <string> 10 #include <string>
11 11 #include <vector>
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 13
14 // Implements the platform-dependent part of a pseudo keyboard device for 14 // Implements the platform-dependent part of a pseudo keyboard device for
15 // Windows. 15 // Windows.
16 class MockKeyboardDriverWin { 16 class MockKeyboardDriverWin {
17 public: 17 public:
18 MockKeyboardDriverWin(); 18 MockKeyboardDriverWin();
19 ~MockKeyboardDriverWin(); 19 ~MockKeyboardDriverWin();
20 20
21 bool SetLayout(int layout); 21 bool SetLayout(int layout);
22 bool SetModifiers(int modifiers); 22 bool SetModifiers(int modifiers);
23 int GetCharacters(int key_code, std::wstring* code); 23 int GetCharacters(int key_code, std::wstring* code);
24 24
25 private: 25 private:
26 void MaybeUnloadActiveLayout();
27
28 // The list of keyboard drivers that are installed on this machine.
29 std::vector<HKL> orig_keyboard_layouts_list_;
30 // The active keyboard driver at the time the Ctor was called.
26 HKL original_keyboard_layout_; 31 HKL original_keyboard_layout_;
32 // The currently active driver.
33 HKL active_keyboard_layout_;
27 BYTE original_keyboard_states_[256]; 34 BYTE original_keyboard_states_[256];
28 35
29 HKL keyboard_handle_;
30 BYTE keyboard_states_[256]; 36 BYTE keyboard_states_[256];
31 37
32 DISALLOW_COPY_AND_ASSIGN(MockKeyboardDriverWin); 38 DISALLOW_COPY_AND_ASSIGN(MockKeyboardDriverWin);
33 }; 39 };
34 40
35 #endif // CHROME_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_ 41 #endif // CHROME_RENDERER_MOCK_KEYBOARD_DRIVER_WIN_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | chrome/renderer/mock_keyboard_driver_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698