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

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: Compile fixed, postResult added 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 // TODO(skerner): Could pass in |extension| and |launch_container|, 419 // TODO(skerner): Could pass in |extension| and |launch_container|,
420 // and avoid calling GetAppLaunchContainer() both here and in 420 // and avoid calling GetAppLaunchContainer() both here and in
421 // OpenApplicationTab(). 421 // OpenApplicationTab().
422 422
423 if (launch_container == extension_misc::LAUNCH_TAB) 423 if (launch_container == extension_misc::LAUNCH_TAB)
424 return false; 424 return false;
425 425
426 RecordCmdLineAppHistogram(); 426 RecordCmdLineAppHistogram();
427 WebContents* tab_in_app_window = Browser::OpenApplication( 427 WebContents* tab_in_app_window = Browser::OpenApplication(
428 profile, extension, launch_container, GURL(), NEW_WINDOW); 428 profile, extension, launch_container, GURL(), NEW_WINDOW,
429 &command_line_);
429 // Platform apps fire off a launch event which may or may not open a window. 430 // Platform apps fire off a launch event which may or may not open a window.
430 return (tab_in_app_window != NULL || extension->is_platform_app()); 431 return (tab_in_app_window != NULL || extension->is_platform_app());
431 } 432 }
432 433
433 if (url_string.empty()) 434 if (url_string.empty())
434 return false; 435 return false;
435 436
436 #if defined(OS_WIN) // Fix up Windows shortcuts. 437 #if defined(OS_WIN) // Fix up Windows shortcuts.
437 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 438 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
438 #endif 439 #endif
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // New: 857 // New:
857 prefs->GetString(prefs::kHomePage), 858 prefs->GetString(prefs::kHomePage),
858 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 859 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
859 prefs->GetBoolean(prefs::kShowHomeButton), 860 prefs->GetBoolean(prefs::kShowHomeButton),
860 // Backup: 861 // Backup:
861 backup_homepage, 862 backup_homepage,
862 backup_homepage_is_ntp, 863 backup_homepage_is_ntp,
863 backup_show_home_button)); 864 backup_show_home_button));
864 } 865 }
865 } 866 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698