| 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 "apps/app_shim/app_shim_mac.h" | 7 #include "apps/app_shim/app_shim_mac.h" |
| 8 #include "apps/app_shim/extension_app_shim_handler_mac.h" | 8 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
| 9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 startupComplete_ = YES; | 734 startupComplete_ = YES; |
| 735 | 735 |
| 736 // TODO(viettrungluu): This is very temporary, since this should be done "in" | 736 // TODO(viettrungluu): This is very temporary, since this should be done "in" |
| 737 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the | 737 // |BrowserMain()|, i.e., this list of startup URLs should be appended to the |
| 738 // (probably-empty) list of URLs from the command line. | 738 // (probably-empty) list of URLs from the command line. |
| 739 if (startupUrls_.size()) { | 739 if (startupUrls_.size()) { |
| 740 [self openUrls:startupUrls_]; | 740 [self openUrls:startupUrls_]; |
| 741 [self clearStartupUrls]; | 741 [self clearStartupUrls]; |
| 742 } | 742 } |
| 743 | 743 |
| 744 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | |
| 745 if (!parsed_command_line.HasSwitch(switches::kEnableExposeForTabs)) { | |
| 746 [tabposeMenuItem_ setHidden:YES]; | |
| 747 } | |
| 748 | |
| 749 PrefService* localState = g_browser_process->local_state(); | 744 PrefService* localState = g_browser_process->local_state(); |
| 750 if (localState) { | 745 if (localState) { |
| 751 localPrefRegistrar_.Init(localState); | 746 localPrefRegistrar_.Init(localState); |
| 752 localPrefRegistrar_.Add( | 747 localPrefRegistrar_.Add( |
| 753 prefs::kAllowFileSelectionDialogs, | 748 prefs::kAllowFileSelectionDialogs, |
| 754 base::Bind(&chrome::BrowserCommandController::UpdateOpenFileState, | 749 base::Bind(&chrome::BrowserCommandController::UpdateOpenFileState, |
| 755 menuState_.get())); | 750 menuState_.get())); |
| 756 } | 751 } |
| 757 } | 752 } |
| 758 | 753 |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 | 1516 |
| 1522 //--------------------------------------------------------------------------- | 1517 //--------------------------------------------------------------------------- |
| 1523 | 1518 |
| 1524 namespace app_controller_mac { | 1519 namespace app_controller_mac { |
| 1525 | 1520 |
| 1526 bool IsOpeningNewWindow() { | 1521 bool IsOpeningNewWindow() { |
| 1527 return g_is_opening_new_window; | 1522 return g_is_opening_new_window; |
| 1528 } | 1523 } |
| 1529 | 1524 |
| 1530 } // namespace app_controller_mac | 1525 } // namespace app_controller_mac |
| OLD | NEW |