| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 6 | 6 |
| 7 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // These are not documented, so use only after checking -respondsToSelector:. | 79 // These are not documented, so use only after checking -respondsToSelector:. |
| 80 @interface NSApplication (UndocumentedSpeechMethods) | 80 @interface NSApplication (UndocumentedSpeechMethods) |
| 81 - (void)speakString:(NSString*)string; | 81 - (void)speakString:(NSString*)string; |
| 82 - (void)stopSpeaking:(id)sender; | 82 - (void)stopSpeaking:(id)sender; |
| 83 - (BOOL)isSpeaking; | 83 - (BOOL)isSpeaking; |
| 84 @end | 84 @end |
| 85 | 85 |
| 86 // Declare things that are part of the 10.7 SDK. | 86 // Declare things that are part of the 10.7 SDK. |
| 87 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 87 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
| 88 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 88 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
| 89 | |
| 90 @interface NSEvent (LionAPI) | |
| 91 - (NSEventPhase)phase; | |
| 92 @end | |
| 93 | |
| 94 @interface NSWindow (LionAPI) | |
| 95 - (CGFloat)backingScaleFactor; | |
| 96 @end | |
| 97 | |
| 98 @interface NSView (NSOpenGLSurfaceResolutionLionAPI) | 89 @interface NSView (NSOpenGLSurfaceResolutionLionAPI) |
| 99 - (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; | 90 - (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; |
| 100 @end | 91 @end |
| 101 | 92 |
| 102 static NSString* const NSWindowDidChangeBackingPropertiesNotification = | 93 static NSString* const NSWindowDidChangeBackingPropertiesNotification = |
| 103 @"NSWindowDidChangeBackingPropertiesNotification"; | 94 @"NSWindowDidChangeBackingPropertiesNotification"; |
| 104 static NSString* const NSBackingPropertyOldScaleFactorKey = | 95 static NSString* const NSBackingPropertyOldScaleFactorKey = |
| 105 @"NSBackingPropertyOldScaleFactorKey"; | 96 @"NSBackingPropertyOldScaleFactorKey"; |
| 106 // Note: Apple's example code (linked from the comment above | 97 // Note: Apple's example code (linked from the comment above |
| 107 // -windowDidChangeBackingProperties:) uses | 98 // -windowDidChangeBackingProperties:) uses |
| (...skipping 3456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3564 return YES; | 3555 return YES; |
| 3565 } | 3556 } |
| 3566 | 3557 |
| 3567 - (BOOL)isOpaque { | 3558 - (BOOL)isOpaque { |
| 3568 if (renderWidgetHostView_->use_core_animation_) | 3559 if (renderWidgetHostView_->use_core_animation_) |
| 3569 return YES; | 3560 return YES; |
| 3570 return [super isOpaque]; | 3561 return [super isOpaque]; |
| 3571 } | 3562 } |
| 3572 | 3563 |
| 3573 @end | 3564 @end |
| OLD | NEW |