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 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "apps/app_load_service.h" | 10 #include "apps/app_load_service.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 #include "chrome/browser/chromeos/login/user_manager.h" | 78 #include "chrome/browser/chromeos/login/user_manager.h" |
79 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 79 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
80 #include "chrome/browser/lifetime/application_lifetime.h" | 80 #include "chrome/browser/lifetime/application_lifetime.h" |
81 #include "chromeos/chromeos_switches.h" | 81 #include "chromeos/chromeos_switches.h" |
82 #endif | 82 #endif |
83 | 83 |
84 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) | 84 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) |
85 #include "ui/events/x/touch_factory_x11.h" | 85 #include "ui/events/x/touch_factory_x11.h" |
86 #endif | 86 #endif |
87 | 87 |
| 88 #if defined(OS_MACOSX) |
| 89 #include "chrome/browser/web_applications/web_app_mac.h" |
| 90 #endif |
| 91 |
88 #if defined(ENABLE_FULL_PRINTING) | 92 #if defined(ENABLE_FULL_PRINTING) |
89 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 93 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
90 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 94 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
91 #include "chrome/browser/printing/print_dialog_cloud.h" | 95 #include "chrome/browser/printing/print_dialog_cloud.h" |
92 #endif | 96 #endif |
93 | 97 |
94 using content::BrowserThread; | 98 using content::BrowserThread; |
95 using content::ChildProcessSecurityPolicy; | 99 using content::ChildProcessSecurityPolicy; |
96 | 100 |
97 namespace { | 101 namespace { |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { | 552 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { |
549 chrome::AttemptUserExit(); | 553 chrome::AttemptUserExit(); |
550 return false; | 554 return false; |
551 } | 555 } |
552 #endif | 556 #endif |
553 | 557 |
554 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) | 558 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) |
555 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 559 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
556 #endif | 560 #endif |
557 | 561 |
| 562 #if defined(OS_MACOSX) |
| 563 if (web_app::MaybeRebuildShortcut(command_line)) |
| 564 return true; |
| 565 #endif |
| 566 |
558 if (!process_startup && | 567 if (!process_startup && |
559 command_line.HasSwitch(switches::kDumpBrowserHistograms)) { | 568 command_line.HasSwitch(switches::kDumpBrowserHistograms)) { |
560 // Only handle --dump-browser-histograms from a rendezvous. In this case, do | 569 // Only handle --dump-browser-histograms from a rendezvous. In this case, do |
561 // not open a new browser window even if no output file was given. | 570 // not open a new browser window even if no output file was given. |
562 base::FilePath output_file( | 571 base::FilePath output_file( |
563 command_line.GetSwitchValuePath(switches::kDumpBrowserHistograms)); | 572 command_line.GetSwitchValuePath(switches::kDumpBrowserHistograms)); |
564 if (!output_file.empty()) { | 573 if (!output_file.empty()) { |
565 BrowserThread::PostBlockingPoolTask( | 574 BrowserThread::PostBlockingPoolTask( |
566 FROM_HERE, | 575 FROM_HERE, |
567 base::Bind(&DumpBrowserHistograms, output_file)); | 576 base::Bind(&DumpBrowserHistograms, output_file)); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 } | 734 } |
726 | 735 |
727 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 736 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
728 return user_data_dir.Append( | 737 return user_data_dir.Append( |
729 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 738 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
730 } | 739 } |
731 | 740 |
732 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 741 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
733 user_data_dir); | 742 user_data_dir); |
734 } | 743 } |
OLD | NEW |