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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 | « components/url_matcher/url_matcher_factory.cc ('k') | content/app/android/content_main.cc » ('j') | no next file with comments »
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/app/android/child_process_service_impl.h" 5 #include "content/app/android/child_process_service_impl.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Overridden from GpuSurfaceLookup: 88 // Overridden from GpuSurfaceLookup:
89 gl::ScopedJavaSurface AcquireJavaSurface(int surface_id) override { 89 gl::ScopedJavaSurface AcquireJavaSurface(int surface_id) override {
90 JNIEnv* env = base::android::AttachCurrentThread(); 90 JNIEnv* env = base::android::AttachCurrentThread();
91 return gl::ScopedJavaSurface( 91 return gl::ScopedJavaSurface(
92 content::Java_ChildProcessServiceImpl_getViewSurface(env, service_impl_, 92 content::Java_ChildProcessServiceImpl_getViewSurface(env, service_impl_,
93 surface_id)); 93 surface_id));
94 } 94 }
95 95
96 private: 96 private:
97 friend struct base::DefaultLazyInstanceTraits<ChildProcessSurfaceManager>; 97 friend struct base::LazyInstanceTraitsBase<ChildProcessSurfaceManager>;
98 // The instance of org.chromium.content.app.ChildProcessServiceImpl. 98 // The instance of org.chromium.content.app.ChildProcessServiceImpl.
99 base::android::ScopedJavaGlobalRef<jobject> service_impl_; 99 base::android::ScopedJavaGlobalRef<jobject> service_impl_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(ChildProcessSurfaceManager); 101 DISALLOW_COPY_AND_ASSIGN(ChildProcessSurfaceManager);
102 }; 102 };
103 103
104 static base::LazyInstance<ChildProcessSurfaceManager>::Leaky 104 static base::LazyInstance<ChildProcessSurfaceManager>::Leaky
105 g_child_process_surface_manager = LAZY_INSTANCE_INITIALIZER; 105 g_child_process_surface_manager = LAZY_INSTANCE_INITIALIZER;
106 106
107 // Chrome actually uses the renderer code path for all of its child 107 // Chrome actually uses the renderer code path for all of its child
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 bool RegisterChildProcessServiceImpl(JNIEnv* env) { 187 bool RegisterChildProcessServiceImpl(JNIEnv* env) {
188 return RegisterNativesImpl(env); 188 return RegisterNativesImpl(env);
189 } 189 }
190 190
191 void ShutdownMainThread(JNIEnv* env, const JavaParamRef<jobject>& obj) { 191 void ShutdownMainThread(JNIEnv* env, const JavaParamRef<jobject>& obj) {
192 ChildThreadImpl::ShutdownThread(); 192 ChildThreadImpl::ShutdownThread();
193 } 193 }
194 194
195 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | content/app/android/content_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698