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

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

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run the later parts of startup as UI thread tasks - minor comment fixes Created 7 years, 5 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "android_startup_observer.h"
6
7 #include "jni/StartupObserver_jni.h"
8
9 namespace content {
10
11 AndroidStartupObserver::AndroidStartupObserver(jobject java_observer)
12 : java_observer_(java_observer) {}
13
14 void AndroidStartupObserver::AllTasksRun() {
15 JNIEnv* env = base::android::AttachCurrentThread();
16 Java_StartupObserver_allTasksRun(env, java_observer_);
17 }
18
19 bool AndroidStartupObserver::RegisterStartupObserver(JNIEnv* env) {
20 return RegisterNativesImpl(env);
21 }
22
23 AndroidStartupObserver::~AndroidStartupObserver() {
24 JNIEnv* env = base::android::AttachCurrentThread();
25 env->DeleteGlobalRef(java_observer_);
26 }
27
28 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698