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

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

Issue 8763017: [Mac] Move MessagePump CrAppProtocol dependency to setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sigh, minimal content/ change, just to see. 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 | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 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 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 #import "content/common/chrome_application_mac.h" 5 #import "content/common/chrome_application_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 @interface CrApplication () 9 @interface CrApplication ()
10 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent; 10 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
11 @end 11 @end
12 12
13 @implementation CrApplication 13 @implementation CrApplication
14 // Initialize NSApplication using the custom subclass. Check whether NSApp 14 // Initialize NSApplication using the custom subclass. Check whether NSApp
15 // was already initialized using another class, because that would break 15 // was already initialized using another class, because that would break
16 // some things. 16 // some things.
17 + (NSApplication*)sharedApplication { 17 + (NSApplication*)sharedApplication {
18 NSApplication* app = [super sharedApplication]; 18 NSApplication* app = [super sharedApplication];
19 if (![NSApp isKindOfClass:self]) { 19 if (![app conformsToProtocol:@protocol(CrAppControlProtocol)]) {
20 DLOG(ERROR) << "NSApp should be of type " << [[self className] UTF8String] 20 // TODO(shess): This is necessary until all of the references to
21 << ", not " << [[NSApp className] UTF8String]; 21 // CrApplication are removed.
22 DCHECK(false) << "NSApp is of wrong type"; 22 DLOG(ERROR) << "Existing NSApp (class " << [[app className] UTF8String]
23 << ") does not conform to required protocol.";
24 NOTREACHED();
23 } 25 }
24 return app; 26 return app;
25 } 27 }
26 28
27 - (BOOL)isHandlingSendEvent { 29 - (BOOL)isHandlingSendEvent {
28 return handlingSendEvent_; 30 return handlingSendEvent_;
29 } 31 }
30 32
31 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 33 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
32 handlingSendEvent_ = handlingSendEvent; 34 handlingSendEvent_ = handlingSendEvent;
(...skipping 10 matching lines...) Expand all
43 45
44 @end 46 @end
45 47
46 namespace chrome_application_mac { 48 namespace chrome_application_mac {
47 49
48 void RegisterCrApp() { 50 void RegisterCrApp() {
49 [CrApplication sharedApplication]; 51 [CrApplication sharedApplication];
50 } 52 }
51 53
52 } // namespace chrome_application_mac 54 } // namespace chrome_application_mac
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698