OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <QuartzCore/QuartzCore.h> | 5 #include <QuartzCore/QuartzCore.h> |
6 | 6 |
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
8 | 8 |
9 #include "app/app_switches.h" | 9 #include "app/app_switches.h" |
10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
11 #import "base/chrome_application_mac.h" | 11 #import "base/chrome_application_mac.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/mac/scoped_cftyperef.h" | 14 #include "base/mac/scoped_cftyperef.h" |
| 15 #import "base/mac/scoped_nsautorelease_pool.h" |
15 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
16 #import "base/scoped_nsautorelease_pool.h" | |
17 #import "base/scoped_nsobject.h" | 17 #import "base/scoped_nsobject.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
20 #include "base/sys_string_conversions.h" | 20 #include "base/sys_string_conversions.h" |
21 #include "chrome/browser/browser_thread.h" | 21 #include "chrome/browser/browser_thread.h" |
22 #include "chrome/browser/browser_trial.h" | 22 #include "chrome/browser/browser_trial.h" |
23 #import "chrome/browser/cocoa/rwhvm_editcommand_helper.h" | 23 #import "chrome/browser/cocoa/rwhvm_editcommand_helper.h" |
24 #import "chrome/browser/cocoa/view_id_util.h" | 24 #import "chrome/browser/cocoa/view_id_util.h" |
25 #include "chrome/browser/plugin_process_host.h" | 25 #include "chrome/browser/plugin_process_host.h" |
26 #include "chrome/browser/renderer_host/backing_store_mac.h" | 26 #include "chrome/browser/renderer_host/backing_store_mac.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 @property NSSize cachedSize; | 198 @property NSSize cachedSize; |
199 @end | 199 @end |
200 | 200 |
201 @implementation AcceleratedPluginView | 201 @implementation AcceleratedPluginView |
202 @synthesize surfaceWasSwapped = surfaceWasSwapped_; | 202 @synthesize surfaceWasSwapped = surfaceWasSwapped_; |
203 @synthesize cachedSize = cachedSize_; | 203 @synthesize cachedSize = cachedSize_; |
204 | 204 |
205 - (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime { | 205 - (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime { |
206 // There is no autorelease pool when this method is called because it will be | 206 // There is no autorelease pool when this method is called because it will be |
207 // called from a background thread. | 207 // called from a background thread. |
208 base::ScopedNSAutoreleasePool pool; | 208 base::mac::ScopedNSAutoreleasePool pool; |
209 | 209 |
210 if (![self surfaceWasSwapped]) | 210 if (![self surfaceWasSwapped]) |
211 return kCVReturnSuccess; | 211 return kCVReturnSuccess; |
212 | 212 |
213 [self drawView]; | 213 [self drawView]; |
214 [self setSurfaceWasSwapped:NO]; | 214 [self setSurfaceWasSwapped:NO]; |
215 return kCVReturnSuccess; | 215 return kCVReturnSuccess; |
216 } | 216 } |
217 | 217 |
218 // This is the renderer output callback function | 218 // This is the renderer output callback function |
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2595 if (!string) return NO; | 2595 if (!string) return NO; |
2596 | 2596 |
2597 // If the user is currently using an IME, confirm the IME input, | 2597 // If the user is currently using an IME, confirm the IME input, |
2598 // and then insert the text from the service, the same as TextEdit and Safari. | 2598 // and then insert the text from the service, the same as TextEdit and Safari. |
2599 [self confirmComposition]; | 2599 [self confirmComposition]; |
2600 [self insertText:string]; | 2600 [self insertText:string]; |
2601 return YES; | 2601 return YES; |
2602 } | 2602 } |
2603 | 2603 |
2604 @end | 2604 @end |
OLD | NEW |