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

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

Issue 10332071: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Doh Created 8 years, 7 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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 // TODO(skerner): Could pass in |extension| and |launch_container|, 420 // TODO(skerner): Could pass in |extension| and |launch_container|,
421 // and avoid calling GetAppLaunchContainer() both here and in 421 // and avoid calling GetAppLaunchContainer() both here and in
422 // OpenApplicationTab(). 422 // OpenApplicationTab().
423 423
424 if (launch_container == extension_misc::LAUNCH_TAB) 424 if (launch_container == extension_misc::LAUNCH_TAB)
425 return false; 425 return false;
426 426
427 RecordCmdLineAppHistogram(); 427 RecordCmdLineAppHistogram();
428 WebContents* tab_in_app_window = Browser::OpenApplication( 428 WebContents* tab_in_app_window = Browser::OpenApplication(
429 profile, extension, launch_container, GURL(), NEW_WINDOW); 429 profile, extension, launch_container, GURL(), NEW_WINDOW,
430 &command_line_);
430 // Platform apps fire off a launch event which may or may not open a window. 431 // Platform apps fire off a launch event which may or may not open a window.
431 return (tab_in_app_window != NULL || extension->is_platform_app()); 432 return (tab_in_app_window != NULL || extension->is_platform_app());
432 } 433 }
433 434
434 if (url_string.empty()) 435 if (url_string.empty())
435 return false; 436 return false;
436 437
437 #if defined(OS_WIN) // Fix up Windows shortcuts. 438 #if defined(OS_WIN) // Fix up Windows shortcuts.
438 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 439 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
439 #endif 440 #endif
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 // New: 858 // New:
858 prefs->GetString(prefs::kHomePage), 859 prefs->GetString(prefs::kHomePage),
859 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 860 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
860 prefs->GetBoolean(prefs::kShowHomeButton), 861 prefs->GetBoolean(prefs::kShowHomeButton),
861 // Backup: 862 // Backup:
862 backup_homepage, 863 backup_homepage,
863 backup_homepage_is_ntp, 864 backup_homepage_is_ntp,
864 backup_show_home_button)); 865 backup_show_home_button));
865 } 866 }
866 } 867 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698