Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java | 
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..4adeff9db1870cc847c85eaf3f0f6a61fb3eb232 | 
| --- /dev/null | 
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java | 
| @@ -0,0 +1,28 @@ | 
| +// 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 org.chromium.base.CommandLine; | 
| +import org.chromium.chrome.browser.ChromeApplication; | 
| +import org.chromium.chrome.browser.ChromeSwitches; | 
| +import org.chromium.chrome.browser.ChromeVersionInfo; | 
| + | 
| +/** | 
| + * This class provides the basic interface to the Physical Web feature. | 
| + */ | 
| +public class PhysicalWeb { | 
| + public static boolean featureIsEnabled() { | 
| + boolean allowedChannel = | 
| + ChromeVersionInfo.isLocalBuild() || ChromeVersionInfo.isDevBuild(); | 
| 
 
aurimas (slooooooooow)
2015/09/10 17:09:03
It seems like you are enabling this in Chrome Dev
 
cco3
2015/09/11 17:10:46
Is that a problem even though it's behind a flag?
 
 | 
| + boolean switchEnabled = | 
| + CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_PHYSICAL_WEB); | 
| + return allowedChannel && switchEnabled; | 
| + } | 
| + | 
| + public static void startPhysicalWeb(ChromeApplication application) { | 
| + PhysicalWebBleClient physicalWebBleClient = PhysicalWebBleClient.getInstance(application); | 
| + physicalWebBleClient.subscribe(); | 
| + } | 
| +} |