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

Unified Diff: apps/shell/browser/shell_browser_main_parts.cc

Issue 270763002: Minimal athena shell main (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/shell/browser/shell_browser_main_parts.h ('k') | apps/shell/browser/shell_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/browser/shell_browser_main_parts.cc
diff --git a/apps/shell/browser/shell_browser_main_parts.cc b/apps/shell/browser/shell_browser_main_parts.cc
index be1c82dc4d7ff153472becd2d2ce0649d92276bb..126f86ab623637ec146089c1c231049a98a7b4d7 100644
--- a/apps/shell/browser/shell_browser_main_parts.cc
+++ b/apps/shell/browser/shell_browser_main_parts.cc
@@ -5,14 +5,12 @@
#include "apps/shell/browser/shell_browser_main_parts.h"
#include "apps/shell/browser/shell_browser_context.h"
+#include "apps/shell/browser/shell_browser_main_delegate.h"
#include "apps/shell/browser/shell_desktop_controller.h"
#include "apps/shell/browser/shell_extension_system.h"
#include "apps/shell/browser/shell_extension_system_factory.h"
#include "apps/shell/browser/shell_extensions_browser_client.h"
#include "apps/shell/common/shell_extensions_client.h"
-#include "base/command_line.h"
-#include "base/file_util.h"
-#include "base/files/file_path.h"
#include "base/run_loop.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/common/result_codes.h"
@@ -47,10 +45,13 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
namespace apps {
ShellBrowserMainParts::ShellBrowserMainParts(
- const content::MainFunctionParams& parameters)
+ const content::MainFunctionParams& parameters,
+ ShellBrowserMainDelegate* browser_main_delegate)
: extension_system_(NULL),
parameters_(parameters),
- run_message_loop_(true) {}
+ run_message_loop_(true),
+ browser_main_delegate_(browser_main_delegate) {
+}
ShellBrowserMainParts::~ShellBrowserMainParts() {
}
@@ -105,20 +106,13 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
devtools_delegate_.reset(
new content::ShellDevToolsDelegate(browser_context_.get()));
-
- const std::string kAppSwitch = "app";
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(kAppSwitch)) {
- base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch));
- base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir);
- extension_system_->LoadAndLaunchApp(app_absolute_dir);
- } else if (parameters_.ui_task) {
+ if (parameters_.ui_task) {
// For running browser tests.
parameters_.ui_task->Run();
delete parameters_.ui_task;
run_message_loop_ = false;
} else {
- LOG(ERROR) << "--" << kAppSwitch << " unset; boredom is in your future";
+ browser_main_delegate_->Start(browser_context_.get());
}
}
« no previous file with comments | « apps/shell/browser/shell_browser_main_parts.h ('k') | apps/shell/browser/shell_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698