Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10900018: Introduce App Launcher for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase gyp file for ui extraction Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 26 matching lines...) Expand all
37 #include "chrome/browser/profiles/profile.h" 37 #include "chrome/browser/profiles/profile.h"
38 #include "chrome/browser/profiles/profile_io_data.h" 38 #include "chrome/browser/profiles/profile_io_data.h"
39 #include "chrome/browser/protector/protected_prefs_watcher.h" 39 #include "chrome/browser/protector/protected_prefs_watcher.h"
40 #include "chrome/browser/protector/protector_service.h" 40 #include "chrome/browser/protector/protector_service.h"
41 #include "chrome/browser/protector/protector_service_factory.h" 41 #include "chrome/browser/protector/protector_service_factory.h"
42 #include "chrome/browser/protector/protector_utils.h" 42 #include "chrome/browser/protector/protector_utils.h"
43 #include "chrome/browser/sessions/session_restore.h" 43 #include "chrome/browser/sessions/session_restore.h"
44 #include "chrome/browser/sessions/session_service.h" 44 #include "chrome/browser/sessions/session_service.h"
45 #include "chrome/browser/sessions/session_service_factory.h" 45 #include "chrome/browser/sessions/session_service_factory.h"
46 #include "chrome/browser/shell_integration.h" 46 #include "chrome/browser/shell_integration.h"
47 #include "chrome/browser/ui/app_list/app_list_controller.h"
47 #include "chrome/browser/ui/browser_commands.h" 48 #include "chrome/browser/ui/browser_commands.h"
48 #include "chrome/browser/ui/browser_finder.h" 49 #include "chrome/browser/ui/browser_finder.h"
49 #include "chrome/browser/ui/browser_list.h" 50 #include "chrome/browser/ui/browser_list.h"
50 #include "chrome/browser/ui/browser_navigator.h" 51 #include "chrome/browser/ui/browser_navigator.h"
51 #include "chrome/browser/ui/browser_tabrestore.h" 52 #include "chrome/browser/ui/browser_tabrestore.h"
52 #include "chrome/browser/ui/browser_tabstrip.h" 53 #include "chrome/browser/ui/browser_tabstrip.h"
53 #include "chrome/browser/ui/browser_window.h" 54 #include "chrome/browser/ui/browser_window.h"
54 #include "chrome/browser/ui/extensions/application_launch.h" 55 #include "chrome/browser/ui/extensions/application_launch.h"
55 #include "chrome/browser/ui/startup/autolaunch_prompt.h" 56 #include "chrome/browser/ui/startup/autolaunch_prompt.h"
56 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 57 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 g_browser_process->CreateDevToolsHttpProtocolHandler( 321 g_browser_process->CreateDevToolsHttpProtocolHandler(
321 profile, 322 profile,
322 "127.0.0.1", 323 "127.0.0.1",
323 static_cast<int>(port), 324 static_cast<int>(port),
324 frontend_str); 325 frontend_str);
325 } else { 326 } else {
326 DLOG(WARNING) << "Invalid http debugger port number " << port; 327 DLOG(WARNING) << "Invalid http debugger port number " << port;
327 } 328 }
328 } 329 }
329 330
331 if (command_line_.HasSwitch(switches::kShowAppList)) {
332 app_list_controller::ShowAppList();
333 return true;
334 }
335
330 // Open the required browser windows and tabs. First, see if 336 // Open the required browser windows and tabs. First, see if
331 // we're being run as an application window. If so, the user 337 // we're being run as an application window. If so, the user
332 // opened an app shortcut. Don't restore tabs or open initial 338 // opened an app shortcut. Don't restore tabs or open initial
333 // URLs in that case. The user should see the window as an app, 339 // URLs in that case. The user should see the window as an app,
334 // not as chrome. 340 // not as chrome.
335 // Special case is when app switches are passed but we do want to restore 341 // Special case is when app switches are passed but we do want to restore
336 // session. In that case open app window + focus it after session is restored. 342 // session. In that case open app window + focus it after session is restored.
337 content::WebContents* app_contents = NULL; 343 content::WebContents* app_contents = NULL;
338 if (OpenApplicationWindow(profile, &app_contents) && 344 if (OpenApplicationWindow(profile, &app_contents) &&
339 !browser_defaults::kAppRestoreSession) { 345 !browser_defaults::kAppRestoreSession) {
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 // New: 947 // New:
942 prefs->GetString(prefs::kHomePage), 948 prefs->GetString(prefs::kHomePage),
943 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 949 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
944 prefs->GetBoolean(prefs::kShowHomeButton), 950 prefs->GetBoolean(prefs::kShowHomeButton),
945 // Backup: 951 // Backup:
946 backup_homepage, 952 backup_homepage,
947 backup_homepage_is_ntp, 953 backup_homepage_is_ntp,
948 backup_show_home_button)); 954 backup_show_home_button));
949 } 955 }
950 } 956 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_controller_ash.cc ('k') | chrome/browser/ui/views/app_list/app_list_controller_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698