WebKit2Prefix.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright (C) 2010 Apple Inc. All rights reserved.
  3. * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
  15. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  16. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  17. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
  18. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  19. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  20. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  21. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  22. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  23. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  24. * THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #if defined (BUILDING_GTK__)
  27. #include "autotoolsconfig.h"
  28. #endif /* defined (BUILDING_GTK__) */
  29. #include <wtf/Platform.h>
  30. #if PLATFORM(MAC)
  31. #define ENABLE_WEB_PROCESS_SANDBOX 1
  32. #if ENABLE(NETSCAPE_PLUGIN_API)
  33. #define ENABLE_PLUGIN_PROCESS 1
  34. #endif
  35. #define ENABLE_NETWORK_PROCESS 1
  36. #define ENABLE_MEMORY_SAMPLER 1
  37. #define ENABLE_CUSTOM_PROTOCOLS 1
  38. #include <CoreFoundation/CoreFoundation.h>
  39. #include <CoreGraphics/CoreGraphics.h>
  40. #ifdef __OBJC__
  41. #import <Foundation/Foundation.h>
  42. #import <WebCore/EmptyProtocolDefinitions.h>
  43. #if USE(APPKIT)
  44. #import <Cocoa/Cocoa.h>
  45. #endif
  46. #endif
  47. #if ENABLE(PLUGIN_PROCESS)
  48. #define ENABLE_SHARED_WORKER_PROCESS 1
  49. #endif
  50. #else
  51. #define ENABLE_SHARED_WORKER_PROCESS 1
  52. #endif
  53. /* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
  54. * to allow C++ code that expects exceptions to build. These definitions
  55. * interfere with Objective-C++ uses of Objective-C exception handlers, which
  56. * use |@try| and |@catch|. As a workaround, undefine these macros. */
  57. #ifdef __cplusplus
  58. #include <algorithm> // needed for exception_defines.h
  59. #endif
  60. #ifdef __OBJC__
  61. #undef try
  62. #undef catch
  63. #endif
  64. #ifdef __cplusplus
  65. #define new ("if you use new/delete make sure to include config.h at the top of the file"())
  66. #define delete ("if you use new/delete make sure to include config.h at the top of the file"())
  67. #endif