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

Side by Side Diff: content/app/android/library_loader_hooks.cc

Issue 10823094: Add bitmap utils for Chrome on Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include fixes from downstream Created 8 years, 4 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
« no previous file with comments | « no previous file | ui/gfx/android/bitmap_android.h » ('j') | ui/gfx/android/bitmap_android.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/public/app/android_library_loader_hooks.h" 5 #include "content/public/app/android_library_loader_hooks.h"
6 6
7 #include "base/android/base_jni_registrar.h" 7 #include "base/android/base_jni_registrar.h"
8 #include "base/android/jni_registrar.h" 8 #include "base/android/jni_registrar.h"
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/at_exit.h" 11 #include "base/at_exit.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/debug/trace_event.h" 13 #include "base/debug/trace_event.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/string_tokenizer.h" 17 #include "base/string_tokenizer.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 #include "base/tracked_objects.h" 19 #include "base/tracked_objects.h"
20 #include "content/app/android/app_jni_registrar.h" 20 #include "content/app/android/app_jni_registrar.h"
21 #include "content/browser/android/browser_jni_registrar.h" 21 #include "content/browser/android/browser_jni_registrar.h"
22 #include "content/common/android/common_jni_registrar.h" 22 #include "content/common/android/common_jni_registrar.h"
23 #include "content/common/android/command_line.h" 23 #include "content/common/android/command_line.h"
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "media/base/android/media_jni_registrar.h" 25 #include "media/base/android/media_jni_registrar.h"
26 #include "net/android/net_jni_registrar.h" 26 #include "net/android/net_jni_registrar.h"
27 #include "jni/LibraryLoader_jni.h" 27 #include "jni/LibraryLoader_jni.h"
28 #include "ui/gfx/android/gfx_jni_registrar.h"
28 29
29 namespace { 30 namespace {
30 base::AtExitManager* g_at_exit_manager = NULL; 31 base::AtExitManager* g_at_exit_manager = NULL;
31 } 32 }
32 33
33 namespace content { 34 namespace content {
34 35
35 static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz, 36 static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
36 jobjectArray init_command_line) { 37 jobjectArray init_command_line) {
37 InitNativeCommandLineFromJavaArray(env, init_command_line); 38 InitNativeCommandLineFromJavaArray(env, init_command_line);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 71
71 if (!content::android::RegisterBrowserJni(env)) 72 if (!content::android::RegisterBrowserJni(env))
72 return JNI_FALSE; 73 return JNI_FALSE;
73 74
74 if (!content::android::RegisterAppJni(env)) 75 if (!content::android::RegisterAppJni(env))
75 return JNI_FALSE; 76 return JNI_FALSE;
76 77
77 if (!media::RegisterJni(env)) 78 if (!media::RegisterJni(env))
78 return JNI_FALSE; 79 return JNI_FALSE;
79 80
81 if (!gfx::RegisterJni(env))
82 return JNI_FALSE;
83
80 return JNI_TRUE; 84 return JNI_TRUE;
81 } 85 }
82 86
83 void LibraryLoaderExitHook() { 87 void LibraryLoaderExitHook() {
84 if (g_at_exit_manager) { 88 if (g_at_exit_manager) {
85 delete g_at_exit_manager; 89 delete g_at_exit_manager;
86 g_at_exit_manager = NULL; 90 g_at_exit_manager = NULL;
87 } 91 }
88 } 92 }
89 93
90 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { 94 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
91 // We need the AtExitManager to be created at the very beginning. 95 // We need the AtExitManager to be created at the very beginning.
92 g_at_exit_manager = new base::AtExitManager(); 96 g_at_exit_manager = new base::AtExitManager();
93 97
94 return RegisterNativesImpl(env); 98 return RegisterNativesImpl(env);
95 } 99 }
96 100
97 } // namespace content 101 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/android/bitmap_android.h » ('j') | ui/gfx/android/bitmap_android.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698