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

Unified Diff: views/focus/accelerator_handler_win.cc

Issue 8588064: views: Move bubble, events, focus and layout to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « views/focus/accelerator_handler_wayland.cc ('k') | views/focus/external_focus_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/accelerator_handler_win.cc
diff --git a/views/focus/accelerator_handler_win.cc b/views/focus/accelerator_handler_win.cc
deleted file mode 100644
index 8f2c8e815c22ae5465fb1b5f6941ca613e88b43a..0000000000000000000000000000000000000000
--- a/views/focus/accelerator_handler_win.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011 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 "views/focus/accelerator_handler.h"
-
-#include "ui/base/keycodes/keyboard_codes.h"
-#include "ui/base/keycodes/keyboard_code_conversion_win.h"
-#include "views/events/event.h"
-#include "views/focus/focus_manager.h"
-#include "views/widget/widget.h"
-
-namespace views {
-
-AcceleratorHandler::AcceleratorHandler() {
-}
-
-bool AcceleratorHandler::Dispatch(const MSG& msg) {
- bool process_message = true;
-
- if (msg.message >= WM_KEYFIRST && msg.message <= WM_KEYLAST) {
- Widget* widget = Widget::GetTopLevelWidgetForNativeView(msg.hwnd);
- FocusManager* focus_manager = widget ? widget->GetFocusManager() : NULL;
- if (focus_manager) {
- switch (msg.message) {
- case WM_KEYDOWN:
- case WM_SYSKEYDOWN: {
- KeyEvent event(msg);
- process_message = focus_manager->OnKeyEvent(event);
- if (!process_message) {
- // Record that this key is pressed so we can remember not to
- // translate and dispatch the associated WM_KEYUP.
- pressed_keys_.insert(msg.wParam);
- }
- break;
- }
- case WM_KEYUP:
- case WM_SYSKEYUP: {
- std::set<WPARAM>::iterator iter = pressed_keys_.find(msg.wParam);
- if (iter != pressed_keys_.end()) {
- // Don't translate/dispatch the KEYUP since we have eaten the
- // associated KEYDOWN.
- pressed_keys_.erase(iter);
- return true;
- }
- break;
- }
- }
- }
- }
-
- if (process_message) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-
- return true;
-}
-
-} // namespace views
« no previous file with comments | « views/focus/accelerator_handler_wayland.cc ('k') | views/focus/external_focus_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698