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

Unified Diff: chrome/renderer/mock_keyboard.cc

Issue 8230034: Split most of RenderViewTest and associated classes into content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build breaks. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/mock_keyboard.h ('k') | chrome/renderer/mock_keyboard_driver_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/mock_keyboard.cc
diff --git a/chrome/renderer/mock_keyboard.cc b/chrome/renderer/mock_keyboard.cc
deleted file mode 100644
index b18f3f67a030ea2674ab8048275c3200c223fa76..0000000000000000000000000000000000000000
--- a/chrome/renderer/mock_keyboard.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/renderer/mock_keyboard.h"
-
-#include "base/logging.h"
-
-MockKeyboard::MockKeyboard()
- : keyboard_layout_(LAYOUT_NULL),
- keyboard_modifiers_(INVALID) {
-}
-
-MockKeyboard::~MockKeyboard() {
-}
-
-int MockKeyboard::GetCharacters(Layout layout,
- int key_code,
- Modifiers modifiers,
- std::wstring* output) {
-#if defined(OS_WIN)
- CHECK(output);
- // Change the keyboard layout only when we have to because it takes a lot of
- // time to load a keyboard-layout driver.
- // When we change the layout, we reset the modifier status to force updating
- // the keyboard status.
- if (layout != keyboard_layout_) {
- if (!driver_.SetLayout(layout))
- return -1;
- keyboard_layout_ = layout;
- keyboard_modifiers_ = INVALID;
- }
-
- // Update the keyboard states.
- if (modifiers != keyboard_modifiers_) {
- if (!driver_.SetModifiers(modifiers))
- return -1;
- keyboard_modifiers_ = modifiers;
- }
-
- // Retrieve Unicode characters associate with the key code.
- return driver_.GetCharacters(key_code, output);
-#else
- NOTIMPLEMENTED();
- return -1;
-#endif
-}
« no previous file with comments | « chrome/renderer/mock_keyboard.h ('k') | chrome/renderer/mock_keyboard_driver_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698