| 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 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #include <QuartzCore/QuartzCore.h> | 8 #include <QuartzCore/QuartzCore.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 if (render_widget_host_) { | 1278 if (render_widget_host_) { |
| 1279 render_widget_host_->Send(new ViewMsg_PluginImeCompositionCompleted( | 1279 render_widget_host_->Send(new ViewMsg_PluginImeCompositionCompleted( |
| 1280 render_widget_host_->GetRoutingID(), text, plugin_id)); | 1280 render_widget_host_->GetRoutingID(), text, plugin_id)); |
| 1281 } | 1281 } |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 void RenderWidgetHostViewMac::CompositorSwapBuffers( | 1284 void RenderWidgetHostViewMac::CompositorSwapBuffers( |
| 1285 uint64 surface_handle, | 1285 uint64 surface_handle, |
| 1286 const gfx::Size& size, | 1286 const gfx::Size& size, |
| 1287 float surface_scale_factor, | 1287 float surface_scale_factor, |
| 1288 const ui::LatencyInfo& latency_info) { | 1288 const std::vector<ui::LatencyInfo>& latency_info) { |
| 1289 if (render_widget_host_->is_hidden()) | 1289 if (render_widget_host_->is_hidden()) |
| 1290 return; | 1290 return; |
| 1291 | 1291 |
| 1292 NSWindow* window = [cocoa_view_ window]; | 1292 NSWindow* window = [cocoa_view_ window]; |
| 1293 if (window_number() <= 0) { | 1293 if (window_number() <= 0) { |
| 1294 // There is no window to present so capturing during present won't work. | 1294 // There is no window to present so capturing during present won't work. |
| 1295 // We check if frame subscriber wants this frame and capture manually. | 1295 // We check if frame subscriber wants this frame and capture manually. |
| 1296 if (compositing_iosurface_ && frame_subscriber_) { | 1296 if (compositing_iosurface_ && frame_subscriber_) { |
| 1297 const base::Time present_time = base::Time::Now(); | 1297 const base::Time present_time = base::Time::Now(); |
| 1298 scoped_refptr<media::VideoFrame> frame; | 1298 scoped_refptr<media::VideoFrame> frame; |
| (...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3985 return YES; | 3985 return YES; |
| 3986 } | 3986 } |
| 3987 | 3987 |
| 3988 - (BOOL)isOpaque { | 3988 - (BOOL)isOpaque { |
| 3989 if (renderWidgetHostView_->use_core_animation_) | 3989 if (renderWidgetHostView_->use_core_animation_) |
| 3990 return YES; | 3990 return YES; |
| 3991 return [super isOpaque]; | 3991 return [super isOpaque]; |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 @end | 3994 @end |
| OLD | NEW |