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

Side by Side Diff: mojo/shell/android/mojo_main.cc

Issue 213313004: Add creation of ServiceManager to Content (2nd try) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shell_client to mojo_pepper_container_app Created 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/service_manager/service_manager_unittest.cc ('k') | mojo/shell/dynamic_service_loader.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « mojo/service_manager/service_manager_unittest.cc ('k') | mojo/shell/dynamic_service_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698