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

Unified Diff: blimp/client/core/settings/android/java/src/org/chromium/blimp/core/settings/SettingsObserverProxy.java

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 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: blimp/client/core/settings/android/java/src/org/chromium/blimp/core/settings/SettingsObserverProxy.java
diff --git a/blimp/client/core/settings/android/java/src/org/chromium/blimp/core/settings/SettingsObserverProxy.java b/blimp/client/core/settings/android/java/src/org/chromium/blimp/core/settings/SettingsObserverProxy.java
deleted file mode 100644
index c36afee791a42419462cfd5c2bff41543411c438..0000000000000000000000000000000000000000
--- a/blimp/client/core/settings/android/java/src/org/chromium/blimp/core/settings/SettingsObserverProxy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2016 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.blimp.core.settings;
-
-import org.chromium.base.ObserverList;
-import org.chromium.base.annotations.CalledByNative;
-import org.chromium.base.annotations.JNINamespace;
-
-/**
- * Serves as a compound observer proxy for dispatching SettingsObserver callbacks, avoiding
- * redundant JNI-related work when there are multiple Java-based observers.
- */
-@JNINamespace("blimp::client")
-class SettingsObserverProxy implements SettingsObserver {
- private final ObserverList<SettingsObserver> mObservers = new ObserverList<>();
-
- private long mNativeSettingsObserverProxy;
-
- SettingsObserverProxy(Settings settings) {
- mNativeSettingsObserverProxy = nativeInit(settings);
- }
-
- void destroy() {
- if (mNativeSettingsObserverProxy != 0) {
- nativeDestroy(mNativeSettingsObserverProxy);
- mNativeSettingsObserverProxy = 0;
- }
- mObservers.clear();
- }
-
- void addObserver(SettingsObserver observer) {
- assert mNativeSettingsObserverProxy != 0;
- mObservers.addObserver(observer);
- }
-
- void removeObserver(SettingsObserver observer) {
- mObservers.removeObserver(observer);
- }
-
- @Override
- @CalledByNative
- public void onBlimpModeEnabled(boolean enable) {
- for (SettingsObserver observer : mObservers) {
- observer.onBlimpModeEnabled(enable);
- }
- }
-
- @Override
- @CalledByNative
- public void onShowNetworkStatsChanged(boolean enable) {
- for (SettingsObserver observer : mObservers) {
- observer.onShowNetworkStatsChanged(enable);
- }
- }
-
- @Override
- @CalledByNative
- public void onRecordWholeDocumentChanged(boolean enable) {
- for (SettingsObserver observer : mObservers) {
- observer.onRecordWholeDocumentChanged(enable);
- }
- }
-
- @Override
- @CalledByNative
- public void onRestartRequired() {
- for (SettingsObserver observer : mObservers) {
- observer.onRestartRequired();
- }
- }
-
- private native long nativeInit(Settings settings);
- private native void nativeDestroy(long nativeSettingsObserverProxy);
-}

Powered by Google App Engine
This is Rietveld 408576698