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/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 // TODO(wjmaclean): The next two functions are a modified version of | 1164 // TODO(wjmaclean): The next two functions are a modified version of |
1165 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, | 1165 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, |
1166 // and (2) links outside of content-browsertests. At some point in time we | 1166 // and (2) links outside of content-browsertests. At some point in time we |
1167 // should probably merge these. | 1167 // should probably merge these. |
1168 namespace { | 1168 namespace { |
1169 | 1169 |
1170 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, | 1170 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, |
1171 RenderWidgetHostViewChildFrame* target_view) { | 1171 RenderWidgetHostViewChildFrame* target_view) { |
1172 if (!container_surface_id.is_valid()) | 1172 if (!container_surface_id.is_valid()) |
1173 return false; | 1173 return false; |
1174 for (cc::SurfaceId id : | 1174 for (cc::SurfaceId id : GetSurfaceManager() |
1175 GetSurfaceManager()->GetSurfaceForId(container_surface_id) | 1175 ->GetSurfaceForId(container_surface_id) |
1176 ->referenced_surfaces()) { | 1176 ->active_referenced_surfaces()) { |
1177 if (id == target_view->SurfaceIdForTesting() || | 1177 if (id == target_view->SurfaceIdForTesting() || |
1178 ContainsSurfaceId(id, target_view)) | 1178 ContainsSurfaceId(id, target_view)) |
1179 return true; | 1179 return true; |
1180 } | 1180 } |
1181 return false; | 1181 return false; |
1182 } | 1182 } |
1183 | 1183 |
1184 } // namespace | 1184 } // namespace |
1185 | 1185 |
1186 void WaitForGuestSurfaceReady(content::WebContents* guest_web_contents) { | 1186 void WaitForGuestSurfaceReady(content::WebContents* guest_web_contents) { |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 1850 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
1851 process->GetChannel(), | 1851 process->GetChannel(), |
1852 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); | 1852 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); |
1853 | 1853 |
1854 // If this started an async operation, wait for it to complete. | 1854 // If this started an async operation, wait for it to complete. |
1855 if (waiter.did_start_update()) | 1855 if (waiter.did_start_update()) |
1856 waiter.WaitForEndUpdate(); | 1856 waiter.WaitForEndUpdate(); |
1857 } | 1857 } |
1858 | 1858 |
1859 } // namespace content | 1859 } // namespace content |
OLD | NEW |