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

Side by Side Diff: ios/chrome/browser/device_sharing/device_sharing_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 IOS_CHROME_BROWSER_DEVICE_SHARING_DEVICE_SHARING_MANAGER_H_
6 #define IOS_CHROME_BROWSER_DEVICE_SHARING_DEVICE_SHARING_MANAGER_H_
7
8 #import <Foundation/Foundation.h>
9
10 class GURL;
11 @class HandoffManager;
12
13 namespace ios {
14 class ChromeBrowserState;
15 }
16
17 // This manager maintains all state related to sharing the active URL to other
18 // devices. It has the role of a dispatcher that shares the active URL to
19 // various internal sharing services (e.g. handoff).
20 @interface DeviceSharingManager : NSObject
21
22 // Updates the internal browser state to |browserState|.
23 // If the browser state is already |browserState|, then this is a no-op.
24 // Otherwise, this method cleans up the active URL and updates the internal
25 // state to reflect the new browser state.
26 //
27 // Note that this method keep a weak reference to |browserState|. It
28 // expects its owner to clear the browser state via a call to
29 // |-updateBrowserState:NULL| before |browserState| is destroyed.
erikchen 2016/11/07 22:02:08 s/NULL/nullptr
rohitrao (ping after 24h) 2016/11/08 02:19:42 Done.
30 //
31 // |browserState| must not be off the record.
32 - (void)updateBrowserState:(ios::ChromeBrowserState*)browserState;
33
34 // Updates the active URL to be shared with other devices. This method is
35 // a no-op if the active browser state was never set previously.
36 - (void)updateActiveURL:(const GURL&)activeURL;
37
38 @end
39
40 @interface DeviceSharingManager (TestingOnly)
41
42 // Exposing Handoff feature for testing.
43 @property(nonatomic, readonly) HandoffManager* handoffManager;
44
45 @end
46
47 #endif // IOS_CHROME_BROWSER_DEVICE_SHARING_DEVICE_SHARING_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698