| 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/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 466 |
| 467 historyMenuBridge_.reset(new HistoryMenuBridge(lastProfile_)); | 467 historyMenuBridge_.reset(new HistoryMenuBridge(lastProfile_)); |
| 468 historyMenuBridge_->BuildMenu(); | 468 historyMenuBridge_->BuildMenu(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 - (void)checkForAnyKeyWindows { | 471 - (void)checkForAnyKeyWindows { |
| 472 if ([NSApp keyWindow]) | 472 if ([NSApp keyWindow]) |
| 473 return; | 473 return; |
| 474 | 474 |
| 475 NotificationService::current()->Notify( | 475 NotificationService::current()->Notify( |
| 476 NotificationType::NO_KEY_WINDOW, | 476 chrome::NO_KEY_WINDOW, |
| 477 NotificationService::AllSources(), | 477 NotificationService::AllSources(), |
| 478 NotificationService::NoDetails()); | 478 NotificationService::NoDetails()); |
| 479 } | 479 } |
| 480 | 480 |
| 481 // If the auto-update interval is not set, make it 5 hours. | 481 // If the auto-update interval is not set, make it 5 hours. |
| 482 // This code is specific to Mac Chrome Dev Channel. | 482 // This code is specific to Mac Chrome Dev Channel. |
| 483 // Placed here for 2 reasons: | 483 // Placed here for 2 reasons: |
| 484 // 1) Same spot as other Pref stuff | 484 // 1) Same spot as other Pref stuff |
| 485 // 2) Try and be friendly by keeping this after app launch | 485 // 2) Try and be friendly by keeping this after app launch |
| 486 // TODO(jrg): remove once we go Beta. | 486 // TODO(jrg): remove once we go Beta. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 542 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 543 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { | 543 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { |
| 544 [tabposeMenuItem_ setHidden:YES]; | 544 [tabposeMenuItem_ setHidden:YES]; |
| 545 } | 545 } |
| 546 } | 546 } |
| 547 | 547 |
| 548 // This is called after profiles have been loaded and preferences registered. | 548 // This is called after profiles have been loaded and preferences registered. |
| 549 // It is safe to access the default profile here. | 549 // It is safe to access the default profile here. |
| 550 - (void)applicationDidBecomeActive:(NSNotification*)notify { | 550 - (void)applicationDidBecomeActive:(NSNotification*)notify { |
| 551 NotificationService::current()->Notify(NotificationType::APP_ACTIVATED, | 551 NotificationService::current()->Notify(chrome::APP_ACTIVATED, |
| 552 NotificationService::AllSources(), | 552 NotificationService::AllSources(), |
| 553 NotificationService::NoDetails()); | 553 NotificationService::NoDetails()); |
| 554 } | 554 } |
| 555 | 555 |
| 556 // Helper function for populating and displaying the in progress downloads at | 556 // Helper function for populating and displaying the in progress downloads at |
| 557 // exit alert panel. | 557 // exit alert panel. |
| 558 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { | 558 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { |
| 559 NSString* warningText = nil; | 559 NSString* warningText = nil; |
| 560 NSString* explanationText = nil; | 560 NSString* explanationText = nil; |
| 561 NSString* waitTitle = nil; | 561 NSString* waitTitle = nil; |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 | 1196 |
| 1197 } // namespace browser | 1197 } // namespace browser |
| 1198 | 1198 |
| 1199 namespace app_controller_mac { | 1199 namespace app_controller_mac { |
| 1200 | 1200 |
| 1201 bool IsOpeningNewWindow() { | 1201 bool IsOpeningNewWindow() { |
| 1202 return g_is_opening_new_window; | 1202 return g_is_opening_new_window; |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 } // namespace app_controller_mac | 1205 } // namespace app_controller_mac |
| OLD | NEW |