OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/android/in_process/synchronous_compositor_impl.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 for (ScopedVector<IPC::Message>::const_iterator i = messages.begin(); | 309 for (ScopedVector<IPC::Message>::const_iterator i = messages.begin(); |
310 i != messages.end(); | 310 i != messages.end(); |
311 ++i) { | 311 ++i) { |
312 rph->OnMessageReceived(**i); | 312 rph->OnMessageReceived(**i); |
313 } | 313 } |
314 } | 314 } |
315 | 315 |
316 void SynchronousCompositorImpl::DidActivatePendingTree() { | 316 void SynchronousCompositorImpl::DidActivatePendingTree() { |
317 DCHECK(compositor_client_); | 317 DCHECK(compositor_client_); |
318 compositor_client_->DidUpdateContent(); | 318 compositor_client_->DidUpdateContent(); |
| 319 DeliverMessages(); |
319 } | 320 } |
320 | 321 |
321 gfx::ScrollOffset SynchronousCompositorImpl::GetTotalScrollOffset() { | 322 gfx::ScrollOffset SynchronousCompositorImpl::GetTotalScrollOffset() { |
322 DCHECK(CalledOnValidThread()); | 323 DCHECK(CalledOnValidThread()); |
323 DCHECK(compositor_client_); | 324 DCHECK(compositor_client_); |
324 // TODO(miletus): Make GetTotalRootLayerScrollOffset return | 325 // TODO(miletus): Make GetTotalRootLayerScrollOffset return |
325 // ScrollOffset. crbug.com/414283. | 326 // ScrollOffset. crbug.com/414283. |
326 return gfx::ScrollOffset( | 327 return gfx::ScrollOffset( |
327 compositor_client_->GetTotalRootLayerScrollOffset()); | 328 compositor_client_->GetTotalRootLayerScrollOffset()); |
328 } | 329 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 g_factory.Get(); // Ensure it's initialized. | 369 g_factory.Get(); // Ensure it's initialized. |
369 SynchronousCompositorImpl::CreateForWebContents(contents); | 370 SynchronousCompositorImpl::CreateForWebContents(contents); |
370 } | 371 } |
371 SynchronousCompositorImpl* instance = | 372 SynchronousCompositorImpl* instance = |
372 SynchronousCompositorImpl::FromWebContents(contents); | 373 SynchronousCompositorImpl::FromWebContents(contents); |
373 DCHECK(instance); | 374 DCHECK(instance); |
374 instance->SetClient(client); | 375 instance->SetClient(client); |
375 } | 376 } |
376 | 377 |
377 } // namespace content | 378 } // namespace content |
OLD | NEW |