OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.mojo.shell; | 5 package org.chromium.mojo.shell; |
6 | 6 |
7 import org.chromium.base.CalledByNative; | 7 import org.chromium.base.CalledByNative; |
8 import org.chromium.base.JNINamespace; | 8 import org.chromium.base.JNINamespace; |
9 import org.chromium.mojo.application.ApplicationConnection; | 9 import org.chromium.mojo.application.ApplicationConnection; |
10 import org.chromium.mojo.application.ApplicationDelegate; | 10 import org.chromium.mojo.application.ApplicationDelegate; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 private static JavaApplicationRegistry create() { | 76 private static JavaApplicationRegistry create() { |
77 JavaApplicationRegistry registry = new JavaApplicationRegistry(); | 77 JavaApplicationRegistry registry = new JavaApplicationRegistry(); |
78 // Register services. | 78 // Register services. |
79 registry.registerApplicationDelegate("mojo:keyboard", | 79 registry.registerApplicationDelegate("mojo:keyboard", |
80 new ServiceProviderFactoryApplicationDelegate(new KeyboardFactor
y())); | 80 new ServiceProviderFactoryApplicationDelegate(new KeyboardFactor
y())); |
81 registry.registerApplicationDelegate( | 81 registry.registerApplicationDelegate( |
82 "mojo:intent_receiver", new ServiceProviderFactoryApplicationDel
egate( | 82 "mojo:intent_receiver", new ServiceProviderFactoryApplicationDel
egate( |
83 IntentReceiverRegistry.getInstan
ce())); | 83 IntentReceiverRegistry.getInstan
ce())); |
84 registry.registerApplicationDelegate("mojo:nfc", new NfcApplicationDeleg
ate()); | 84 registry.registerApplicationDelegate("mojo:nfc", new NfcApplicationDeleg
ate()); |
85 registry.registerApplicationDelegate("mojo:sharing", new SharingApplicat
ionDelegate()); | 85 registry.registerApplicationDelegate("mojo:sharing", new SharingApplicat
ionDelegate()); |
| 86 registry.registerApplicationDelegate( |
| 87 "mojo:native_viewport_support", new NativeViewportSupportApplica
tionDelegate()); |
86 return registry; | 88 return registry; |
87 } | 89 } |
88 | 90 |
89 static class ServiceProviderFactoryApplicationDelegate implements Applicatio
nDelegate { | 91 static class ServiceProviderFactoryApplicationDelegate implements Applicatio
nDelegate { |
90 private final ServiceFactoryBinder<?> mBinder; | 92 private final ServiceFactoryBinder<?> mBinder; |
91 | 93 |
92 ServiceProviderFactoryApplicationDelegate(ServiceFactoryBinder<?> binder
) { | 94 ServiceProviderFactoryApplicationDelegate(ServiceFactoryBinder<?> binder
) { |
93 mBinder = binder; | 95 mBinder = binder; |
94 } | 96 } |
95 | 97 |
(...skipping 12 matching lines...) Expand all Loading... |
108 return true; | 110 return true; |
109 } | 111 } |
110 | 112 |
111 /** | 113 /** |
112 * @see ApplicationDelegate#quit() | 114 * @see ApplicationDelegate#quit() |
113 */ | 115 */ |
114 @Override | 116 @Override |
115 public void quit() {} | 117 public void quit() {} |
116 } | 118 } |
117 } | 119 } |
OLD | NEW |