| 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 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); | 1628 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); |
| 1629 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); | 1629 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); |
| 1630 if (touch_emulator_) | 1630 if (touch_emulator_) |
| 1631 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); | 1631 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); |
| 1632 | 1632 |
| 1633 if (view_) { | 1633 if (view_) { |
| 1634 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame)); | 1634 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame)); |
| 1635 view_->DidReceiveRendererFrame(); | 1635 view_->DidReceiveRendererFrame(); |
| 1636 } else { | 1636 } else { |
| 1637 cc::ReturnedResourceArray resources; | 1637 cc::ReturnedResourceArray resources; |
| 1638 if (frame.delegated_frame_data) { | 1638 cc::TransferableResource::ReturnResources(frame.resource_list, &resources); |
| 1639 cc::TransferableResource::ReturnResources( | |
| 1640 frame.delegated_frame_data->resource_list, &resources); | |
| 1641 } | |
| 1642 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id, | 1639 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id, |
| 1643 process_->GetID(), true /* is_swap_ack */, | 1640 process_->GetID(), true /* is_swap_ack */, |
| 1644 resources); | 1641 resources); |
| 1645 } | 1642 } |
| 1646 | 1643 |
| 1647 RenderProcessHost* rph = GetProcess(); | 1644 RenderProcessHost* rph = GetProcess(); |
| 1648 for (std::vector<IPC::Message>::const_iterator i = | 1645 for (std::vector<IPC::Message>::const_iterator i = |
| 1649 messages_to_deliver_with_frame.begin(); | 1646 messages_to_deliver_with_frame.begin(); |
| 1650 i != messages_to_deliver_with_frame.end(); | 1647 i != messages_to_deliver_with_frame.end(); |
| 1651 ++i) { | 1648 ++i) { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2223 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2220 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2224 } | 2221 } |
| 2225 | 2222 |
| 2226 BrowserAccessibilityManager* | 2223 BrowserAccessibilityManager* |
| 2227 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2224 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2228 return delegate_ ? | 2225 return delegate_ ? |
| 2229 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2226 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2230 } | 2227 } |
| 2231 | 2228 |
| 2232 } // namespace content | 2229 } // namespace content |
| OLD | NEW |