chrome_browser_application_mac.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 file.
  4. #ifndef CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
  5. #define CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
  6. #ifdef __OBJC__
  7. #import <AppKit/AppKit.h>
  8. #include <stddef.h>
  9. #import "base/mac/scoped_sending_event.h"
  10. #import "base/message_loop/message_pump_mac.h"
  11. @interface BrowserCrApplication : NSApplication<CrAppProtocol,
  12. CrAppControlProtocol> {
  13. @private
  14. BOOL _handlingSendEvent;
  15. }
  16. // Our implementation of |-terminate:| only attempts to terminate the
  17. // application, i.e., begins a process which may lead to termination. This
  18. // method cancels that process.
  19. - (void)cancelTerminate:(id)sender;
  20. @end
  21. #endif // __OBJC__
  22. namespace chrome_browser_application_mac {
  23. // To be used to instantiate BrowserCrApplication from C++ code.
  24. void RegisterBrowserCrApp();
  25. // Calls -[NSApp terminate:].
  26. void Terminate();
  27. // Cancels a termination started by |Terminate()|.
  28. void CancelTerminate();
  29. } // namespace chrome_browser_application_mac
  30. #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_