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/users/user_manager.h" | 78 #include "chrome/browser/chromeos/login/users/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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { | 555 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { |
552 chrome::AttemptUserExit(); | 556 chrome::AttemptUserExit(); |
553 return false; | 557 return false; |
554 } | 558 } |
555 #endif | 559 #endif |
556 | 560 |
557 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) | 561 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) |
558 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 562 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
559 #endif | 563 #endif |
560 | 564 |
| 565 #if defined(OS_MACOSX) |
| 566 if (web_app::MaybeRebuildShortcut(command_line)) |
| 567 return true; |
| 568 #endif |
| 569 |
561 if (!process_startup && | 570 if (!process_startup && |
562 command_line.HasSwitch(switches::kDumpBrowserHistograms)) { | 571 command_line.HasSwitch(switches::kDumpBrowserHistograms)) { |
563 // Only handle --dump-browser-histograms from a rendezvous. In this case, do | 572 // Only handle --dump-browser-histograms from a rendezvous. In this case, do |
564 // not open a new browser window even if no output file was given. | 573 // not open a new browser window even if no output file was given. |
565 base::FilePath output_file( | 574 base::FilePath output_file( |
566 command_line.GetSwitchValuePath(switches::kDumpBrowserHistograms)); | 575 command_line.GetSwitchValuePath(switches::kDumpBrowserHistograms)); |
567 if (!output_file.empty()) { | 576 if (!output_file.empty()) { |
568 BrowserThread::PostBlockingPoolTask( | 577 BrowserThread::PostBlockingPoolTask( |
569 FROM_HERE, | 578 FROM_HERE, |
570 base::Bind(&DumpBrowserHistograms, output_file)); | 579 base::Bind(&DumpBrowserHistograms, output_file)); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 737 } |
729 | 738 |
730 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 739 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
731 return user_data_dir.Append( | 740 return user_data_dir.Append( |
732 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 741 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
733 } | 742 } |
734 | 743 |
735 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 744 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
736 user_data_dir); | 745 user_data_dir); |
737 } | 746 } |
OLD | NEW |