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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 481563002: Mac: Support default browser Handoff in Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary function parameter name. Created 6 years, 4 months 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
« no previous file with comments | « chrome/app/app-Info.plist ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "apps/app_shim/extension_app_shim_handler_mac.h" 7 #include "apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 [self performSelector:@selector(delayedScreenParametersUpdate) 1539 [self performSelector:@selector(delayedScreenParametersUpdate)
1540 withObject:nil 1540 withObject:nil
1541 afterDelay:0]; 1541 afterDelay:0];
1542 } 1542 }
1543 1543
1544 - (void)delayedScreenParametersUpdate { 1544 - (void)delayedScreenParametersUpdate {
1545 FOR_EACH_OBSERVER(ui::WorkAreaWatcherObserver, workAreaChangeObservers_, 1545 FOR_EACH_OBSERVER(ui::WorkAreaWatcherObserver, workAreaChangeObservers_,
1546 WorkAreaChanged()); 1546 WorkAreaChanged());
1547 } 1547 }
1548 1548
1549 - (BOOL)application:(NSApplication*)application
1550 willContinueUserActivityWithType:(NSString*)userActivityType {
1551 return ([userActivityType isEqualToString:NSUserActivityTypeBrowsingWeb]);
Nico 2014/08/18 18:36:18 remove pointless parens around this
erikchen 2014/08/18 18:47:57 Done.
1552 }
1553
1554 - (BOOL)application:(NSApplication*)application
1555 continueUserActivity:(NSUserActivity*)userActivity
1556 restorationHandler:(void (^)(NSArray*))restorationHandler {
1557 if (![userActivity.activityType
1558 isEqualToString:NSUserActivityTypeBrowsingWeb]) {
1559 return NO;
1560 }
1561
1562 NSURL* url = userActivity.webPageURL;
1563 if (!url)
1564 return NO;
1565
1566 GURL gurl(base::SysNSStringToUTF8([url absoluteString]));
1567 std::vector<GURL> gurlVector;
1568 gurlVector.push_back(gurl);
1569
1570 [self openUrls:gurlVector];
1571 return YES;
1572 }
1573
1574 - (void)application:(NSApplication*)application
1575 didFailToContinueUserActivityWithType:(NSString*)userActivityType
1576 error:(NSError*)error {
1577 }
1578
1549 @end // @implementation AppController 1579 @end // @implementation AppController
1550 1580
1551 //--------------------------------------------------------------------------- 1581 //---------------------------------------------------------------------------
1552 1582
1553 namespace app_controller_mac { 1583 namespace app_controller_mac {
1554 1584
1555 bool IsOpeningNewWindow() { 1585 bool IsOpeningNewWindow() {
1556 return g_is_opening_new_window; 1586 return g_is_opening_new_window;
1557 } 1587 }
1558 1588
1559 } // namespace app_controller_mac 1589 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/app-Info.plist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698