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

Side by Side Diff: shell/android/main.cc

Issue 1515543002: Close the shell when all activities are destroyed. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « shell/android/apk/src/org/chromium/mojo/shell/ShellService.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "shell/android/main.h" 5 #include "shell/android/main.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/android/fifo_utils.h" 9 #include "base/android/fifo_utils.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 FROM_HERE, base::Bind(&StartApplicationByURL, url)); 334 FROM_HERE, base::Bind(&StartApplicationByURL, url));
335 } 335 }
336 336
337 static void BindShell(JNIEnv* env, jclass clazz, jint shell_handle) { 337 static void BindShell(JNIEnv* env, jclass clazz, jint shell_handle) {
338 g_internal_data.Get().shell_task_runner->PostTask( 338 g_internal_data.Get().shell_task_runner->PostTask(
339 FROM_HERE, 339 FROM_HERE,
340 base::Bind(&BindShellImpl, base::Passed(mojo::ScopedMessagePipeHandle( 340 base::Bind(&BindShellImpl, base::Passed(mojo::ScopedMessagePipeHandle(
341 mojo::MessagePipeHandle(shell_handle))))); 341 mojo::MessagePipeHandle(shell_handle)))));
342 } 342 }
343 343
344 static void QuitShell(JNIEnv* env, jclass jcaller) {
345 g_internal_data.Get().shell_task_runner->PostTask(
346 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
347 }
348
344 bool RegisterShellService(JNIEnv* env) { 349 bool RegisterShellService(JNIEnv* env) {
345 return RegisterNativesImpl(env); 350 return RegisterNativesImpl(env);
346 } 351 }
347 352
348 } // namespace shell 353 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/apk/src/org/chromium/mojo/shell/ShellService.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698