OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 } | 1635 } |
1636 | 1636 |
1637 - (void)application:(NSApplication*)application | 1637 - (void)application:(NSApplication*)application |
1638 didFailToContinueUserActivityWithType:(NSString*)userActivityType | 1638 didFailToContinueUserActivityWithType:(NSString*)userActivityType |
1639 error:(NSError*)error { | 1639 error:(NSError*)error { |
1640 } | 1640 } |
1641 | 1641 |
1642 #pragma mark - Handoff Manager | 1642 #pragma mark - Handoff Manager |
1643 | 1643 |
1644 - (BOOL)shouldUseHandoff { | 1644 - (BOOL)shouldUseHandoff { |
1645 return base::mac::IsOSYosemiteOrLater(); | 1645 return base::mac::IsAtLeastOS10_10(); |
1646 } | 1646 } |
1647 | 1647 |
1648 - (void)passURLToHandoffManager:(const GURL&)handoffURL { | 1648 - (void)passURLToHandoffManager:(const GURL&)handoffURL { |
1649 [handoffManager_ updateActiveURL:handoffURL]; | 1649 [handoffManager_ updateActiveURL:handoffURL]; |
1650 } | 1650 } |
1651 | 1651 |
1652 - (void)updateHandoffManager:(content::WebContents*)webContents { | 1652 - (void)updateHandoffManager:(content::WebContents*)webContents { |
1653 if (![self shouldUseHandoff]) | 1653 if (![self shouldUseHandoff]) |
1654 return; | 1654 return; |
1655 | 1655 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 | 1690 |
1691 //--------------------------------------------------------------------------- | 1691 //--------------------------------------------------------------------------- |
1692 | 1692 |
1693 namespace app_controller_mac { | 1693 namespace app_controller_mac { |
1694 | 1694 |
1695 bool IsOpeningNewWindow() { | 1695 bool IsOpeningNewWindow() { |
1696 return g_is_opening_new_window; | 1696 return g_is_opening_new_window; |
1697 } | 1697 } |
1698 | 1698 |
1699 } // namespace app_controller_mac | 1699 } // namespace app_controller_mac |
OLD | NEW |