| Index: cc/thread_proxy.cc
|
| diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
|
| index adb9d016d020f8acb2c046493c0daf03fb706fc4..fe92817ea58a659061e98380f4953a1c5dd5043c 100644
|
| --- a/cc/thread_proxy.cc
|
| +++ b/cc/thread_proxy.cc
|
| @@ -1088,6 +1088,29 @@ ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState()
|
| {
|
| }
|
|
|
| +scoped_ptr<base::Value> ThreadProxy::asValue() const
|
| +{
|
| + scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
|
| +
|
| + CompletionEvent completion;
|
| + {
|
| + DebugScopedSetMainThreadBlocked mainThreadBlocked(
|
| + const_cast<ThreadProxy*>(this));
|
| + Proxy::implThread()->postTask(base::Bind(&ThreadProxy::asValueOnImplThread,
|
| + m_implThreadWeakPtr,
|
| + &completion,
|
| + state.get()));
|
| + completion.wait();
|
| + }
|
| + return state.PassAs<base::Value>();
|
| +}
|
| +
|
| +void ThreadProxy::asValueOnImplThread(CompletionEvent* completion, base::DictionaryValue* state) const
|
| +{
|
| + state->Set("layer_tree_host_impl", m_layerTreeHostImpl->asValue().release());
|
| + completion->signal();
|
| +}
|
| +
|
| bool ThreadProxy::commitPendingForTesting()
|
| {
|
| DCHECK(isMainThread());
|
|
|