OLD | NEW |
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/app/android/child_process_service.h" | 5 #include "content/app/android/child_process_service.h" |
6 | 6 |
7 #include <android/native_window_jni.h> | 7 #include <android/native_window_jni.h> |
8 #include <cpu-features.h> | 8 #include <cpu-features.h> |
9 | 9 |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 DCHECK(file_fds.size() == file_ids.size()); | 98 DCHECK(file_fds.size() == file_ids.size()); |
99 for (size_t i = 0; i < file_ids.size(); ++i) | 99 for (size_t i = 0; i < file_ids.size(); ++i) |
100 base::GlobalDescriptors::GetInstance()->Set(file_ids[i], file_fds[i]); | 100 base::GlobalDescriptors::GetInstance()->Set(file_ids[i], file_fds[i]); |
101 | 101 |
102 content::SurfaceTexturePeer::InitInstance( | 102 content::SurfaceTexturePeer::InitInstance( |
103 new SurfaceTexturePeerChildImpl(service)); | 103 new SurfaceTexturePeerChildImpl(service)); |
104 | 104 |
105 } | 105 } |
106 | 106 |
107 void QuitMainThreadMessageLoop() { | 107 void QuitMainThreadMessageLoop() { |
108 MessageLoop::current()->Quit(); | 108 base::MessageLoop::current()->Quit(); |
109 } | 109 } |
110 | 110 |
111 } // namespace <anonymous> | 111 } // namespace <anonymous> |
112 | 112 |
113 void InitChildProcess(JNIEnv* env, | 113 void InitChildProcess(JNIEnv* env, |
114 jclass clazz, | 114 jclass clazz, |
115 jobject context, | 115 jobject context, |
116 jobject service, | 116 jobject service, |
117 jintArray j_file_ids, | 117 jintArray j_file_ids, |
118 jintArray j_file_fds, | 118 jintArray j_file_fds, |
(...skipping 23 matching lines...) Expand all Loading... |
142 ChildProcess* current_process = ChildProcess::current(); | 142 ChildProcess* current_process = ChildProcess::current(); |
143 if (!current_process) | 143 if (!current_process) |
144 return; | 144 return; |
145 ChildThread* main_child_thread = current_process->main_thread(); | 145 ChildThread* main_child_thread = current_process->main_thread(); |
146 if (main_child_thread && main_child_thread->message_loop()) | 146 if (main_child_thread && main_child_thread->message_loop()) |
147 main_child_thread->message_loop()->PostTask(FROM_HERE, | 147 main_child_thread->message_loop()->PostTask(FROM_HERE, |
148 base::Bind(&QuitMainThreadMessageLoop)); | 148 base::Bind(&QuitMainThreadMessageLoop)); |
149 } | 149 } |
150 | 150 |
151 } // namespace content | 151 } // namespace content |
OLD | NEW |