2013-03-13 19:12:05 +00:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE-CHROMIUM file.
|
|
|
|
|
2013-03-14 13:03:50 +00:00
|
|
|
#include "browser/browser_main_parts.h"
|
2013-03-13 19:12:05 +00:00
|
|
|
|
2013-03-14 13:03:50 +00:00
|
|
|
#include "browser/browser_context.h"
|
2013-05-14 06:45:34 +00:00
|
|
|
#include "browser/web_ui_controller_factory.h"
|
2013-03-14 13:03:50 +00:00
|
|
|
|
2013-03-13 19:12:05 +00:00
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
BrowserMainParts::BrowserMainParts() {
|
|
|
|
}
|
|
|
|
|
|
|
|
BrowserMainParts::~BrowserMainParts() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void BrowserMainParts::PreMainMessageLoopRun() {
|
2013-04-02 00:10:00 +00:00
|
|
|
browser_context_.reset(CreateBrowserContext());
|
2013-08-15 20:07:14 +00:00
|
|
|
browser_context_->Initialize();
|
2013-03-14 13:03:50 +00:00
|
|
|
|
2013-11-17 22:51:19 +00:00
|
|
|
web_ui_controller_factory_.reset(
|
|
|
|
new WebUIControllerFactory(browser_context_.get()));
|
|
|
|
content::WebUIControllerFactory::RegisterFactory(
|
|
|
|
web_ui_controller_factory_.get());
|
2013-03-13 19:12:05 +00:00
|
|
|
}
|
|
|
|
|
2013-10-23 16:13:24 +00:00
|
|
|
void BrowserMainParts::PostMainMessageLoopRun() {
|
|
|
|
browser_context_.reset();
|
|
|
|
}
|
|
|
|
|
2013-04-02 00:10:00 +00:00
|
|
|
BrowserContext* BrowserMainParts::CreateBrowserContext() {
|
|
|
|
return new BrowserContext;
|
|
|
|
}
|
|
|
|
|
2013-11-17 22:51:19 +00:00
|
|
|
} // namespace brightray
|