atom_application.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2013 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "base/callback.h"
  5. #include "base/mac/scoped_nsobject.h"
  6. #include "base/mac/scoped_sending_event.h"
  7. @interface AtomApplication : NSApplication <CrAppProtocol,
  8. CrAppControlProtocol,
  9. NSUserActivityDelegate> {
  10. @private
  11. BOOL handlingSendEvent_;
  12. base::scoped_nsobject<NSUserActivity> currentActivity_ API_AVAILABLE(macosx(10.10));
  13. NSCondition* handoffLock_;
  14. BOOL updateReceived_;
  15. base::Callback<bool()> shouldShutdown_;
  16. }
  17. + (AtomApplication*)sharedApplication;
  18. - (void)setShutdownHandler:(base::Callback<bool()>)handler;
  19. // CrAppProtocol:
  20. - (BOOL)isHandlingSendEvent;
  21. // CrAppControlProtocol:
  22. - (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
  23. - (NSUserActivity*)getCurrentActivity API_AVAILABLE(macosx(10.10));
  24. - (void)setCurrentActivity:(NSString*)type
  25. withUserInfo:(NSDictionary*)userInfo
  26. withWebpageURL:(NSURL*)webpageURL;
  27. - (void)invalidateCurrentActivity;
  28. - (void)updateCurrentActivity:(NSString*)type
  29. withUserInfo:(NSDictionary*)userInfo;
  30. @end