electron/brightray/browser/browser_main_parts.h

72 lines
1.7 KiB
C
Raw Normal View History

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.
#ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
#define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
2013-03-13 19:12:05 +00:00
2017-05-18 23:04:05 +00:00
#include <memory>
2013-03-13 19:12:05 +00:00
#include "base/compiler_specific.h"
2017-05-18 21:30:32 +00:00
#include "base/macros.h"
#include "base/path_service.h"
#include "brightray/browser/brightray_paths.h"
#include "brightray/browser/io_thread.h"
2013-03-13 19:12:05 +00:00
#include "content/public/browser/browser_main_parts.h"
2017-07-03 16:23:47 +00:00
#include "ui/views/layout/layout_provider.h"
2013-03-13 19:12:05 +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
#if defined(USE_AURA)
namespace wm {
class WMState;
}
#endif
2013-03-13 19:12:05 +00:00
namespace brightray {
class BrowserMainParts : public content::BrowserMainParts {
public:
2013-03-13 19:12:05 +00:00
BrowserMainParts();
~BrowserMainParts();
protected:
// 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;
2016-05-31 07:06:51 +00:00
void PostDestroyThreads() override;
2013-03-13 19:12:05 +00:00
private:
#if defined(OS_MACOSX)
void InitializeMainNib();
void OverrideAppLogsPath();
#endif
std::unique_ptr<IOThread> io_thread_;
#if defined(TOOLKIT_VIEWS)
std::unique_ptr<ViewsDelegate> views_delegate_;
2014-07-09 12:05:02 +00:00
#endif
#if defined(USE_AURA)
std::unique_ptr<wm::WMState> wm_state_;
#endif
2017-07-03 16:23:47 +00:00
std::unique_ptr<views::LayoutProvider> layout_provider_;
2013-03-13 19:12:05 +00:00
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
};
} // namespace brightray
2013-03-13 19:12:05 +00:00
#endif // BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_