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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java

Issue 1326593006: Add the Physical Web to Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an OWNERS file Created 5 years, 3 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: 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..bb29dda65c3959ca27c7439feeed64c00fe6405a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
@@ -0,0 +1,34 @@
+// 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;
+
aurimas (slooooooooow) 2015/09/10 17:09:04 Remove the extra line
cco3 2015/09/11 17:10:46 Done.
+
+/**
+ * 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");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698