summaryrefslogtreecommitdiffstats
path: root/chrome/views/widget/accelerator_handler.h
blob: f71be261cad44d834d2a75b91f58aa62499f528f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// 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.

#ifndef CHROME_VIEWS_ACCELERATOR_HANDLER_H__
#define CHROME_VIEWS_ACCELERATOR_HANDLER_H__

#include "base/message_loop.h"

namespace views {

// This class delegates WM_KEYDOWN and WM_SYSKEYDOWN messages to
// the associated FocusManager class for the window that is receiving
// these messages for accelerator processing. The BrowserProcess object
// holds a singleton instance of this class which can be used by other
// custom message loop dispatcher objects to implement default accelerator
// handling.
class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
 public:
   AcceleratorHandler();
  // Dispatcher method. This returns true if an accelerator was
  // processed by the focus manager
  virtual bool Dispatch(const MSG& msg);
 private:
  DISALLOW_EVIL_CONSTRUCTORS(AcceleratorHandler);
};

}  // namespace views

#endif  // CHROME_VIEWS_ACCELERATOR_HANDLER_H__