OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
64 #include "chrome/common/cloud_print/cloud_print_class_mac.h" | 64 #include "chrome/common/cloud_print/cloud_print_class_mac.h" |
65 #include "chrome/common/mac/app_mode_common.h" | 65 #include "chrome/common/mac/app_mode_common.h" |
66 #include "chrome/common/pref_names.h" | 66 #include "chrome/common/pref_names.h" |
67 #include "chrome/common/service_messages.h" | 67 #include "chrome/common/service_messages.h" |
68 #include "chrome/common/url_constants.h" | 68 #include "chrome/common/url_constants.h" |
69 #include "content/public/browser/browser_thread.h" | 69 #include "content/public/browser/browser_thread.h" |
70 #include "content/public/browser/download_manager.h" | 70 #include "content/public/browser/download_manager.h" |
71 #include "content/public/browser/notification_service.h" | 71 #include "content/public/browser/notification_service.h" |
72 #include "content/public/browser/notification_types.h" | 72 #include "content/public/browser/notification_types.h" |
| 73 #include "content/public/browser/plugin_service.h" |
73 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
74 #include "grit/chromium_strings.h" | 75 #include "grit/chromium_strings.h" |
75 #include "grit/generated_resources.h" | 76 #include "grit/generated_resources.h" |
76 #include "net/base/net_util.h" | 77 #include "net/base/net_util.h" |
77 #include "ui/base/accelerators/accelerator_cocoa.h" | 78 #include "ui/base/accelerators/accelerator_cocoa.h" |
78 #include "ui/base/l10n/l10n_util.h" | 79 #include "ui/base/l10n/l10n_util.h" |
79 #include "ui/base/l10n/l10n_util_mac.h" | 80 #include "ui/base/l10n/l10n_util_mac.h" |
80 | 81 |
81 using content::BrowserContext; | 82 using content::BrowserContext; |
82 using content::BrowserThread; | 83 using content::BrowserThread; |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 | 604 |
604 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 605 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
605 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { | 606 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { |
606 [tabposeMenuItem_ setHidden:YES]; | 607 [tabposeMenuItem_ setHidden:YES]; |
607 } | 608 } |
608 } | 609 } |
609 | 610 |
610 // This is called after profiles have been loaded and preferences registered. | 611 // This is called after profiles have been loaded and preferences registered. |
611 // It is safe to access the default profile here. | 612 // It is safe to access the default profile here. |
612 - (void)applicationDidBecomeActive:(NSNotification*)notify { | 613 - (void)applicationDidBecomeActive:(NSNotification*)notify { |
613 content::NotificationService::current()->Notify( | 614 content::PluginService::GetInstance()->AppActivated(); |
614 content::NOTIFICATION_APP_ACTIVATED, | |
615 content::NotificationService::AllSources(), | |
616 content::NotificationService::NoDetails()); | |
617 } | 615 } |
618 | 616 |
619 // Helper function for populating and displaying the in progress downloads at | 617 // Helper function for populating and displaying the in progress downloads at |
620 // exit alert panel. | 618 // exit alert panel. |
621 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { | 619 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { |
622 NSString* titleText = nil; | 620 NSString* titleText = nil; |
623 NSString* explanationText = nil; | 621 NSString* explanationText = nil; |
624 NSString* waitTitle = nil; | 622 NSString* waitTitle = nil; |
625 NSString* exitTitle = nil; | 623 NSString* exitTitle = nil; |
626 | 624 |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 | 1304 |
1307 //--------------------------------------------------------------------------- | 1305 //--------------------------------------------------------------------------- |
1308 | 1306 |
1309 namespace app_controller_mac { | 1307 namespace app_controller_mac { |
1310 | 1308 |
1311 bool IsOpeningNewWindow() { | 1309 bool IsOpeningNewWindow() { |
1312 return g_is_opening_new_window; | 1310 return g_is_opening_new_window; |
1313 } | 1311 } |
1314 | 1312 |
1315 } // namespace app_controller_mac | 1313 } // namespace app_controller_mac |
OLD | NEW |