OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 NSEventPhaseBegan = 0x1 << 0, | 89 NSEventPhaseBegan = 0x1 << 0, |
90 NSEventPhaseStationary = 0x1 << 1, | 90 NSEventPhaseStationary = 0x1 << 1, |
91 NSEventPhaseChanged = 0x1 << 2, | 91 NSEventPhaseChanged = 0x1 << 2, |
92 NSEventPhaseEnded = 0x1 << 3, | 92 NSEventPhaseEnded = 0x1 << 3, |
93 NSEventPhaseCancelled = 0x1 << 4, | 93 NSEventPhaseCancelled = 0x1 << 4, |
94 }; | 94 }; |
95 typedef NSUInteger NSEventPhase; | 95 typedef NSUInteger NSEventPhase; |
96 | 96 |
97 @interface NSEvent (LionAPI) | 97 @interface NSEvent (LionAPI) |
98 - (NSEventPhase)phase; | 98 - (NSEventPhase)phase; |
99 + (id)addLocalMonitorForEventsMatchingMask:(NSEventMask)mask | |
100 handler:(NSEvent* (^)(NSEvent*))block; | |
101 + (void)removeMonitor:(id)eventMonitor; | |
102 @end | 99 @end |
103 | 100 |
104 @interface NSWindow (LionAPI) | 101 @interface NSWindow (LionAPI) |
105 - (CGFloat)backingScaleFactor; | 102 - (CGFloat)backingScaleFactor; |
106 @end | 103 @end |
107 | 104 |
108 @interface NSView (NSOpenGLSurfaceResolutionLionAPI) | 105 @interface NSView (NSOpenGLSurfaceResolutionLionAPI) |
109 - (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; | 106 - (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; |
110 @end | 107 @end |
111 | 108 |
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3409 if (!string) return NO; | 3406 if (!string) return NO; |
3410 | 3407 |
3411 // If the user is currently using an IME, confirm the IME input, | 3408 // If the user is currently using an IME, confirm the IME input, |
3412 // and then insert the text from the service, the same as TextEdit and Safari. | 3409 // and then insert the text from the service, the same as TextEdit and Safari. |
3413 [self confirmComposition]; | 3410 [self confirmComposition]; |
3414 [self insertText:string]; | 3411 [self insertText:string]; |
3415 return YES; | 3412 return YES; |
3416 } | 3413 } |
3417 | 3414 |
3418 @end | 3415 @end |
OLD | NEW |