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

Side by Side Diff: content/browser/android/content_view_render_view.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
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/browser/android/content_view_render_view.h" 5 #include "content/browser/android/content_view_render_view.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void ContentViewRenderView::SurfaceSetSize( 70 void ContentViewRenderView::SurfaceSetSize(
71 JNIEnv* env, jobject obj, jint width, jint height) { 71 JNIEnv* env, jobject obj, jint width, jint height) {
72 compositor_->SetWindowBounds(gfx::Size(width, height)); 72 compositor_->SetWindowBounds(gfx::Size(width, height));
73 } 73 }
74 74
75 void ContentViewRenderView::ScheduleComposite() { 75 void ContentViewRenderView::ScheduleComposite() {
76 if (scheduled_composite_) 76 if (scheduled_composite_)
77 return; 77 return;
78 78
79 scheduled_composite_ = true; 79 scheduled_composite_ = true;
80 MessageLoop::current()->PostTask( 80 base::MessageLoop::current()->PostTask(
81 FROM_HERE, 81 FROM_HERE,
82 base::Bind(&ContentViewRenderView::Composite, 82 base::Bind(&ContentViewRenderView::Composite,
83 weak_factory_.GetWeakPtr())); 83 weak_factory_.GetWeakPtr()));
84 } 84 }
85 85
86 void ContentViewRenderView::InitCompositor() { 86 void ContentViewRenderView::InitCompositor() {
87 if (!compositor_) 87 if (!compositor_)
88 compositor_.reset(Compositor::Create(this)); 88 compositor_.reset(Compositor::Create(this));
89 } 89 }
90 90
91 void ContentViewRenderView::Composite() { 91 void ContentViewRenderView::Composite() {
92 if (!compositor_) 92 if (!compositor_)
93 return; 93 return;
94 94
95 scheduled_composite_ = false; 95 scheduled_composite_ = false;
96 compositor_->Composite(); 96 compositor_->Composite();
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/app/android/child_process_service.cc ('k') | content/browser/appcache/chrome_appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698