browser_main_parts.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 "base/compiler_specific.h"
  8. #include "base/macros.h"
  9. #include "content/public/browser/browser_main_parts.h"
  10. #if defined(TOOLKIT_VIEWS)
  11. namespace brightray {
  12. class ViewsDelegate;
  13. }
  14. #endif
  15. #if defined(USE_AURA)
  16. namespace wm {
  17. class WMState;
  18. }
  19. #endif
  20. namespace brightray {
  21. class BrowserMainParts : public content::BrowserMainParts {
  22. public:
  23. BrowserMainParts();
  24. ~BrowserMainParts();
  25. protected:
  26. // content::BrowserMainParts:
  27. void 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. private:
  36. #if defined(OS_MACOSX)
  37. void InitializeMainNib();
  38. #endif
  39. #if defined(TOOLKIT_VIEWS)
  40. std::unique_ptr<ViewsDelegate> views_delegate_;
  41. #endif
  42. #if defined(USE_AURA)
  43. std::unique_ptr<wm::WMState> wm_state_;
  44. #endif
  45. DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
  46. };
  47. } // namespace brightray
  48. #endif // BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_