| 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 "chrome/browser/chrome_thread.h" | 9 #include "chrome/browser/chrome_thread.h" |
| 10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 } | 840 } |
| 841 | 841 |
| 842 gfx::PluginWindowHandle | 842 gfx::PluginWindowHandle |
| 843 RenderWidgetHostViewMac::AllocateFakePluginWindowHandle(bool opaque, | 843 RenderWidgetHostViewMac::AllocateFakePluginWindowHandle(bool opaque, |
| 844 bool root) { | 844 bool root) { |
| 845 CHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); | 845 CHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
| 846 // Create an NSView to host the plugin's/compositor's pixels. | 846 // Create an NSView to host the plugin's/compositor's pixels. |
| 847 gfx::PluginWindowHandle handle = | 847 gfx::PluginWindowHandle handle = |
| 848 plugin_container_manager_.AllocateFakePluginWindowHandle(opaque, root); | 848 plugin_container_manager_.AllocateFakePluginWindowHandle(opaque, root); |
| 849 | 849 |
| 850 scoped_nsobject<NSView> plugin_view( | 850 scoped_nsobject<AcceleratedPluginView> plugin_view( |
| 851 [[AcceleratedPluginView alloc] initWithRenderWidgetHostViewMac:this | 851 [[AcceleratedPluginView alloc] initWithRenderWidgetHostViewMac:this |
| 852 pluginHandle:handle]); | 852 pluginHandle:handle]); |
| 853 [plugin_view setHidden:YES]; | 853 [plugin_view setHidden:YES]; |
| 854 | 854 |
| 855 [cocoa_view_ addSubview:plugin_view]; | 855 [cocoa_view_ addSubview:plugin_view]; |
| 856 plugin_views_[handle] = plugin_view; | 856 plugin_views_[handle] = plugin_view; |
| 857 | 857 |
| 858 return handle; | 858 return handle; |
| 859 } | 859 } |
| 860 | 860 |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 if (!string) return NO; | 2439 if (!string) return NO; |
| 2440 | 2440 |
| 2441 // If the user is currently using an IME, confirm the IME input, | 2441 // If the user is currently using an IME, confirm the IME input, |
| 2442 // and then insert the text from the service, the same as TextEdit and Safari. | 2442 // and then insert the text from the service, the same as TextEdit and Safari. |
| 2443 [self confirmComposition]; | 2443 [self confirmComposition]; |
| 2444 [self insertText:string]; | 2444 [self insertText:string]; |
| 2445 return YES; | 2445 return YES; |
| 2446 } | 2446 } |
| 2447 | 2447 |
| 2448 @end | 2448 @end |
| OLD | NEW |