Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: base/chrome_application_mac.h

Issue 385009: [Mac] ScopedSendingEvent finds NSApp by itself. (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/chrome_application_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_CHROME_APPLICATION_MAC_H_ 5 #ifndef BASE_CHROME_APPLICATION_MAC_H_
6 #define BASE_CHROME_APPLICATION_MAC_H_ 6 #define BASE_CHROME_APPLICATION_MAC_H_
7 7
8 #import <AppKit/AppKit.h> 8 #import <AppKit/AppKit.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 @interface CrApplication : NSApplication { 12 @interface CrApplication : NSApplication {
13 @private 13 @private
14 BOOL handlingSendEvent_; 14 BOOL handlingSendEvent_;
15 } 15 }
16 @property(readonly, 16 @property(readonly,
17 getter=isHandlingSendEvent, 17 getter=isHandlingSendEvent,
18 nonatomic) BOOL handlingSendEvent; 18 nonatomic) BOOL handlingSendEvent;
19 19
20 + (NSApplication*)sharedApplication; 20 + (NSApplication*)sharedApplication;
21 @end 21 @end
22 22
23 namespace chrome_application_mac { 23 namespace chrome_application_mac {
24 24
25 // Controls the state of |handlingSendEvent_| in the event loop so that it is 25 // Controls the state of |handlingSendEvent_| in the event loop so that it is
26 // reset properly. 26 // reset properly.
27 class ScopedSendingEvent { 27 class ScopedSendingEvent {
28 public: 28 public:
29 explicit ScopedSendingEvent(CrApplication* app); 29 ScopedSendingEvent();
30 ~ScopedSendingEvent(); 30 ~ScopedSendingEvent();
31 31
32 private: 32 private:
33 CrApplication* app_; 33 CrApplication* app_;
34 BOOL handling_; 34 BOOL handling_;
35 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); 35 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent);
36 }; 36 };
37 37
38 } // chrome_application_mac 38 } // chrome_application_mac
39 39
40 #endif // BASE_CHROME_APPLICATION_MAC_H_ 40 #endif // BASE_CHROME_APPLICATION_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | base/chrome_application_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698