| 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_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/browser/profiles/profile_io_data.h" | 44 #include "chrome/browser/profiles/profile_io_data.h" |
| 45 #include "chrome/browser/protector/protected_prefs_watcher.h" | 45 #include "chrome/browser/protector/protected_prefs_watcher.h" |
| 46 #include "chrome/browser/protector/protector_service.h" | 46 #include "chrome/browser/protector/protector_service.h" |
| 47 #include "chrome/browser/protector/protector_service_factory.h" | 47 #include "chrome/browser/protector/protector_service_factory.h" |
| 48 #include "chrome/browser/protector/protector_utils.h" | 48 #include "chrome/browser/protector/protector_utils.h" |
| 49 #include "chrome/browser/rlz/rlz.h" | 49 #include "chrome/browser/rlz/rlz.h" |
| 50 #include "chrome/browser/sessions/session_restore.h" | 50 #include "chrome/browser/sessions/session_restore.h" |
| 51 #include "chrome/browser/sessions/session_service.h" | 51 #include "chrome/browser/sessions/session_service.h" |
| 52 #include "chrome/browser/sessions/session_service_factory.h" | 52 #include "chrome/browser/sessions/session_service_factory.h" |
| 53 #include "chrome/browser/shell_integration.h" | 53 #include "chrome/browser/shell_integration.h" |
| 54 #include "chrome/browser/ui/app_list/app_list_controller.h" | |
| 55 #include "chrome/browser/ui/browser_commands.h" | 54 #include "chrome/browser/ui/browser_commands.h" |
| 56 #include "chrome/browser/ui/browser_finder.h" | 55 #include "chrome/browser/ui/browser_finder.h" |
| 57 #include "chrome/browser/ui/browser_list.h" | 56 #include "chrome/browser/ui/browser_list.h" |
| 58 #include "chrome/browser/ui/browser_navigator.h" | 57 #include "chrome/browser/ui/browser_navigator.h" |
| 59 #include "chrome/browser/ui/browser_tabrestore.h" | 58 #include "chrome/browser/ui/browser_tabrestore.h" |
| 60 #include "chrome/browser/ui/browser_tabstrip.h" | 59 #include "chrome/browser/ui/browser_tabstrip.h" |
| 61 #include "chrome/browser/ui/browser_window.h" | 60 #include "chrome/browser/ui/browser_window.h" |
| 62 #include "chrome/browser/ui/extensions/application_launch.h" | 61 #include "chrome/browser/ui/extensions/application_launch.h" |
| 63 #include "chrome/browser/ui/startup/autolaunch_prompt.h" | 62 #include "chrome/browser/ui/startup/autolaunch_prompt.h" |
| 64 #include "chrome/browser/ui/startup/bad_flags_prompt.h" | 63 #include "chrome/browser/ui/startup/bad_flags_prompt.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #endif | 106 #endif |
| 108 | 107 |
| 109 #if defined(TOOLKIT_GTK) | 108 #if defined(TOOLKIT_GTK) |
| 110 #include "chrome/browser/ui/gtk/gtk_util.h" | 109 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 111 #endif | 110 #endif |
| 112 | 111 |
| 113 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
| 114 #include "base/win/windows_version.h" | 113 #include "base/win/windows_version.h" |
| 115 #endif | 114 #endif |
| 116 | 115 |
| 116 #if defined(ENABLE_APP_LIST) |
| 117 #include "chrome/browser/ui/app_list/app_list_controller.h" |
| 118 #endif |
| 119 |
| 117 using content::ChildProcessSecurityPolicy; | 120 using content::ChildProcessSecurityPolicy; |
| 118 using content::WebContents; | 121 using content::WebContents; |
| 119 using extensions::Extension; | 122 using extensions::Extension; |
| 120 using protector::ProtectedPrefsWatcher; | 123 using protector::ProtectedPrefsWatcher; |
| 121 using protector::ProtectorService; | 124 using protector::ProtectorService; |
| 122 using protector::ProtectorServiceFactory; | 125 using protector::ProtectorServiceFactory; |
| 123 | 126 |
| 124 extern bool in_synchronous_profile_launch; | 127 extern bool in_synchronous_profile_launch; |
| 125 | 128 |
| 126 namespace { | 129 namespace { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 g_browser_process->CreateDevToolsHttpProtocolHandler( | 358 g_browser_process->CreateDevToolsHttpProtocolHandler( |
| 356 profile, | 359 profile, |
| 357 "127.0.0.1", | 360 "127.0.0.1", |
| 358 static_cast<int>(port), | 361 static_cast<int>(port), |
| 359 frontend_str); | 362 frontend_str); |
| 360 } else { | 363 } else { |
| 361 DLOG(WARNING) << "Invalid http debugger port number " << port; | 364 DLOG(WARNING) << "Invalid http debugger port number " << port; |
| 362 } | 365 } |
| 363 } | 366 } |
| 364 | 367 |
| 368 #if defined(ENABLE_APP_LIST) |
| 365 app_list_controller::CheckAppListTaskbarShortcut(); | 369 app_list_controller::CheckAppListTaskbarShortcut(); |
| 366 if (command_line_.HasSwitch(switches::kShowAppList)) { | 370 if (command_line_.HasSwitch(switches::kShowAppList)) { |
| 367 app_list_controller::ShowAppList(); | 371 app_list_controller::ShowAppList(); |
| 368 return true; | 372 return true; |
| 369 } | 373 } |
| 374 #endif |
| 370 | 375 |
| 371 // Open the required browser windows and tabs. First, see if | 376 // Open the required browser windows and tabs. First, see if |
| 372 // we're being run as an application window. If so, the user | 377 // we're being run as an application window. If so, the user |
| 373 // opened an app shortcut. Don't restore tabs or open initial | 378 // opened an app shortcut. Don't restore tabs or open initial |
| 374 // URLs in that case. The user should see the window as an app, | 379 // URLs in that case. The user should see the window as an app, |
| 375 // not as chrome. | 380 // not as chrome. |
| 376 // Special case is when app switches are passed but we do want to restore | 381 // Special case is when app switches are passed but we do want to restore |
| 377 // session. In that case open app window + focus it after session is restored. | 382 // session. In that case open app window + focus it after session is restored. |
| 378 content::WebContents* app_contents = NULL; | 383 content::WebContents* app_contents = NULL; |
| 379 if (OpenApplicationWindow(profile, &app_contents)) { | 384 if (OpenApplicationWindow(profile, &app_contents)) { |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 | 1053 |
| 1049 #if !defined(OS_WIN) || defined(USE_AURA) | 1054 #if !defined(OS_WIN) || defined(USE_AURA) |
| 1050 // static | 1055 // static |
| 1051 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 1056 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
| 1052 Profile* profile, | 1057 Profile* profile, |
| 1053 const std::vector<GURL>& startup_urls) { | 1058 const std::vector<GURL>& startup_urls) { |
| 1054 return false; | 1059 return false; |
| 1055 } | 1060 } |
| 1056 #endif | 1061 #endif |
| 1057 | 1062 |
| OLD | NEW |