OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 521 |
522 startupComplete_ = YES; | 522 startupComplete_ = YES; |
523 | 523 |
524 // TODO(viettrungluu): This is very temporary, since this should be done "in" | 524 // TODO(viettrungluu): This is very temporary, since this should be done "in" |
525 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the | 525 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the |
526 // (probably-empty) list of URLs from the command line. | 526 // (probably-empty) list of URLs from the command line. |
527 if (startupUrls_.size()) { | 527 if (startupUrls_.size()) { |
528 [self openUrls:startupUrls_]; | 528 [self openUrls:startupUrls_]; |
529 [self clearStartupUrls]; | 529 [self clearStartupUrls]; |
530 } | 530 } |
| 531 |
| 532 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 533 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { |
| 534 [tabposeMenuItem_ setHidden:YES]; |
| 535 } |
531 } | 536 } |
532 | 537 |
533 // This is called after profiles have been loaded and preferences registered. | 538 // This is called after profiles have been loaded and preferences registered. |
534 // It is safe to access the default profile here. | 539 // It is safe to access the default profile here. |
535 - (void)applicationDidBecomeActive:(NSNotification*)notify { | 540 - (void)applicationDidBecomeActive:(NSNotification*)notify { |
536 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, | 541 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, |
537 NotificationService::AllSources(), | 542 NotificationService::AllSources(), |
538 NotificationService::NoDetails()); | 543 NotificationService::NoDetails()); |
539 } | 544 } |
540 | 545 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 [appController showPreferencesWindow:nil page:page profile:profile]; | 1208 [appController showPreferencesWindow:nil page:page profile:profile]; |
1204 } | 1209 } |
1205 | 1210 |
1206 namespace app_controller_mac { | 1211 namespace app_controller_mac { |
1207 | 1212 |
1208 bool IsOpeningNewWindow() { | 1213 bool IsOpeningNewWindow() { |
1209 return g_is_opening_new_window; | 1214 return g_is_opening_new_window; |
1210 } | 1215 } |
1211 | 1216 |
1212 } // namespace app_controller_mac | 1217 } // namespace app_controller_mac |
OLD | NEW |