| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "cc/trees/layer_tree.h" | 24 #include "cc/trees/layer_tree.h" |
| 25 #include "cc/trees/layer_tree_host.h" | 25 #include "cc/trees/layer_tree_host.h" |
| 26 #include "content/child/request_extra_data.h" | 26 #include "content/child/request_extra_data.h" |
| 27 #include "content/child/service_worker/service_worker_network_provider.h" | 27 #include "content/child/service_worker/service_worker_network_provider.h" |
| 28 #include "content/common/content_switches_internal.h" | 28 #include "content/common/content_switches_internal.h" |
| 29 #include "content/common/frame_messages.h" | 29 #include "content/common/frame_messages.h" |
| 30 #include "content/common/frame_owner_properties.h" | 30 #include "content/common/frame_owner_properties.h" |
| 31 #include "content/common/frame_replication_state.h" | 31 #include "content/common/frame_replication_state.h" |
| 32 #include "content/common/renderer.mojom.h" |
| 32 #include "content/common/site_isolation_policy.h" | 33 #include "content/common/site_isolation_policy.h" |
| 33 #include "content/common/view_messages.h" | 34 #include "content/common/view_messages.h" |
| 34 #include "content/public/browser/browser_context.h" | 35 #include "content/public/browser/browser_context.h" |
| 35 #include "content/public/browser/native_web_keyboard_event.h" | 36 #include "content/public/browser/native_web_keyboard_event.h" |
| 36 #include "content/public/browser/web_ui_controller_factory.h" | 37 #include "content/public/browser/web_ui_controller_factory.h" |
| 37 #include "content/public/common/bindings_policy.h" | 38 #include "content/public/common/bindings_policy.h" |
| 38 #include "content/public/common/browser_side_navigation_policy.h" | 39 #include "content/public/common/browser_side_navigation_policy.h" |
| 39 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
| 40 #include "content/public/common/page_zoom.h" | 41 #include "content/public/common/page_zoom.h" |
| 41 #include "content/public/common/url_constants.h" | 42 #include "content/public/common/url_constants.h" |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 | 908 |
| 908 // Swap the child frame out. | 909 // Swap the child frame out. |
| 909 FrameReplicationState replication_state = | 910 FrameReplicationState replication_state = |
| 910 ReconstructReplicationStateForTesting(child_frame); | 911 ReconstructReplicationStateForTesting(child_frame); |
| 911 child_frame->SwapOut(kProxyRoutingId, true, replication_state); | 912 child_frame->SwapOut(kProxyRoutingId, true, replication_state); |
| 912 EXPECT_TRUE(web_frame->firstChild()->isWebRemoteFrame()); | 913 EXPECT_TRUE(web_frame->firstChild()->isWebRemoteFrame()); |
| 913 | 914 |
| 914 // Do the first step of a remote-to-local transition for the child proxy, | 915 // Do the first step of a remote-to-local transition for the child proxy, |
| 915 // which is to create a provisional local frame. | 916 // which is to create a provisional local frame. |
| 916 int routing_id = kProxyRoutingId + 1; | 917 int routing_id = kProxyRoutingId + 1; |
| 917 FrameMsg_NewFrame_WidgetParams widget_params; | 918 mojom::CreateFrameWidget widget_params; |
| 918 widget_params.routing_id = MSG_ROUTING_NONE; | 919 widget_params.routing_id = MSG_ROUTING_NONE; |
| 919 widget_params.hidden = false; | 920 widget_params.hidden = false; |
| 920 RenderFrameImpl::CreateFrame(routing_id, kProxyRoutingId, MSG_ROUTING_NONE, | 921 RenderFrameImpl::CreateFrame(routing_id, kProxyRoutingId, MSG_ROUTING_NONE, |
| 921 frame()->GetRoutingID(), MSG_ROUTING_NONE, | 922 frame()->GetRoutingID(), MSG_ROUTING_NONE, |
| 922 replication_state, nullptr, widget_params, | 923 replication_state, nullptr, widget_params, |
| 923 FrameOwnerProperties()); | 924 FrameOwnerProperties()); |
| 924 TestRenderFrame* provisional_frame = | 925 TestRenderFrame* provisional_frame = |
| 925 static_cast<TestRenderFrame*>(RenderFrameImpl::FromRoutingID(routing_id)); | 926 static_cast<TestRenderFrame*>(RenderFrameImpl::FromRoutingID(routing_id)); |
| 926 EXPECT_TRUE(provisional_frame); | 927 EXPECT_TRUE(provisional_frame); |
| 927 | 928 |
| (...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 ExpectPauseAndResume(3); | 2557 ExpectPauseAndResume(3); |
| 2557 blink::WebScriptSource source2( | 2558 blink::WebScriptSource source2( |
| 2558 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2559 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2560 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
| 2560 | 2561 |
| 2561 EXPECT_FALSE(IsPaused()); | 2562 EXPECT_FALSE(IsPaused()); |
| 2562 Detach(); | 2563 Detach(); |
| 2563 } | 2564 } |
| 2564 | 2565 |
| 2565 } // namespace content | 2566 } // namespace content |
| OLD | NEW |