summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/chrome_event_processing_window.h
blob: a5f65cb1003ac0e3ad2bfa77c054541d3cd3d358 (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
// Copyright (c) 2012 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_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_
#define CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_

#import <Cocoa/Cocoa.h>

#import "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/command_dispatcher.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"

@class ChromeCommandDispatcherDelegate;

// Override NSWindow to access unhandled keyboard events (for command
// processing); subclassing NSWindow is the only method to do
// this.
@interface ChromeEventProcessingWindow
    : UnderlayOpenGLHostingWindow<CommandDispatchingWindow>

// Checks if |event| is a window, delayed window, or browser keyboard shortcut.
// (See global_keyboard_shortcuts_mac.h for details). If so, execute the
// associated command. Returns YES if the event was handled.
- (BOOL)handleExtraKeyboardShortcut:(NSEvent*)event;

@end

#endif  // CHROME_BROWSER_UI_COCOA_CHROME_EVENT_PROCESSING_WINDOW_H_