summaryrefslogtreecommitdiffstats
path: root/base/mac
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 00:43:36 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 00:43:36 +0000
commitc040fee08c10f588656d3f7e7a701906c175bbd7 (patch)
treea9ad1c154a7bf549481ac2d6dbd69ac3269e5853 /base/mac
parent93a1f0ee89ce69fe2de3a223e8dee6a87cbb205e (diff)
downloadchromium_src-c040fee08c10f588656d3f7e7a701906c175bbd7.zip
chromium_src-c040fee08c10f588656d3f7e7a701906c175bbd7.tar.gz
chromium_src-c040fee08c10f588656d3f7e7a701906c175bbd7.tar.bz2
Move base/cocoa_protocols_mac.h to base/mac/cocoa_protocols.h
Fix users of this file to use the new location. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6019004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac')
-rw-r--r--base/mac/cocoa_protocols.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/base/mac/cocoa_protocols.h b/base/mac/cocoa_protocols.h
new file mode 100644
index 0000000..9482d51
--- /dev/null
+++ b/base/mac/cocoa_protocols.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2009 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 BASE_COCOA_PROTOCOLS_MAC_H_
+#define BASE_COCOA_PROTOCOLS_MAC_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+
+// GTM also maintinas a list of empty protocols, but only the ones the library
+// requires. Augment that below.
+#import "third_party/GTM/GTMDefines.h"
+
+// The Mac OS X 10.6 SDK introduced new protocols used for delegates. These
+// protocol defintions were not present in earlier releases of the Mac OS X
+// SDK. In order to support building against the new SDK, which requires
+// delegates to conform to these protocols, and earlier SDKs, which do not
+// define these protocols at all, this file will provide empty protocol
+// definitions when used with earlier SDK versions.
+
+#if !defined(MAC_OS_X_VERSION_10_6) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+
+#define DEFINE_EMPTY_PROTOCOL(p) \
+@protocol p \
+@end
+
+DEFINE_EMPTY_PROTOCOL(NSAlertDelegate)
+DEFINE_EMPTY_PROTOCOL(NSApplicationDelegate)
+DEFINE_EMPTY_PROTOCOL(NSControlTextEditingDelegate)
+DEFINE_EMPTY_PROTOCOL(NSMatrixDelegate)
+DEFINE_EMPTY_PROTOCOL(NSMenuDelegate)
+DEFINE_EMPTY_PROTOCOL(NSOpenSavePanelDelegate)
+DEFINE_EMPTY_PROTOCOL(NSOutlineViewDataSource)
+DEFINE_EMPTY_PROTOCOL(NSOutlineViewDelegate)
+DEFINE_EMPTY_PROTOCOL(NSTableViewDataSource)
+DEFINE_EMPTY_PROTOCOL(NSTableViewDelegate)
+DEFINE_EMPTY_PROTOCOL(NSTextFieldDelegate)
+DEFINE_EMPTY_PROTOCOL(NSTextViewDelegate)
+DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
+
+#undef DEFINE_EMPTY_PROTOCOL
+
+#endif
+
+#endif // BASE_COCOA_PROTOCOLS_MAC_H_