Chromium Code Reviews| 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 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1627 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); | 1627 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); |
| 1628 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); | 1628 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); |
| 1629 if (touch_emulator_) | 1629 if (touch_emulator_) |
| 1630 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); | 1630 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); |
| 1631 | 1631 |
| 1632 if (view_) { | 1632 if (view_) { |
| 1633 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame)); | 1633 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame)); |
| 1634 view_->DidReceiveRendererFrame(); | 1634 view_->DidReceiveRendererFrame(); |
| 1635 } else { | 1635 } else { |
| 1636 cc::ReturnedResourceArray resources; | 1636 cc::ReturnedResourceArray resources; |
| 1637 if (frame.delegated_frame_data) { | 1637 if (!frame.IsEmpty()) |
|
piman
2016/10/25 22:57:31
nit: you can skip this test, ReturnResources is a
Saman Sami
2016/10/28 16:47:35
Done.
| |
| 1638 cc::TransferableResource::ReturnResources( | 1638 cc::TransferableResource::ReturnResources(frame.resource_list, |
| 1639 frame.delegated_frame_data->resource_list, &resources); | 1639 &resources); |
| 1640 } | |
| 1641 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id, | 1640 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id, |
| 1642 process_->GetID(), true /* is_swap_ack */, | 1641 process_->GetID(), true /* is_swap_ack */, |
| 1643 resources); | 1642 resources); |
| 1644 } | 1643 } |
| 1645 | 1644 |
| 1646 RenderProcessHost* rph = GetProcess(); | 1645 RenderProcessHost* rph = GetProcess(); |
| 1647 for (std::vector<IPC::Message>::const_iterator i = | 1646 for (std::vector<IPC::Message>::const_iterator i = |
| 1648 messages_to_deliver_with_frame.begin(); | 1647 messages_to_deliver_with_frame.begin(); |
| 1649 i != messages_to_deliver_with_frame.end(); | 1648 i != messages_to_deliver_with_frame.end(); |
| 1650 ++i) { | 1649 ++i) { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2222 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2221 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2223 } | 2222 } |
| 2224 | 2223 |
| 2225 BrowserAccessibilityManager* | 2224 BrowserAccessibilityManager* |
| 2226 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2225 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2227 return delegate_ ? | 2226 return delegate_ ? |
| 2228 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2227 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2229 } | 2228 } |
| 2230 | 2229 |
| 2231 } // namespace content | 2230 } // namespace content |
| OLD | NEW |