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

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: Windows tests fixed 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 // TODO(skerner): Could pass in |extension| and |launch_container|, 421 // TODO(skerner): Could pass in |extension| and |launch_container|,
422 // and avoid calling GetAppLaunchContainer() both here and in 422 // and avoid calling GetAppLaunchContainer() both here and in
423 // OpenApplicationTab(). 423 // OpenApplicationTab().
424 424
425 if (launch_container == extension_misc::LAUNCH_TAB) 425 if (launch_container == extension_misc::LAUNCH_TAB)
426 return false; 426 return false;
427 427
428 RecordCmdLineAppHistogram(); 428 RecordCmdLineAppHistogram();
429 WebContents* tab_in_app_window = application_launch::OpenApplication( 429 WebContents* tab_in_app_window = application_launch::OpenApplication(
430 profile, extension, launch_container, GURL(), NEW_WINDOW); 430 profile, extension, launch_container, GURL(), NEW_WINDOW,
431 &command_line_);
431 // Platform apps fire off a launch event which may or may not open a window. 432 // Platform apps fire off a launch event which may or may not open a window.
432 return (tab_in_app_window != NULL || extension->is_platform_app()); 433 return (tab_in_app_window != NULL || extension->is_platform_app());
433 } 434 }
434 435
435 if (url_string.empty()) 436 if (url_string.empty())
436 return false; 437 return false;
437 438
438 #if defined(OS_WIN) // Fix up Windows shortcuts. 439 #if defined(OS_WIN) // Fix up Windows shortcuts.
439 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 440 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
440 #endif 441 #endif
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 // New: 859 // New:
859 prefs->GetString(prefs::kHomePage), 860 prefs->GetString(prefs::kHomePage),
860 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 861 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
861 prefs->GetBoolean(prefs::kShowHomeButton), 862 prefs->GetBoolean(prefs::kShowHomeButton),
862 // Backup: 863 // Backup:
863 backup_homepage, 864 backup_homepage,
864 backup_homepage_is_ntp, 865 backup_homepage_is_ntp,
865 backup_show_home_button)); 866 backup_show_home_button));
866 } 867 }
867 } 868 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_app_browsertest.cc ('k') | chrome/browser/ui/views/ash/extension_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698