browser_main_parts.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE-CHROMIUM file.
  4. #ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
  5. #define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
  6. #include <memory>
  7. #include <string>
  8. #include "base/compiler_specific.h"
  9. #include "base/macros.h"
  10. #include "base/path_service.h"
  11. #include "brightray/browser/brightray_paths.h"
  12. #include "content/public/browser/browser_main_parts.h"
  13. #include "ui/views/layout/layout_provider.h"
  14. #if defined(USE_AURA)
  15. namespace wm {
  16. class WMState;
  17. }
  18. #endif
  19. namespace brightray {
  20. class BrowserMainParts : public content::BrowserMainParts {
  21. public:
  22. BrowserMainParts();
  23. ~BrowserMainParts() override;
  24. protected:
  25. // content::BrowserMainParts:
  26. bool ShouldContentCreateFeatureList() override;
  27. int PreEarlyInitialization() override;
  28. void ToolkitInitialized() override;
  29. void PreMainMessageLoopStart() override;
  30. void PreMainMessageLoopRun() override;
  31. void PostMainMessageLoopStart() override;
  32. void PostMainMessageLoopRun() override;
  33. int PreCreateThreads() override;
  34. void PostDestroyThreads() override;
  35. void InitializeFeatureList();
  36. private:
  37. #if defined(OS_MACOSX)
  38. void InitializeMainNib();
  39. void OverrideAppLogsPath();
  40. #endif
  41. #if defined(USE_AURA)
  42. std::unique_ptr<wm::WMState> wm_state_;
  43. #endif
  44. std::unique_ptr<views::LayoutProvider> layout_provider_;
  45. std::string custom_locale_;
  46. DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
  47. };
  48. } // namespace brightray
  49. #endif // BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_