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 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 last_metadata_ = std::move(metadata); | 1432 last_metadata_ = std::move(metadata); |
1433 if (frames_to_wait_ == 0) | 1433 if (frames_to_wait_ == 0) |
1434 quit_.Run(); | 1434 quit_.Run(); |
1435 } | 1435 } |
1436 | 1436 |
1437 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) { | 1437 bool FrameWatcher::OnMessageReceived(const IPC::Message& message) { |
1438 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) { | 1438 if (message.type() == ViewHostMsg_SwapCompositorFrame::ID) { |
1439 ViewHostMsg_SwapCompositorFrame::Param param; | 1439 ViewHostMsg_SwapCompositorFrame::Param param; |
1440 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 1440 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
1441 return false; | 1441 return false; |
1442 cc::CompositorFrame frame(std::move(std::get<1>(param))); | 1442 cc::CompositorFrame frame(std::move(std::get<2>(param))); |
1443 | 1443 |
1444 BrowserThread::PostTask( | 1444 BrowserThread::PostTask( |
1445 BrowserThread::UI, FROM_HERE, | 1445 BrowserThread::UI, FROM_HERE, |
1446 base::Bind(&FrameWatcher::ReceivedFrameSwap, this, | 1446 base::Bind(&FrameWatcher::ReceivedFrameSwap, this, |
1447 base::Passed(std::move(frame.metadata)))); | 1447 base::Passed(std::move(frame.metadata)))); |
1448 } | 1448 } |
1449 return false; | 1449 return false; |
1450 } | 1450 } |
1451 | 1451 |
1452 void FrameWatcher::AttachTo(WebContents* web_contents) { | 1452 void FrameWatcher::AttachTo(WebContents* web_contents) { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1859 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 1859 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
1860 process->GetChannel(), | 1860 process->GetChannel(), |
1861 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); | 1861 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); |
1862 | 1862 |
1863 // If this started an async operation, wait for it to complete. | 1863 // If this started an async operation, wait for it to complete. |
1864 if (waiter.did_start_update()) | 1864 if (waiter.did_start_update()) |
1865 waiter.WaitForEndUpdate(); | 1865 waiter.WaitForEndUpdate(); |
1866 } | 1866 } |
1867 | 1867 |
1868 } // namespace content | 1868 } // namespace content |
OLD | NEW |