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

Side by Side Diff: remoting/host/capturer_mac.mm

Issue 10785047: Remove all the OS X 10.6 SDK forward declarations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months 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
« no previous file with comments | « net/base/test_root_certs_mac.cc ('k') | skia/ext/skia_utils_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
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 "remoting/host/capturer.h" 5 #include "remoting/host/capturer.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <Cocoa/Cocoa.h> 8 #include <Cocoa/Cocoa.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <IOKit/pwr_mgt/IOPMLib.h> 10 #include <IOKit/pwr_mgt/IOPMLib.h>
11 #include <OpenGL/CGLMacro.h> 11 #include <OpenGL/CGLMacro.h>
12 #include <OpenGL/OpenGL.h> 12 #include <OpenGL/OpenGL.h>
13 #include <stddef.h> 13 #include <stddef.h>
14 14
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/mac/mac_util.h" 16 #include "base/mac/mac_util.h"
17 #include "base/mac/scoped_cftyperef.h" 17 #include "base/mac/scoped_cftyperef.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/synchronization/waitable_event.h" 19 #include "base/synchronization/waitable_event.h"
20 #include "base/time.h" 20 #include "base/time.h"
21 #include "remoting/base/capture_data.h" 21 #include "remoting/base/capture_data.h"
22 #include "remoting/base/util.h" 22 #include "remoting/base/util.h"
23 #include "remoting/host/capturer_helper.h" 23 #include "remoting/host/capturer_helper.h"
24 #include "remoting/proto/control.pb.h" 24 #include "remoting/proto/control.pb.h"
25 25
26 #if !defined(MAC_OS_X_VERSION_10_6) || \
27 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
28
29 @interface NSCursor (SnowLeopardSDKDeclarations)
30 + (NSCursor*)currentSystemCursor;
31 @end
32
33 @interface NSImage (SnowLeopardSDKDeclarations)
34 - (CGImageRef)CGImageForProposedRect:(NSRect*)proposedDestRect
35 context:(NSGraphicsContext*)referenceContext
36 hints:(NSDictionary*)hints;
37 @end
38
39 #endif // MAC_OS_X_VERSION_10_6
40
41 namespace remoting { 26 namespace remoting {
42 27
43 namespace { 28 namespace {
44 29
45 SkIRect CGRectToSkIRect(const CGRect& rect) { 30 SkIRect CGRectToSkIRect(const CGRect& rect) {
46 SkIRect sk_rect = { 31 SkIRect sk_rect = {
47 SkScalarRound(rect.origin.x), 32 SkScalarRound(rect.origin.x),
48 SkScalarRound(rect.origin.y), 33 SkScalarRound(rect.origin.y),
49 SkScalarRound(rect.origin.x + rect.size.width), 34 SkScalarRound(rect.origin.x + rect.size.width),
50 SkScalarRound(rect.origin.y + rect.size.height) 35 SkScalarRound(rect.origin.y + rect.size.height)
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 Capturer* Capturer::Create() { 768 Capturer* Capturer::Create() {
784 CapturerMac* capturer = new CapturerMac(); 769 CapturerMac* capturer = new CapturerMac();
785 if (!capturer->Init()) { 770 if (!capturer->Init()) {
786 delete capturer; 771 delete capturer;
787 capturer = NULL; 772 capturer = NULL;
788 } 773 }
789 return capturer; 774 return capturer;
790 } 775 }
791 776
792 } // namespace remoting 777 } // namespace remoting
OLDNEW
« no previous file with comments | « net/base/test_root_certs_mac.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698