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

Unified Diff: views/widget/accelerator_handler.cc

Issue 159046: Implementing accelerators for Linux toolkit_views (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « views/widget/accelerator_handler.h ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/accelerator_handler.cc
===================================================================
--- views/widget/accelerator_handler.cc (revision 22100)
+++ views/widget/accelerator_handler.cc (working copy)
@@ -1,41 +0,0 @@
-// Copyright (c) 2006-2008 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/widget/accelerator_handler.h"
-
-#include "views/focus/focus_manager.h"
-
-namespace views {
-
-AcceleratorHandler::AcceleratorHandler() {
-}
-
-bool AcceleratorHandler::Dispatch(const MSG& msg) {
- bool process_message = true;
-
- if (msg.message >= WM_KEYFIRST && msg.message <= WM_KEYLAST) {
- FocusManager* focus_manager =
- FocusManager::GetFocusManagerForNativeView(msg.hwnd);
- if (focus_manager) {
- // FocusManager::OnKeyDown and OnKeyUp return false if this message has
- // been consumed and should not be propagated further.
- switch (msg.message) {
- case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
- process_message = focus_manager->OnKeyDown(msg.hwnd, msg.message,
- msg.wParam, msg.lParam);
- break;
- }
- }
- }
-
- if (process_message) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-
- return true;
-}
-
-} // namespace views
« no previous file with comments | « views/widget/accelerator_handler.h ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698