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

Unified Diff: ios/chrome/browser/device_sharing/handoff_manager.h

Issue 2484703003: [ios] Adds code to support the iOS Handoff feature. (Closed)
Patch Set: Fixes. Created 4 years, 1 month 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: ios/chrome/browser/device_sharing/handoff_manager.h
diff --git a/ios/chrome/browser/device_sharing/handoff_manager.h b/ios/chrome/browser/device_sharing/handoff_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..163be3451880818c6d468b3f474b031af2de2bf2
--- /dev/null
+++ b/ios/chrome/browser/device_sharing/handoff_manager.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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.
+
+#ifndef IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_H_
+#define IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_H_
+
+#include <Foundation/Foundation.h>
+
+class GURL;
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+} // namespace user_prefs
+
+// Maintains all of the state relevant to the Handoff feature. Allows Chrome to
+// hand off the current active URL to the default browser of other devices.
+@interface HandoffManager : NSObject
erikchen 2016/11/07 19:02:58 isn't there already a HandoffManager? components/
rohitrao (ping after 24h) 2016/11/08 02:19:42 Acknowledged.
+
+// Registers preferences related to Handoff.
++ (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry;
+
+// The active URL is defined as the URL of the most recently accessed tab. This
+// method should be called any time the active URL might have changed. This
+// method is idempotent.
+- (void)updateActiveURL:(const GURL&)url;
+
+@end
+
+@interface HandoffManager (TestingOnly)
+- (NSURL*)userActivityWebpageURL;
+@end
+
+#endif // IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698