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/renderer/renderer_main_platform_delegate.h" | 5 #include "content/renderer/renderer_main_platform_delegate.h" |
6 | 6 |
7 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <objc/runtime.h> | 9 #include <objc/runtime.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 NULL)) { | 100 NULL)) { |
101 CFMachPortInvalidate(mach_port); | 101 CFMachPortInvalidate(mach_port); |
102 return; | 102 return; |
103 } | 103 } |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 } // namespace | 107 } // namespace |
108 | 108 |
109 RendererMainPlatformDelegate::RendererMainPlatformDelegate( | 109 RendererMainPlatformDelegate::RendererMainPlatformDelegate( |
110 const MainFunctionParams& parameters) | 110 const MainFunctionParams& parameters) {} |
111 : parameters_(parameters) { | |
112 } | |
113 | 111 |
114 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { | 112 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { |
115 } | 113 } |
116 | 114 |
117 // TODO(mac-port): Any code needed to initialize a process for purposes of | 115 // TODO(mac-port): Any code needed to initialize a process for purposes of |
118 // running a renderer needs to also be reflected in chrome_main.cc for | 116 // running a renderer needs to also be reflected in chrome_main.cc for |
119 // --single-process support. | 117 // --single-process support. |
120 void RendererMainPlatformDelegate::PlatformInitialize() { | 118 void RendererMainPlatformDelegate::PlatformInitialize() { |
121 if (base::mac::IsOSYosemiteOrLater()) { | 119 if (base::mac::IsOSYosemiteOrLater()) { |
122 // This is needed by the NSAnimations run for the scrollbars. If we switch | 120 // This is needed by the NSAnimations run for the scrollbars. If we switch |
(...skipping 20 matching lines...) Expand all Loading... |
143 // The sandbox is now engaged. Make sure that the renderer has not connected | 141 // The sandbox is now engaged. Make sure that the renderer has not connected |
144 // itself to Cocoa. | 142 // itself to Cocoa. |
145 CHECK(NSApp == nil); | 143 CHECK(NSApp == nil); |
146 | 144 |
147 DisconnectCFNotificationCenter(); | 145 DisconnectCFNotificationCenter(); |
148 | 146 |
149 return sandbox_initialized; | 147 return sandbox_initialized; |
150 } | 148 } |
151 | 149 |
152 } // namespace content | 150 } // namespace content |
OLD | NEW |