| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/strings/string_piece.h" | 30 #include "base/strings/string_piece.h" |
| 31 #include "base/strings/string_split.h" | 31 #include "base/strings/string_split.h" |
| 32 #include "base/strings/string_util.h" | 32 #include "base/strings/string_util.h" |
| 33 #include "base/strings/sys_string_conversions.h" | 33 #include "base/strings/sys_string_conversions.h" |
| 34 #include "base/strings/utf_string_conversions.h" | 34 #include "base/strings/utf_string_conversions.h" |
| 35 #include "base/threading/thread_task_runner_handle.h" | 35 #include "base/threading/thread_task_runner_handle.h" |
| 36 #include "base/time/time.h" | 36 #include "base/time/time.h" |
| 37 #include "base/trace_event/trace_event.h" | 37 #include "base/trace_event/trace_event.h" |
| 38 #include "build/build_config.h" | 38 #include "build/build_config.h" |
| 39 #include "cc/base/switches.h" | 39 #include "cc/base/switches.h" |
| 40 #include "cc/output/forced_redraw_swap_promise.h" |
| 40 #include "content/child/appcache/appcache_dispatcher.h" | 41 #include "content/child/appcache/appcache_dispatcher.h" |
| 41 #include "content/child/appcache/web_application_cache_host_impl.h" | 42 #include "content/child/appcache/web_application_cache_host_impl.h" |
| 42 #include "content/child/child_shared_bitmap_manager.h" | 43 #include "content/child/child_shared_bitmap_manager.h" |
| 43 #include "content/child/request_extra_data.h" | 44 #include "content/child/request_extra_data.h" |
| 44 #include "content/child/v8_value_converter_impl.h" | 45 #include "content/child/v8_value_converter_impl.h" |
| 45 #include "content/child/webmessageportchannel_impl.h" | 46 #include "content/child/webmessageportchannel_impl.h" |
| 46 #include "content/common/content_constants_internal.h" | 47 #include "content/common/content_constants_internal.h" |
| 47 #include "content/common/content_switches_internal.h" | 48 #include "content/common/content_switches_internal.h" |
| 48 #include "content/common/dom_storage/dom_storage_types.h" | 49 #include "content/common/dom_storage/dom_storage_types.h" |
| 49 #include "content/common/drag_messages.h" | 50 #include "content/common/drag_messages.h" |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 frames_with_pending_state_.clear(); | 1458 frames_with_pending_state_.clear(); |
| 1458 } | 1459 } |
| 1459 | 1460 |
| 1460 void RenderViewImpl::ApplyWebPreferencesInternal( | 1461 void RenderViewImpl::ApplyWebPreferencesInternal( |
| 1461 const WebPreferences& prefs, | 1462 const WebPreferences& prefs, |
| 1462 blink::WebView* web_view, | 1463 blink::WebView* web_view, |
| 1463 CompositorDependencies* compositor_deps) { | 1464 CompositorDependencies* compositor_deps) { |
| 1464 ApplyWebPreferences(prefs, web_view); | 1465 ApplyWebPreferences(prefs, web_view); |
| 1465 } | 1466 } |
| 1466 | 1467 |
| 1467 void RenderViewImpl::OnForceRedraw(int id) { | 1468 void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) { |
| 1468 ui::LatencyInfo latency_info; | |
| 1469 if (id) { | |
| 1470 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, | |
| 1471 0, | |
| 1472 id); | |
| 1473 } | |
| 1474 std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; | |
| 1475 if (RenderWidgetCompositor* rwc = compositor()) { | 1469 if (RenderWidgetCompositor* rwc = compositor()) { |
| 1476 latency_info_swap_promise_monitor = | 1470 std::unique_ptr<cc::SwapPromise> swap_promise( |
| 1477 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info); | 1471 new cc::ForcedRedrawSwapPromise(latency_info)); |
| 1472 rwc->QueueSwapPromise(std::move(swap_promise)); |
| 1478 } | 1473 } |
| 1479 ScheduleCompositeWithForcedRedraw(); | 1474 ScheduleCompositeWithForcedRedraw(); |
| 1480 } | 1475 } |
| 1481 | 1476 |
| 1482 // blink::WebViewClient ------------------------------------------------------ | 1477 // blink::WebViewClient ------------------------------------------------------ |
| 1483 | 1478 |
| 1484 WebView* RenderViewImpl::createView(WebLocalFrame* creator, | 1479 WebView* RenderViewImpl::createView(WebLocalFrame* creator, |
| 1485 const WebURLRequest& request, | 1480 const WebURLRequest& request, |
| 1486 const WebWindowFeatures& features, | 1481 const WebWindowFeatures& features, |
| 1487 const WebString& frame_name, | 1482 const WebString& frame_name, |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 return render_frame->focused_pepper_plugin(); | 3076 return render_frame->focused_pepper_plugin(); |
| 3082 } | 3077 } |
| 3083 frame = frame->traverseNext(false); | 3078 frame = frame->traverseNext(false); |
| 3084 } | 3079 } |
| 3085 | 3080 |
| 3086 return nullptr; | 3081 return nullptr; |
| 3087 } | 3082 } |
| 3088 #endif | 3083 #endif |
| 3089 | 3084 |
| 3090 } // namespace content | 3085 } // namespace content |
| OLD | NEW |