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

Unified Diff: sky/shell/org/domokit/sky/shell/SkyApplication.java

Issue 1139873004: Make android directory for Android-specific bits of SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/shell/org/domokit/sky/shell/SkyActivity.java ('k') | sky/shell/org/domokit/sky/shell/SkyMain.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/org/domokit/sky/shell/SkyApplication.java
diff --git a/sky/shell/org/domokit/sky/shell/SkyApplication.java b/sky/shell/org/domokit/sky/shell/SkyApplication.java
deleted file mode 100644
index 0fd9294b30760d9b2895327840fa1e632b4224a7..0000000000000000000000000000000000000000
--- a/sky/shell/org/domokit/sky/shell/SkyApplication.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.domokit.sky.shell;
-
-import android.content.Context;
-import android.util.Log;
-
-import org.chromium.base.BaseChromiumApplication;
-import org.chromium.base.PathUtils;
-import org.chromium.base.ResourceExtractor;
-import org.chromium.base.library_loader.LibraryLoader;
-import org.chromium.base.library_loader.LibraryProcessType;
-import org.chromium.base.library_loader.ProcessInitException;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
-import org.chromium.mojom.mojo.NetworkService;
-import org.domokit.oknet.NetworkServiceImpl;
-
-/**
- * Sky implementation of {@link android.app.Application}, managing application-level global
- * state and initializations.
- */
-public class SkyApplication extends BaseChromiumApplication {
- private static final String TAG = "SkyApplication";
- private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "sky_shell";
- private static final String[] SKY_MANDATORY_PAKS = {
- "icudtl.dat",
- };
-
- @Override
- public void onCreate() {
- super.onCreate();
- initializeJavaUtils();
- initializeNative();
- initializeServiceRegistry();
- ResourceExtractor.setMandatoryPaksToExtract(SKY_MANDATORY_PAKS);
- }
-
- private void initializeJavaUtils() {
- PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, getApplicationContext());
- }
-
- private void initializeNative() {
- try {
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized();
- } catch (ProcessInitException e) {
- Log.e(TAG, "sky_shell initialization failed.", e);
- throw new RuntimeException(e);
- }
- }
-
- private void initializeServiceRegistry() {
- ServiceRegistry.SHARED.register(NetworkService.MANAGER.getName(), new ServiceFactory() {
- public void connectToService(Context context, Core core, MessagePipeHandle pipe) {
- new NetworkServiceImpl(context, core, pipe);
- }
- });
- }
-}
« no previous file with comments | « sky/shell/org/domokit/sky/shell/SkyActivity.java ('k') | sky/shell/org/domokit/sky/shell/SkyMain.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698