OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import "ios/chrome/app/application_delegate/user_activity_handler.h" | 5 #import "ios/chrome/app/application_delegate/user_activity_handler.h" |
6 | 6 |
7 #import <CoreSpotlight/CoreSpotlight.h> | 7 #import <CoreSpotlight/CoreSpotlight.h> |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "base/ios/block_types.h" | 10 #include "base/ios/block_types.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 return YES; | 274 return YES; |
275 | 275 |
276 } else if ([shortcutItem.type isEqualToString:kShortcutVoiceSearch]) { | 276 } else if ([shortcutItem.type isEqualToString:kShortcutVoiceSearch]) { |
277 base::RecordAction( | 277 base::RecordAction( |
278 UserMetricsAction("ApplicationShortcut.VoiceSearchPressed")); | 278 UserMetricsAction("ApplicationShortcut.VoiceSearchPressed")); |
279 [startupParams setLaunchVoiceSearch:YES]; | 279 [startupParams setLaunchVoiceSearch:YES]; |
280 [startupInformation setStartupParameters:startupParams]; | 280 [startupInformation setStartupParameters:startupParams]; |
281 return YES; | 281 return YES; |
282 | 282 |
283 } else if ([shortcutItem.type isEqualToString:kShortcutQRScanner]) { | 283 } else if ([shortcutItem.type isEqualToString:kShortcutQRScanner]) { |
284 if (experimental_flags::IsQRCodeReaderEnabled()) { | 284 base::RecordAction( |
285 base::RecordAction( | 285 UserMetricsAction("ApplicationShortcut.ScanQRCodePressed")); |
286 UserMetricsAction("ApplicationShortcut.ScanQRCodePressed")); | 286 [startupParams setLaunchQRScanner:YES]; |
287 [startupParams setLaunchQRScanner:YES]; | |
288 } | |
289 [startupInformation setStartupParameters:startupParams]; | 287 [startupInformation setStartupParameters:startupParams]; |
290 return YES; | 288 return YES; |
291 } | 289 } |
292 | 290 |
293 NOTREACHED(); | 291 NOTREACHED(); |
294 return NO; | 292 return NO; |
295 } | 293 } |
296 | 294 |
297 + (void)routeU2FURL:(const GURL&)URL | 295 + (void)routeU2FURL:(const GURL&)URL |
298 browserViewInformation:(id<BrowserViewInformation>)browserViewInformation { | 296 browserViewInformation:(id<BrowserViewInformation>)browserViewInformation { |
(...skipping 13 matching lines...) Expand all Loading... |
312 for (Tab* tab in tabModel) { | 310 for (Tab* tab in tabModel) { |
313 if ([tab.tabId isEqualToString:tabID]) { | 311 if ([tab.tabId isEqualToString:tabID]) { |
314 [tab evaluateU2FResultFromURL:URL]; | 312 [tab evaluateU2FResultFromURL:URL]; |
315 return; | 313 return; |
316 } | 314 } |
317 } | 315 } |
318 } | 316 } |
319 } | 317 } |
320 | 318 |
321 @end | 319 @end |
OLD | NEW |