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

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

Powered by Google App Engine
This is Rietveld 408576698