blob: da669945e63c98123c80a22a42a8ebcb3a7e0a8a [file] [log] [blame]
erikchen600f7962014-12-12 00:17:381// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_
6#define COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_
7
olivierrobin69709ac62017-01-06 10:11:568#import <Foundation/Foundation.h>
erikchen600f7962014-12-12 00:17:389
rohitraof5225f682016-11-08 23:44:2710#include "build/build_config.h"
erikchen569155732015-03-27 15:29:3811#include "components/handoff/handoff_utility.h"
erikchen600f7962014-12-12 00:17:3812#include "url/gurl.h"
13
14@class NSUserActivity;
15
rohitraof5225f682016-11-08 23:44:2716#if defined(OS_IOS)
17namespace user_prefs {
18class PrefRegistrySyncable;
19} // namespace user_prefs
20#endif
21
erikchen600f7962014-12-12 00:17:3822// Maintains all of the state relevant to the Handoff feature. Allows Chrome to
23// hand off the current active URL to other devices.
stkhapugin6e97ef0a2016-11-29 16:14:0224@interface HandoffManager : NSObject
erikchen600f7962014-12-12 00:17:3825
rohitraof5225f682016-11-08 23:44:2726#if defined(OS_IOS)
27// Registers preferences related to Handoff.
28+ (void)registerBrowserStatePrefs:(user_prefs::PrefRegistrySyncable*)registry;
29#endif
30
erikchen600f7962014-12-12 00:17:3831// The active URL is defined as the URL of the most recently accessed tab. This
32// method should be called any time the active URL might have changed. This
33// method is idempotent.
Nico Weber23f11eae2017-07-13 23:39:4134- (void)updateActiveURL:(const GURL&)url API_AVAILABLE(macos(10.10));
erikchen600f7962014-12-12 00:17:3835
36@end
37
Peter Collingbournefc74af32017-07-10 21:00:1838#if defined(OS_IOS)
rohitraof5225f682016-11-08 23:44:2739@interface HandoffManager (TestingOnly)
40- (NSURL*)userActivityWebpageURL;
41@end
Peter Collingbournefc74af32017-07-10 21:00:1842#endif
rohitraof5225f682016-11-08 23:44:2743
erikchen600f7962014-12-12 00:17:3844#endif // COMPONENTS_HANDOFF_HANDOFF_MANAGER_H_