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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 void SynchronousCompositorImpl::DidBecomeCurrent() { 329 void SynchronousCompositorImpl::DidBecomeCurrent() {
330 // This is single process synchronous compositor. There is only one 330 // This is single process synchronous compositor. There is only one
331 // RenderViewHost. DidBecomeCurrent could be called before the renderer 331 // RenderViewHost. DidBecomeCurrent could be called before the renderer
332 // objects are initialized. So hold off calling DidBecomeCurrent until 332 // objects are initialized. So hold off calling DidBecomeCurrent until
333 // RegisterWithClient. Intentional no-op here. 333 // RegisterWithClient. Intentional no-op here.
334 } 334 }
335 335
336 void SynchronousCompositorImpl::DeliverMessages() { 336 void SynchronousCompositorImpl::DeliverMessages() {
337 std::vector<scoped_ptr<IPC::Message>> messages; 337 std::vector<std::unique_ptr<IPC::Message>> messages;
338 output_surface_->GetMessagesToDeliver(&messages); 338 output_surface_->GetMessagesToDeliver(&messages);
339 RenderProcessHost* rph = rwhva_->GetRenderWidgetHost()->GetProcess(); 339 RenderProcessHost* rph = rwhva_->GetRenderWidgetHost()->GetProcess();
340 for (const auto& msg : messages) { 340 for (const auto& msg : messages) {
341 rph->OnMessageReceived(*msg); 341 rph->OnMessageReceived(*msg);
342 } 342 }
343 } 343 }
344 344
345 void SynchronousCompositorImpl::DidActivatePendingTree() { 345 void SynchronousCompositorImpl::DidActivatePendingTree() {
346 if (registered_with_client_) 346 if (registered_with_client_)
347 compositor_client_->DidUpdateContent(); 347 compositor_client_->DidUpdateContent();
(...skipping 29 matching lines...) Expand all
377 } 377 }
378 } 378 }
379 379
380 // Not using base::NonThreadSafe as we want to enforce a more exacting threading 380 // Not using base::NonThreadSafe as we want to enforce a more exacting threading
381 // requirement: SynchronousCompositorImpl() must only be used on the UI thread. 381 // requirement: SynchronousCompositorImpl() must only be used on the UI thread.
382 bool SynchronousCompositorImpl::CalledOnValidThread() const { 382 bool SynchronousCompositorImpl::CalledOnValidThread() const {
383 return BrowserThread::CurrentlyOn(BrowserThread::UI); 383 return BrowserThread::CurrentlyOn(BrowserThread::UI);
384 } 384 }
385 385
386 } // namespace content 386 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698