OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/l10n_util_mac.h" | 8 #include "app/l10n_util_mac.h" |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 return; | 931 return; |
932 } | 932 } |
933 | 933 |
934 Browser* browser = BrowserList::GetLastActive(); | 934 Browser* browser = BrowserList::GetLastActive(); |
935 // if no browser window exists then create one with no tabs to be filled in | 935 // if no browser window exists then create one with no tabs to be filled in |
936 if (!browser) { | 936 if (!browser) { |
937 browser = Browser::Create([self defaultProfile]); | 937 browser = Browser::Create([self defaultProfile]); |
938 browser->window()->Show(); | 938 browser->window()->Show(); |
939 } | 939 } |
940 | 940 |
941 CommandLine dummy(CommandLine::ARGUMENTS_ONLY); | 941 CommandLine dummy(CommandLine::NO_PROGRAM); |
942 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); | 942 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); |
943 launch.OpenURLsInBrowser(browser, false, urls); | 943 launch.OpenURLsInBrowser(browser, false, urls); |
944 } | 944 } |
945 | 945 |
946 - (void)getUrl:(NSAppleEventDescriptor*)event | 946 - (void)getUrl:(NSAppleEventDescriptor*)event |
947 withReply:(NSAppleEventDescriptor*)reply { | 947 withReply:(NSAppleEventDescriptor*)reply { |
948 NSString* urlStr = [[event paramDescriptorForKeyword:keyDirectObject] | 948 NSString* urlStr = [[event paramDescriptorForKeyword:keyDirectObject] |
949 stringValue]; | 949 stringValue]; |
950 | 950 |
951 GURL gurl(base::SysNSStringToUTF8(urlStr)); | 951 GURL gurl(base::SysNSStringToUTF8(urlStr)); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 [appController showPreferencesWindow:nil page:page profile:profile]; | 1102 [appController showPreferencesWindow:nil page:page profile:profile]; |
1103 } | 1103 } |
1104 | 1104 |
1105 namespace app_controller_mac { | 1105 namespace app_controller_mac { |
1106 | 1106 |
1107 bool IsOpeningNewWindow() { | 1107 bool IsOpeningNewWindow() { |
1108 return g_is_opening_new_window; | 1108 return g_is_opening_new_window; |
1109 } | 1109 } |
1110 | 1110 |
1111 } // namespace app_controller_mac | 1111 } // namespace app_controller_mac |
OLD | NEW |