123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
- #define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
- #include <memory>
- #include <string>
- #include "base/compiler_specific.h"
- #include "base/macros.h"
- #include "base/path_service.h"
- #include "brightray/browser/brightray_paths.h"
- #include "brightray/browser/io_thread.h"
- #include "content/public/browser/browser_main_parts.h"
- #include "ui/views/layout/layout_provider.h"
- #if defined(USE_AURA)
- namespace wm {
- class WMState;
- }
- #endif
- namespace brightray {
- class BrowserMainParts : public content::BrowserMainParts {
- public:
- BrowserMainParts();
- ~BrowserMainParts() override;
- IOThread* io_thread() const { return io_thread_.get(); }
- protected:
-
- void PreEarlyInitialization() override;
- void ToolkitInitialized() override;
- void PreMainMessageLoopStart() override;
- void PreMainMessageLoopRun() override;
- void PostMainMessageLoopStart() override;
- void PostMainMessageLoopRun() override;
- int PreCreateThreads() override;
- void PostDestroyThreads() override;
- private:
- #if defined(OS_MACOSX)
- void InitializeMainNib();
- void OverrideAppLogsPath();
- #endif
- std::unique_ptr<IOThread> io_thread_;
- #if defined(USE_AURA)
- std::unique_ptr<wm::WMState> wm_state_;
- #endif
- std::unique_ptr<views::LayoutProvider> layout_provider_;
- std::string custom_locale_;
- DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
- };
- }
- #endif
|