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-13 19:42:16 +00:00
|
|
|
#ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
|
|
|
|
#define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
|
2013-03-13 19:12:05 +00:00
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
#include "content/public/browser/browser_main_parts.h"
|
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
class BrowserContext;
|
2013-05-14 06:45:34 +00:00
|
|
|
class WebUIControllerFactory;
|
2013-03-13 19:12:05 +00:00
|
|
|
|
|
|
|
class BrowserMainParts : public content::BrowserMainParts {
|
|
|
|
public:
|
|
|
|
BrowserMainParts();
|
|
|
|
~BrowserMainParts();
|
|
|
|
|
|
|
|
BrowserContext* browser_context() { return browser_context_.get(); }
|
|
|
|
|
|
|
|
protected:
|
2013-04-02 00:10:00 +00:00
|
|
|
// Subclasses should override this to provide their own BrowserContxt implementation. The caller
|
|
|
|
// takes ownership of the returned object.
|
|
|
|
virtual BrowserContext* CreateBrowserContext();
|
|
|
|
|
2013-03-13 19:12:05 +00:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
virtual void PreMainMessageLoopStart() OVERRIDE;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
virtual void PreMainMessageLoopRun() OVERRIDE;
|
2013-10-23 16:13:24 +00:00
|
|
|
virtual void PostMainMessageLoopRun() OVERRIDE;
|
2013-03-13 19:12:05 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
scoped_ptr<BrowserContext> browser_context_;
|
2013-05-14 06:45:34 +00:00
|
|
|
scoped_ptr<WebUIControllerFactory> web_ui_controller_factory_;
|
2013-03-13 19:12:05 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-03-13 19:42:16 +00:00
|
|
|
#endif
|