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

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

Issue 775313002: Tweak NSUserActivity forward declaration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused declarations Created 6 years 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 | « base/mac/sdk_forward_declarations.h ('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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 isEqualToString:NSUserActivityTypeBrowsingWeb]) { 1614 isEqualToString:NSUserActivityTypeBrowsingWeb]) {
1615 return NO; 1615 return NO;
1616 } 1616 }
1617 1617
1618 NSString* originString = base::mac::ObjCCast<NSString>( 1618 NSString* originString = base::mac::ObjCCast<NSString>(
1619 [userActivity.userInfo objectForKey:handoff::kOriginKey]); 1619 [userActivity.userInfo objectForKey:handoff::kOriginKey]);
1620 handoff::Origin origin = handoff::OriginFromString(originString); 1620 handoff::Origin origin = handoff::OriginFromString(originString);
1621 UMA_HISTOGRAM_ENUMERATION( 1621 UMA_HISTOGRAM_ENUMERATION(
1622 "OSX.Handoff.Origin", origin, handoff::ORIGIN_COUNT); 1622 "OSX.Handoff.Origin", origin, handoff::ORIGIN_COUNT);
1623 1623
1624 NSURL* url = userActivity.webPageURL; 1624 NSURL* url = userActivity.webpageURL;
1625 if (!url) 1625 if (!url)
1626 return NO; 1626 return NO;
1627 1627
1628 GURL gurl(base::SysNSStringToUTF8([url absoluteString])); 1628 GURL gurl(base::SysNSStringToUTF8([url absoluteString]));
1629 std::vector<GURL> gurlVector; 1629 std::vector<GURL> gurlVector;
1630 gurlVector.push_back(gurl); 1630 gurlVector.push_back(gurl);
1631 1631
1632 [self openUrlsReplacingNTP:gurlVector]; 1632 [self openUrlsReplacingNTP:gurlVector];
1633 return YES; 1633 return YES;
1634 } 1634 }
1635 1635
1636 - (void)application:(NSApplication*)application 1636 - (void)application:(NSApplication*)application
1637 didFailToContinueUserActivityWithType:(NSString*)userActivityType 1637 didFailToContinueUserActivityWithType:(NSString*)userActivityType
1638 error:(NSError*)error { 1638 error:(NSError*)error {
1639 } 1639 }
1640 1640
1641 @end // @implementation AppController 1641 @end // @implementation AppController
1642 1642
1643 //--------------------------------------------------------------------------- 1643 //---------------------------------------------------------------------------
1644 1644
1645 namespace app_controller_mac { 1645 namespace app_controller_mac {
1646 1646
1647 bool IsOpeningNewWindow() { 1647 bool IsOpeningNewWindow() {
1648 return g_is_opening_new_window; 1648 return g_is_opening_new_window;
1649 } 1649 }
1650 1650
1651 } // namespace app_controller_mac 1651 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « base/mac/sdk_forward_declarations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698