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

Side by Side Diff: content/common/chrome_application_mac.mm

Issue 8771028: [Mac] Remove content/ CrApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk for commit-queue. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « content/common/chrome_application_mac.h ('k') | content/common/sandbox_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
(Empty)
1 // Copyright (c) 2011 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
5 #import "content/common/chrome_application_mac.h"
6
7 #include "base/logging.h"
8
9 @interface CrApplication ()
10 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
11 @end
12
13 @implementation CrApplication
14 // Initialize NSApplication using the custom subclass. Check whether NSApp
15 // was already initialized using another class, because that would break
16 // some things.
17 + (NSApplication*)sharedApplication {
18 NSApplication* app = [super sharedApplication];
19 if (![NSApp isKindOfClass:self]) {
20 DLOG(ERROR) << "NSApp should be of type " << [[self className] UTF8String]
21 << ", not " << [[NSApp className] UTF8String];
22 DCHECK(false) << "NSApp is of wrong type";
23 }
24 return app;
25 }
26
27 - (BOOL)isHandlingSendEvent {
28 return handlingSendEvent_;
29 }
30
31 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
32 handlingSendEvent_ = handlingSendEvent;
33 }
34
35 - (void)clearIsHandlingSendEvent {
36 [self setHandlingSendEvent:NO];
37 }
38
39 - (void)sendEvent:(NSEvent*)event {
40 base::mac::ScopedSendingEvent sendingEventScoper;
41 [super sendEvent:event];
42 }
43
44 @end
45
46 namespace chrome_application_mac {
47
48 void RegisterCrApp() {
49 [CrApplication sharedApplication];
50 }
51
52 } // namespace chrome_application_mac
OLDNEW
« no previous file with comments | « content/common/chrome_application_mac.h ('k') | content/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698