Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2688043002: Retain references to surfaces from both active AND pending CompositorFrames (Closed)
Patch Set: Added TODOs and addressed comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | content/test/content_browser_test_utils_internal.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | content/test/content_browser_test_utils_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698