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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ContentApplication.java

Issue 141533006: [Android] Move the java content/ package to content_public/ to start the split. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small fixes and findbugs line update Created 6 years, 11 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
Index: content/public/android/java/src/org/chromium/content/app/ContentApplication.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ContentApplication.java b/content/public/android/java/src/org/chromium/content/app/ContentApplication.java
deleted file mode 100644
index e0f49a9d92976e9aa0c9a085e146be87f260312d..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/app/ContentApplication.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 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.chromium.content.app;
-
-import android.os.Looper;
-import android.os.MessageQueue;
-
-import org.chromium.base.BaseChromiumApplication;
-import org.chromium.content.browser.TracingControllerAndroid;
-
-/**
- * Basic application functionality that should be shared among all browser applications
- * based on the content layer.
- */
-public class ContentApplication extends BaseChromiumApplication {
- private TracingControllerAndroid mTracingController;
-
- TracingControllerAndroid getTracingController() {
- if (mTracingController == null) {
- mTracingController = new TracingControllerAndroid(this);
- }
- return mTracingController;
- }
-
- @Override
- public void onCreate() {
- super.onCreate();
-
- // Delay TracingControllerAndroid.registerReceiver() until the main loop is idle.
- Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
- @Override
- public boolean queueIdle() {
- // Will retry if the native library has not been initialized.
- if (!LibraryLoader.isInitialized()) return true;
-
- try {
- getTracingController().registerReceiver(ContentApplication.this);
- } catch (SecurityException e) {
- // Happens if the process is isolated. Ignore.
- }
- // Remove the idle handler.
- return false;
- }
- });
- }
-
- /**
- * For emulated process environment only. On a production device, the application process is
- * simply killed without calling this method. We don't need to unregister the broadcast
- * receiver in the latter case.
- */
- @Override
- public void onTerminate() {
- try {
- getTracingController().unregisterReceiver(this);
- } catch (SecurityException e) {
- // Happens if the process is isolated. Ignore.
- }
-
- super.onTerminate();
- }
-
-}

Powered by Google App Engine
This is Rietveld 408576698