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"
|
2015-09-05 12:03:18 +00:00
|
|
|
#include "base/memory/ref_counted.h"
|
2013-03-13 19:12:05 +00:00
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
#include "content/public/browser/browser_main_parts.h"
|
|
|
|
|
2015-07-23 07:04:47 +00:00
|
|
|
namespace devtools_http_handler {
|
2015-03-09 02:53:37 +00:00
|
|
|
class DevToolsHttpHandler;
|
|
|
|
}
|
|
|
|
|
2014-07-03 08:44:58 +00:00
|
|
|
#if defined(TOOLKIT_VIEWS)
|
2014-07-04 13:41:22 +00:00
|
|
|
namespace brightray {
|
|
|
|
class ViewsDelegate;
|
|
|
|
}
|
2014-07-09 12:05:02 +00:00
|
|
|
#endif
|
2014-07-04 13:41:22 +00:00
|
|
|
|
2014-07-09 12:05:02 +00:00
|
|
|
#if defined(USE_AURA) && defined(USE_X11)
|
2014-07-03 08:44:58 +00:00
|
|
|
namespace wm {
|
|
|
|
class WMState;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-03-13 19:12:05 +00:00
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
class BrowserContext;
|
|
|
|
|
|
|
|
class BrowserMainParts : public content::BrowserMainParts {
|
2013-11-17 23:17:23 +00:00
|
|
|
public:
|
2013-03-13 19:12:05 +00:00
|
|
|
BrowserMainParts();
|
|
|
|
~BrowserMainParts();
|
|
|
|
|
|
|
|
BrowserContext* browser_context() { return browser_context_.get(); }
|
|
|
|
|
2013-11-17 23:17:23 +00:00
|
|
|
protected:
|
2014-07-03 09:18:24 +00:00
|
|
|
// content::BrowserMainParts:
|
2015-06-05 04:07:27 +00:00
|
|
|
void PreEarlyInitialization() override;
|
|
|
|
void ToolkitInitialized() override;
|
|
|
|
void PreMainMessageLoopStart() override;
|
|
|
|
void PreMainMessageLoopRun() override;
|
2015-10-04 07:40:51 +00:00
|
|
|
void PostMainMessageLoopStart() override;
|
2015-06-05 04:07:27 +00:00
|
|
|
void PostMainMessageLoopRun() override;
|
|
|
|
int PreCreateThreads() override;
|
2013-03-13 19:12:05 +00:00
|
|
|
|
2013-11-17 23:17:23 +00:00
|
|
|
private:
|
2014-07-03 08:12:12 +00:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
void InitializeMainNib();
|
|
|
|
#endif
|
|
|
|
|
2015-09-05 12:03:18 +00:00
|
|
|
scoped_refptr<BrowserContext> browser_context_;
|
2015-07-23 07:04:47 +00:00
|
|
|
scoped_ptr<devtools_http_handler::DevToolsHttpHandler> devtools_http_handler_;
|
2013-03-13 19:12:05 +00:00
|
|
|
|
2014-07-03 08:44:58 +00:00
|
|
|
#if defined(TOOLKIT_VIEWS)
|
2014-07-04 13:41:22 +00:00
|
|
|
scoped_ptr<ViewsDelegate> views_delegate_;
|
2014-07-09 12:05:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(USE_AURA) && defined(USE_X11)
|
2014-07-03 08:44:58 +00:00
|
|
|
scoped_ptr<wm::WMState> wm_state_;
|
|
|
|
#endif
|
|
|
|
|
2013-03-13 19:12:05 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
|
|
|
|
};
|
|
|
|
|
2013-11-17 23:17:23 +00:00
|
|
|
} // namespace brightray
|
2013-03-13 19:12:05 +00:00
|
|
|
|
2013-03-13 19:42:16 +00:00
|
|
|
#endif
|