| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2087 // accessibilityPerformShowMenuAction. | 2087 // accessibilityPerformShowMenuAction. |
| 2088 NSPoint location = [self accessibilityPointInScreen:accessibility]; | 2088 NSPoint location = [self accessibilityPointInScreen:accessibility]; |
| 2089 NSSize size = [[accessibility size] sizeValue]; | 2089 NSSize size = [[accessibility size] sizeValue]; |
| 2090 location = [[self window] convertScreenToBase:location]; | 2090 location = [[self window] convertScreenToBase:location]; |
| 2091 location.x += size.width/2; | 2091 location.x += size.width/2; |
| 2092 location.y += size.height/2; | 2092 location.y += size.height/2; |
| 2093 | 2093 |
| 2094 NSEvent* fakeRightClick = [NSEvent | 2094 NSEvent* fakeRightClick = [NSEvent |
| 2095 mouseEventWithType:NSRightMouseDown | 2095 mouseEventWithType:NSRightMouseDown |
| 2096 location:location | 2096 location:location |
| 2097 modifierFlags:nil | 2097 modifierFlags:0 |
| 2098 timestamp:0 | 2098 timestamp:0 |
| 2099 windowNumber:[[self window] windowNumber] | 2099 windowNumber:[[self window] windowNumber] |
| 2100 context:[NSGraphicsContext currentContext] | 2100 context:[NSGraphicsContext currentContext] |
| 2101 eventNumber:0 | 2101 eventNumber:0 |
| 2102 clickCount:1 | 2102 clickCount:1 |
| 2103 pressure:0]; | 2103 pressure:0]; |
| 2104 | 2104 |
| 2105 [self mouseEvent:fakeRightClick]; | 2105 [self mouseEvent:fakeRightClick]; |
| 2106 } | 2106 } |
| 2107 | 2107 |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 if (!string) return NO; | 2784 if (!string) return NO; |
| 2785 | 2785 |
| 2786 // If the user is currently using an IME, confirm the IME input, | 2786 // If the user is currently using an IME, confirm the IME input, |
| 2787 // and then insert the text from the service, the same as TextEdit and Safari. | 2787 // and then insert the text from the service, the same as TextEdit and Safari. |
| 2788 [self confirmComposition]; | 2788 [self confirmComposition]; |
| 2789 [self insertText:string]; | 2789 [self insertText:string]; |
| 2790 return YES; | 2790 return YES; |
| 2791 } | 2791 } |
| 2792 | 2792 |
| 2793 @end | 2793 @end |
| OLD | NEW |