summaryrefslogtreecommitdiffstats
path: root/content/common/chrome_application_mac.h
blob: 35e09a7d36a331c8ec9a0462eea37ba47676449b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_CHROME_APPLICATION_MAC_H_
#define CONTENT_COMMON_CHROME_APPLICATION_MAC_H_
#pragma once

#if defined(__OBJC__)

#import <AppKit/AppKit.h>

#include "base/basictypes.h"
#import "base/mac/scoped_sending_event.h"

@interface CrApplication : NSApplication<CrAppControlProtocol> {
 @private
  BOOL handlingSendEvent_;
}
- (BOOL)isHandlingSendEvent;

// Unconditionally clears |handlingSendEvent_|.  This should not be
// used except in recovering from some sort of exceptional condition.
- (void)clearIsHandlingSendEvent;

+ (NSApplication*)sharedApplication;
@end

#endif  // defined(__OBJC__)

namespace chrome_application_mac {

// To be used to instantiate CrApplication from C++ code.
void RegisterCrApp();

}  // namespace chrome_application_mac

#endif  // CONTENT_COMMON_CHROME_APPLICATION_MAC_H_