| OLD | NEW |
| 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 #include "components/handoff/handoff_manager.h" | 5 #include "components/handoff/handoff_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "build/build_config.h" |
| 9 #include "net/base/mac/url_conversions.h" | 10 #include "net/base/mac/url_conversions.h" |
| 10 | 11 |
| 11 #if defined(OS_IOS) | 12 #if defined(OS_IOS) |
| 12 #include "base/ios/ios_util.h" | 13 #include "base/ios/ios_util.h" |
| 13 #endif | 14 #endif |
| 14 | 15 |
| 15 #if defined(OS_MACOSX) && !defined(OS_IOS) | 16 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 16 #include "base/mac/mac_util.h" | 17 #include "base/mac/mac_util.h" |
| 17 #include "base/mac/sdk_forward_declarations.h" | 18 #include "base/mac/sdk_forward_declarations.h" |
| 18 #endif | 19 #endif |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 withObject:handoff::kChromeHandoffActivityType]; | 91 withObject:handoff::kChromeHandoffActivityType]; |
| 91 self.userActivity = base::scoped_nsobject<NSUserActivity>(userActivity); | 92 self.userActivity = base::scoped_nsobject<NSUserActivity>(userActivity); |
| 92 self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL); | 93 self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL); |
| 93 NSString* origin = handoff::StringFromOrigin(_origin); | 94 NSString* origin = handoff::StringFromOrigin(_origin); |
| 94 DCHECK(origin); | 95 DCHECK(origin); |
| 95 self.userActivity.userInfo = @{ handoff::kOriginKey : origin }; | 96 self.userActivity.userInfo = @{ handoff::kOriginKey : origin }; |
| 96 [self.userActivity becomeCurrent]; | 97 [self.userActivity becomeCurrent]; |
| 97 } | 98 } |
| 98 | 99 |
| 99 @end | 100 @end |
| OLD | NEW |