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

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

Issue 2728183002: RendererCompositorFrameSink should handle local surface id allocation (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 last_metadata_ = std::move(metadata); 1428 last_metadata_ = std::move(metadata);
1429 if (frames_to_wait_ == 0) 1429 if (frames_to_wait_ == 0)
1430 quit_.Run(); 1430 quit_.Run();
1431 } 1431 }
1432 1432
1433 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) { 1433 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) {
1434 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) { 1434 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) {
1435 ViewHostMsg_SwapCompositorFrame::Param param; 1435 ViewHostMsg_SwapCompositorFrame::Param param;
1436 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 1436 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
1437 return false; 1437 return false;
1438 cc::CompositorFrame frame(std::move(std::get<1>(param))); 1438 cc::CompositorFrame frame(std::move(std::get<2>(param)));
1439 1439
1440 BrowserThread::PostTask( 1440 BrowserThread::PostTask(
1441 BrowserThread::UI, FROM_HERE, 1441 BrowserThread::UI, FROM_HERE,
1442 base::Bind(&FrameWatcher::ReceivedFrameSwap, this, 1442 base::Bind(&FrameWatcher::ReceivedFrameSwap, this,
1443 base::Passed(std::move(frame.metadata)))); 1443 base::Passed(std::move(frame.metadata))));
1444 } 1444 }
1445 return false; 1445 return false;
1446 } 1446 }
1447 1447
1448 void FrameWatcher::AttachTo(WebContents* web_contents) { 1448 void FrameWatcher::AttachTo(WebContents* web_contents) {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 IPC::IpcSecurityTestUtil::PwnMessageReceived( 1855 IPC::IpcSecurityTestUtil::PwnMessageReceived(
1856 process->GetChannel(), 1856 process->GetChannel(),
1857 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); 1857 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position));
1858 1858
1859 // If this started an async operation, wait for it to complete. 1859 // If this started an async operation, wait for it to complete.
1860 if (waiter.did_start_update()) 1860 if (waiter.did_start_update())
1861 waiter.WaitForEndUpdate(); 1861 waiter.WaitForEndUpdate();
1862 } 1862 }
1863 1863
1864 } // namespace content 1864 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698