| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 startupComplete_ = YES; | 519 startupComplete_ = YES; |
| 520 | 520 |
| 521 // TODO(viettrungluu): This is very temporary, since this should be done "in" | 521 // TODO(viettrungluu): This is very temporary, since this should be done "in" |
| 522 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the | 522 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the |
| 523 // (probably-empty) list of URLs from the command line. | 523 // (probably-empty) list of URLs from the command line. |
| 524 if (startupUrls_.size()) { | 524 if (startupUrls_.size()) { |
| 525 [self openUrls:startupUrls_]; | 525 [self openUrls:startupUrls_]; |
| 526 [self clearStartupUrls]; | 526 [self clearStartupUrls]; |
| 527 } | 527 } |
| 528 |
| 529 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 530 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { |
| 531 [tabposeMenuItem_ setHidden:YES]; |
| 532 } |
| 528 } | 533 } |
| 529 | 534 |
| 530 // This is called after profiles have been loaded and preferences registered. | 535 // This is called after profiles have been loaded and preferences registered. |
| 531 // It is safe to access the default profile here. | 536 // It is safe to access the default profile here. |
| 532 - (void)applicationDidBecomeActive:(NSNotification*)notify { | 537 - (void)applicationDidBecomeActive:(NSNotification*)notify { |
| 533 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, | 538 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, |
| 534 NotificationService::AllSources(), | 539 NotificationService::AllSources(), |
| 535 NotificationService::NoDetails()); | 540 NotificationService::NoDetails()); |
| 536 } | 541 } |
| 537 | 542 |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 | 1168 |
| 1164 } // namespace browser | 1169 } // namespace browser |
| 1165 | 1170 |
| 1166 namespace app_controller_mac { | 1171 namespace app_controller_mac { |
| 1167 | 1172 |
| 1168 bool IsOpeningNewWindow() { | 1173 bool IsOpeningNewWindow() { |
| 1169 return g_is_opening_new_window; | 1174 return g_is_opening_new_window; |
| 1170 } | 1175 } |
| 1171 | 1176 |
| 1172 } // namespace app_controller_mac | 1177 } // namespace app_controller_mac |
| OLD | NEW |