| 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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 | 1451 |
| 1452 bool RenderWidgetHostImpl::OnSwapCompositorFrame( | 1452 bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
| 1453 const IPC::Message& message) { | 1453 const IPC::Message& message) { |
| 1454 // This trace event is used in | 1454 // This trace event is used in |
| 1455 // chrome/browser/extensions/api/cast_streaming/performance_test.cc | 1455 // chrome/browser/extensions/api/cast_streaming/performance_test.cc |
| 1456 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); | 1456 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); |
| 1457 ViewHostMsg_SwapCompositorFrame::Param param; | 1457 ViewHostMsg_SwapCompositorFrame::Param param; |
| 1458 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 1458 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
| 1459 return false; | 1459 return false; |
| 1460 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 1460 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
| 1461 uint32 output_surface_id = get<0>(param); | 1461 uint32 output_surface_id = base::get<0>(param); |
| 1462 get<1>(param).AssignTo(frame.get()); | 1462 base::get<1>(param).AssignTo(frame.get()); |
| 1463 std::vector<IPC::Message> messages_to_deliver_with_frame; | 1463 std::vector<IPC::Message> messages_to_deliver_with_frame; |
| 1464 messages_to_deliver_with_frame.swap(get<2>(param)); | 1464 messages_to_deliver_with_frame.swap(base::get<2>(param)); |
| 1465 | 1465 |
| 1466 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); | 1466 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); |
| 1467 | 1467 |
| 1468 input_router_->OnViewUpdated( | 1468 input_router_->OnViewUpdated( |
| 1469 GetInputRouterViewFlagsFromCompositorFrameMetadata(frame->metadata)); | 1469 GetInputRouterViewFlagsFromCompositorFrameMetadata(frame->metadata)); |
| 1470 | 1470 |
| 1471 if (touch_emulator_) { | 1471 if (touch_emulator_) { |
| 1472 touch_emulator_->SetDoubleTapSupportForPageEnabled( | 1472 touch_emulator_->SetDoubleTapSupportForPageEnabled( |
| 1473 !IsMobileOptimizedFrame(frame->metadata)); | 1473 !IsMobileOptimizedFrame(frame->metadata)); |
| 1474 } | 1474 } |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2120 } | 2120 } |
| 2121 | 2121 |
| 2122 #if defined(OS_WIN) | 2122 #if defined(OS_WIN) |
| 2123 gfx::NativeViewAccessible | 2123 gfx::NativeViewAccessible |
| 2124 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2124 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2125 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2125 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2126 } | 2126 } |
| 2127 #endif | 2127 #endif |
| 2128 | 2128 |
| 2129 } // namespace content | 2129 } // namespace content |
| OLD | NEW |