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

Unified Diff: components/handoff/handoff_manager.mm

Issue 2484703003: [ios] Adds code to support the iOS Handoff feature. (Closed)
Patch Set: Review. 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
« no previous file with comments | « components/handoff/handoff_manager.h ('k') | components/handoff/pref_names_ios.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/handoff/handoff_manager.mm
diff --git a/components/handoff/handoff_manager.mm b/components/handoff/handoff_manager.mm
index 23a557dce71ee0e47053d0c6841091ac9c108041..8434d7a1b1a626eaf0f463c836dde4df25c3a84c 100644
--- a/components/handoff/handoff_manager.mm
+++ b/components/handoff/handoff_manager.mm
@@ -6,11 +6,12 @@
#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"
-#include "build/build_config.h"
#include "net/base/mac/url_conversions.h"
#if defined(OS_IOS)
#include "base/ios/ios_util.h"
+#include "components/handoff/pref_names_ios.h"
+#include "components/pref_registry/pref_registry_syncable.h" // nogncheck
gab 2016/11/08 21:26:22 What does // nogncheck do?
rohitrao (ping after 24h) 2016/11/08 23:39:33 The pref_registry dependency is added conditionall
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
@@ -35,6 +36,14 @@
@synthesize userActivity = _userActivity;
+#if defined(OS_IOS)
++ (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry {
+ registry->RegisterBooleanPref(
+ prefs::kIosHandoffToOtherDevices, true,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+}
+#endif
+
- (instancetype)init {
self = [super init];
if (self) {
@@ -98,3 +107,11 @@
}
@end
+
+@implementation HandoffManager (TestingOnly)
+
+- (NSURL*)userActivityWebpageURL {
+ return self.userActivity.webpageURL;
+}
+
+@end
« no previous file with comments | « components/handoff/handoff_manager.h ('k') | components/handoff/pref_names_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698