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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentSettings.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/browser/ContentSettings.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
deleted file mode 100644
index f8f09427c59e27227b0fc5be37647eac781ab39e..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2012 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.browser;
-
-import org.chromium.base.CalledByNative;
-import org.chromium.base.JNINamespace;
-import org.chromium.base.ThreadUtils;
-
-/**
- * Manages settings state for a ContentView. A ContentSettings instance is obtained
- * from ContentViewCore.getContentSettings().
- */
-@JNINamespace("content")
-public class ContentSettings {
-
- private static final String TAG = "ContentSettings";
-
- // The native side of this object. Ownership is retained native-side by the WebContents
- // instance that backs the associated ContentViewCore.
- private long mNativeContentSettings = 0;
-
- private ContentViewCore mContentViewCore;
-
- /**
- * Package constructor to prevent clients from creating a new settings
- * instance. Must be called on the UI thread.
- */
- ContentSettings(ContentViewCore contentViewCore, long nativeContentView) {
- ThreadUtils.assertOnUiThread();
- mContentViewCore = contentViewCore;
- mNativeContentSettings = nativeInit(nativeContentView);
- assert mNativeContentSettings != 0;
- }
-
- /**
- * Notification from the native side that it is being destroyed.
- * @param nativeContentSettings the native instance that is going away.
- */
- @CalledByNative
- private void onNativeContentSettingsDestroyed(int nativeContentSettings) {
- assert mNativeContentSettings == nativeContentSettings;
- mNativeContentSettings = 0;
- }
-
- /**
- * Return true if JavaScript is enabled. Must be called on the UI thread.
- *
- * @return True if JavaScript is enabled.
- */
- public boolean getJavaScriptEnabled() {
- ThreadUtils.assertOnUiThread();
- return mNativeContentSettings != 0 ?
- nativeGetJavaScriptEnabled(mNativeContentSettings) : false;
- }
-
- // Initialize the ContentSettings native side.
- private native long nativeInit(long contentViewPtr);
-
- private native boolean nativeGetJavaScriptEnabled(long nativeContentSettings);
-}

Powered by Google App Engine
This is Rietveld 408576698