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

Side by Side Diff: apps/shell/browser/default_shell_browser_main_delegate.cc

Issue 313733005: Introduces --app flag to athena to load an app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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
« no previous file with comments | « no previous file | apps/shell/browser/shell_extension_system.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "apps/shell/browser/default_shell_browser_main_delegate.h" 5 #include "apps/shell/browser/default_shell_browser_main_delegate.h"
6 6
7 #include "apps/shell/browser/shell_desktop_controller.h" 7 #include "apps/shell/browser/shell_desktop_controller.h"
8 #include "apps/shell/browser/shell_extension_system.h" 8 #include "apps/shell/browser/shell_extension_system.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 11 matching lines...) Expand all
22 content::BrowserContext* browser_context) { 22 content::BrowserContext* browser_context) {
23 const std::string kAppSwitch = "app"; 23 const std::string kAppSwitch = "app";
24 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 24 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
25 if (command_line->HasSwitch(kAppSwitch)) { 25 if (command_line->HasSwitch(kAppSwitch)) {
26 base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch)); 26 base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch));
27 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); 27 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir);
28 28
29 extensions::ShellExtensionSystem* extension_system = 29 extensions::ShellExtensionSystem* extension_system =
30 static_cast<extensions::ShellExtensionSystem*>( 30 static_cast<extensions::ShellExtensionSystem*>(
31 extensions::ExtensionSystem::Get(browser_context)); 31 extensions::ExtensionSystem::Get(browser_context));
32 extension_system->LoadAndLaunchApp(app_absolute_dir); 32 if (!extension_system->LoadApp(app_absolute_dir))
33 return;
34 extension_system->LaunchApp();
33 } else { 35 } else {
34 LOG(ERROR) << "--" << kAppSwitch << " unset; boredom is in your future"; 36 LOG(ERROR) << "--" << kAppSwitch << " unset; boredom is in your future";
35 } 37 }
36 } 38 }
37 39
38 void DefaultShellBrowserMainDelegate::Shutdown() { 40 void DefaultShellBrowserMainDelegate::Shutdown() {
39 } 41 }
40 42
41 ShellDesktopController* 43 ShellDesktopController*
42 DefaultShellBrowserMainDelegate::CreateDesktopController() { 44 DefaultShellBrowserMainDelegate::CreateDesktopController() {
43 return new ShellDesktopController(); 45 return new ShellDesktopController();
44 } 46 }
45 47
46 } // namespace apps 48 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | apps/shell/browser/shell_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698