| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 602 |
| 603 startupComplete_ = YES; | 603 startupComplete_ = YES; |
| 604 | 604 |
| 605 // TODO(viettrungluu): This is very temporary, since this should be done "in" | 605 // TODO(viettrungluu): This is very temporary, since this should be done "in" |
| 606 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the | 606 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the |
| 607 // (probably-empty) list of URLs from the command line. | 607 // (probably-empty) list of URLs from the command line. |
| 608 if (startupUrls_.size()) { | 608 if (startupUrls_.size()) { |
| 609 [self openUrls:startupUrls_]; | 609 [self openUrls:startupUrls_]; |
| 610 [self clearStartupUrls]; | 610 [self clearStartupUrls]; |
| 611 } | 611 } |
| 612 | |
| 613 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | |
| 614 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { | |
| 615 [tabposeMenuItem_ setHidden:YES]; | |
| 616 } | |
| 617 } | 612 } |
| 618 | 613 |
| 619 // This is called after profiles have been loaded and preferences registered. | 614 // This is called after profiles have been loaded and preferences registered. |
| 620 // It is safe to access the default profile here. | 615 // It is safe to access the default profile here. |
| 621 - (void)applicationDidBecomeActive:(NSNotification*)notify { | 616 - (void)applicationDidBecomeActive:(NSNotification*)notify { |
| 622 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, | 617 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, |
| 623 NotificationService::AllSources(), | 618 NotificationService::AllSources(), |
| 624 NotificationService::NoDetails()); | 619 NotificationService::NoDetails()); |
| 625 } | 620 } |
| 626 | 621 |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 [appController showPreferencesWindow:nil page:page profile:profile]; | 1284 [appController showPreferencesWindow:nil page:page profile:profile]; |
| 1290 } | 1285 } |
| 1291 | 1286 |
| 1292 namespace app_controller_mac { | 1287 namespace app_controller_mac { |
| 1293 | 1288 |
| 1294 bool IsOpeningNewWindow() { | 1289 bool IsOpeningNewWindow() { |
| 1295 return g_is_opening_new_window; | 1290 return g_is_opening_new_window; |
| 1296 } | 1291 } |
| 1297 | 1292 |
| 1298 } // namespace app_controller_mac | 1293 } // namespace app_controller_mac |
| OLD | NEW |