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

Side by Side Diff: ui/base/cocoa/event_hook_application.h

Issue 11498008: RenderWidget popup should be a NSWindow so it can go outside the main window. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed include Created 8 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_COCOA_EVENT_HOOK_APPLICATION_H_
6 #define UI_BASE_COCOA_EVENT_HOOK_APPLICATION_H_
7
8 #ifdef __OBJC__
Nico 2012/12/14 19:00:46 nit: we prefer #if defined
9
10 #import <AppKit/AppKit.h>
11
12 #include <vector>
Nico 2012/12/14 19:00:46 unused
13
14 #import "base/memory/scoped_nsobject.h"
15
16 // Event hooks must implement this protocol.
17 @protocol CrEventHookProtocol
18 - (void)hookForEvent:(NSEvent*)theEvent;
19 @end
20
21 @interface CrEventHookApplication : NSApplication {
Nico 2012/12/14 19:00:46 Add a class comment.
22 @private
23 // Array of objects implementing EventHookProtocol.
24 scoped_nsobject<NSMutableArray> eventHooks_;
25 }
26
27 // Add or remove an event hook to be called for every sendEvent:
28 // that the application receives. These handlers are called before
29 // the normal [NSApplication sendEvent:] call is made.
30
31 // This is not a good alternative to a nested event loop. It should
32 // be used only when normal event logic and notification breaks down
33 // (e.g. when clicking outside a canBecomeKey:NO window to "switch
34 // context" out of it).
35 - (void)addEventHook:(id<CrEventHookProtocol>)hook;
36 - (void)removeEventHook:(id<CrEventHookProtocol>)hook;
37
38 @end
39
40 #endif
Nico 2012/12/14 19:00:46 // defined(__OBJC__)
41
42 #endif // UI_BASE_COCOA_EVENT_HOOK_APPLICATION_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | ui/base/cocoa/event_hook_application.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698