app_initializer_chromium.mm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2016 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 file.
  4. #if !defined(__has_feature) || !__has_feature(objc_arc)
  5. #error "This file requires ARC support."
  6. #endif
  7. #import "remoting/ios/app/app_initializer.h"
  8. #include <memory>
  9. #import "remoting/ios/app/account_manager_chromium.h"
  10. #import "remoting/ios/app/help_and_feedback.h"
  11. #import "remoting/ios/app/refresh_control_provider_chromium.h"
  12. #import "remoting/ios/facade/remoting_oauth_authentication.h"
  13. #import "remoting/ios/facade/remoting_service.h"
  14. @implementation AppInitializer
  15. + (void)onAppWillFinishLaunching {
  16. // |authentication| is nil by default and needs to be injected here.
  17. RemotingService.instance.authentication =
  18. [[RemotingOAuthAuthentication alloc] init];
  19. HelpAndFeedback.instance = [[HelpAndFeedback alloc] init];
  20. RefreshControlProvider.instance =
  21. [[RefreshControlProviderChromium alloc] init];
  22. remoting::ios::AccountManager::SetInstance(
  23. std::make_unique<remoting::ios::AccountManagerChromium>());
  24. }
  25. + (void)onAppDidFinishLaunching {
  26. }
  27. @end