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

Side by Side Diff: components/handoff/handoff_manager.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_ 5 #ifndef COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_
6 #define COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_ 6 #define COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_
7 7
8 #include <Foundation/Foundation.h> 8 #include <Foundation/Foundation.h>
9 9
10 #include "base/mac/objc_property_releaser.h" 10 #include "base/mac/objc_property_releaser.h"
11 #include "build/build_config.h"
11 #include "components/handoff/handoff_utility.h" 12 #include "components/handoff/handoff_utility.h"
12 #include "url/gurl.h" 13 #include "url/gurl.h"
13 14
14 @class NSUserActivity; 15 @class NSUserActivity;
15 16
17 #if defined(OS_IOS)
18 namespace user_prefs {
19 class PrefRegistrySyncable;
20 } // namespace user_prefs
21 #endif
22
16 // Maintains all of the state relevant to the Handoff feature. Allows Chrome to 23 // Maintains all of the state relevant to the Handoff feature. Allows Chrome to
17 // hand off the current active URL to other devices. 24 // hand off the current active URL to other devices.
18 @interface HandoffManager : NSObject { 25 @interface HandoffManager : NSObject {
19 @private 26 @private
20 base::mac::ObjCPropertyReleaser _propertyReleaser_HandoffManager; 27 base::mac::ObjCPropertyReleaser _propertyReleaser_HandoffManager;
21 28
22 GURL _activeURL; 29 GURL _activeURL;
23 NSUserActivity* _userActivity; 30 NSUserActivity* _userActivity;
24 handoff::Origin _origin; 31 handoff::Origin _origin;
25 } 32 }
26 33
34 #if defined(OS_IOS)
35 // Registers preferences related to Handoff.
36 + (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry;
37 #endif
38
27 // The active URL is defined as the URL of the most recently accessed tab. This 39 // The active URL is defined as the URL of the most recently accessed tab. This
28 // method should be called any time the active URL might have changed. This 40 // method should be called any time the active URL might have changed. This
29 // method is idempotent. 41 // method is idempotent.
30 - (void)updateActiveURL:(const GURL&)url; 42 - (void)updateActiveURL:(const GURL&)url;
31 43
32 @end 44 @end
33 45
46 @interface HandoffManager (TestingOnly)
47 - (NSURL*)userActivityWebpageURL;
48 @end
49
34 #endif // COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_ 50 #endif // COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698