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" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 int32 height, | 906 int32 height, |
907 TransportDIB::Handle transport_dib) { | 907 TransportDIB::Handle transport_dib) { |
908 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 908 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
909 plugin_container_manager_.SetSizeAndTransportDIB(window, | 909 plugin_container_manager_.SetSizeAndTransportDIB(window, |
910 width, | 910 width, |
911 height, | 911 height, |
912 transport_dib); | 912 transport_dib); |
913 } | 913 } |
914 | 914 |
915 void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped( | 915 void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped( |
916 gfx::PluginWindowHandle window) { | 916 gfx::PluginWindowHandle window, uint64 surface_id) { |
917 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 917 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
918 PluginViewMap::iterator it = plugin_views_.find(window); | 918 PluginViewMap::iterator it = plugin_views_.find(window); |
919 DCHECK(plugin_views_.end() != it); | 919 DCHECK(plugin_views_.end() != it); |
920 if (plugin_views_.end() == it) { | 920 if (plugin_views_.end() == it) { |
921 return; | 921 return; |
922 } | 922 } |
923 DCHECK([it->second isKindOfClass:[AcceleratedPluginView class]]); | 923 DCHECK([it->second isKindOfClass:[AcceleratedPluginView class]]); |
924 | 924 |
925 plugin_container_manager_.SetSurfaceWasPaintedTo(window); | 925 plugin_container_manager_.SetSurfaceWasPaintedTo(window, surface_id); |
926 AcceleratedPluginView* view = | 926 AcceleratedPluginView* view = |
927 static_cast<AcceleratedPluginView*>(it->second); | 927 static_cast<AcceleratedPluginView*>(it->second); |
928 // The surface is hidden until its first paint, to not show gargabe. | 928 // The surface is hidden until its first paint, to not show gargabe. |
929 if (plugin_container_manager_.SurfaceShouldBeVisible(window)) | 929 if (plugin_container_manager_.SurfaceShouldBeVisible(window)) |
930 [view setHidden:NO]; | 930 [view setHidden:NO]; |
931 [view setSurfaceWasSwapped:YES]; | 931 [view setSurfaceWasSwapped:YES]; |
932 } | 932 } |
933 | 933 |
934 void RenderWidgetHostViewMac::GpuRenderingStateDidChange() { | 934 void RenderWidgetHostViewMac::GpuRenderingStateDidChange() { |
935 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 935 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 if (!string) return NO; | 2513 if (!string) return NO; |
2514 | 2514 |
2515 // If the user is currently using an IME, confirm the IME input, | 2515 // If the user is currently using an IME, confirm the IME input, |
2516 // and then insert the text from the service, the same as TextEdit and Safari. | 2516 // and then insert the text from the service, the same as TextEdit and Safari. |
2517 [self confirmComposition]; | 2517 [self confirmComposition]; |
2518 [self insertText:string]; | 2518 [self insertText:string]; |
2519 return YES; | 2519 return YES; |
2520 } | 2520 } |
2521 | 2521 |
2522 @end | 2522 @end |
OLD | NEW |