OLD | NEW |
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 "mojo/shell/android/mojo_main.h" | 5 #include "mojo/shell/android/mojo_main.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 NativeViewportServiceLoader() {} | 39 NativeViewportServiceLoader() {} |
40 virtual ~NativeViewportServiceLoader() {} | 40 virtual ~NativeViewportServiceLoader() {} |
41 | 41 |
42 private: | 42 private: |
43 virtual void LoadService(ServiceManager* manager, | 43 virtual void LoadService(ServiceManager* manager, |
44 const GURL& url, | 44 const GURL& url, |
45 ScopedShellHandle service_handle) OVERRIDE { | 45 ScopedShellHandle service_handle) OVERRIDE { |
46 app_.reset(CreateNativeViewportService(g_context.Get().get(), | 46 app_.reset(CreateNativeViewportService(g_context.Get().get(), |
47 service_handle.Pass())); | 47 service_handle.Pass())); |
48 } | 48 } |
| 49 |
| 50 virtual void OnServiceError(ServiceManager* manager, |
| 51 const GURL& url) OVERRIDE { |
| 52 } |
| 53 |
49 scoped_ptr<Application> app_; | 54 scoped_ptr<Application> app_; |
50 }; | 55 }; |
51 | 56 |
52 LazyInstance<scoped_ptr<NativeViewportServiceLoader> > | 57 LazyInstance<scoped_ptr<NativeViewportServiceLoader> > |
53 g_viewport_service_loader = LAZY_INSTANCE_INITIALIZER; | 58 g_viewport_service_loader = LAZY_INSTANCE_INITIALIZER; |
54 | 59 |
55 } // namspace | 60 } // namspace |
56 | 61 |
57 static void Init(JNIEnv* env, jclass clazz, jobject context) { | 62 static void Init(JNIEnv* env, jclass clazz, jobject context) { |
58 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context); | 63 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 105 |
101 g_context.Get().reset(shell_context); | 106 g_context.Get().reset(shell_context); |
102 shell::Run(shell_context); | 107 shell::Run(shell_context); |
103 } | 108 } |
104 | 109 |
105 bool RegisterMojoMain(JNIEnv* env) { | 110 bool RegisterMojoMain(JNIEnv* env) { |
106 return RegisterNativesImpl(env); | 111 return RegisterNativesImpl(env); |
107 } | 112 } |
108 | 113 |
109 } // namespace mojo | 114 } // namespace mojo |
OLD | NEW |