| Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..31e25ad9d80056e0058e6e6238a58a1f92afc755
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
|
| @@ -0,0 +1,33 @@
|
| +// 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.chromium.chrome.browser.physicalweb;
|
| +
|
| +import android.app.Application;
|
| +
|
| +import org.chromium.base.Log;
|
| +import org.chromium.chrome.browser.ChromeApplication;
|
| +
|
| +import java.util.concurrent.atomic.AtomicReference;
|
| +
|
| +/**
|
| + * This class provides the basic interface to the Physical Web feature.
|
| + */
|
| +public class PhysicalWebBleClient {
|
| + private static AtomicReference<PhysicalWebBleClient> sInstance =
|
| + new AtomicReference<PhysicalWebBleClient>();
|
| + private static final String TAG = "cr.PhysicalWeb";
|
| +
|
| + public static PhysicalWebBleClient getInstance(Application application) {
|
| + if (sInstance.get() == null) {
|
| + ChromeApplication chromeApplication = (ChromeApplication) application;
|
| + sInstance.compareAndSet(null, chromeApplication.createPhysicalWebBleClient());
|
| + }
|
| + return sInstance.get();
|
| + }
|
| +
|
| + void subscribe() {
|
| + Log.d(TAG, "subscribing in empty client");
|
| + }
|
| +}
|
|
|