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

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

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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 | « content/common/view_messages.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 last_metadata_ = std::move(metadata); 1313 last_metadata_ = std::move(metadata);
1314 if (frames_to_wait_ == 0) 1314 if (frames_to_wait_ == 0)
1315 quit_.Run(); 1315 quit_.Run();
1316 } 1316 }
1317 1317
1318 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) { 1318 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) {
1319 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) { 1319 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) {
1320 ViewHostMsg_SwapCompositorFrame::Param param; 1320 ViewHostMsg_SwapCompositorFrame::Param param;
1321 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 1321 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
1322 return false; 1322 return false;
1323 cc::CompositorFrame frame(std::move(std::get<1>(param))); 1323 cc::CompositorFrame frame(std::move(std::get<2>(param)));
1324 1324
1325 BrowserThread::PostTask( 1325 BrowserThread::PostTask(
1326 BrowserThread::UI, FROM_HERE, 1326 BrowserThread::UI, FROM_HERE,
1327 base::Bind(&FrameWatcher::ReceivedFrameSwap, this, 1327 base::Bind(&FrameWatcher::ReceivedFrameSwap, this,
1328 base::Passed(std::move(frame.metadata)))); 1328 base::Passed(std::move(frame.metadata))));
1329 } 1329 }
1330 return false; 1330 return false;
1331 } 1331 }
1332 1332
1333 void FrameWatcher::AttachTo(WebContents* web_contents) { 1333 void FrameWatcher::AttachTo(WebContents* web_contents) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1425 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1426 if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN) 1426 if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN)
1427 return ack_result_; 1427 return ack_result_;
1428 base::RunLoop run_loop; 1428 base::RunLoop run_loop;
1429 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); 1429 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure());
1430 run_loop.Run(); 1430 run_loop.Run();
1431 return ack_result_; 1431 return ack_result_;
1432 } 1432 }
1433 1433
1434 } // namespace content 1434 } // namespace content
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698