OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/support/platform_support.h" | 5 #include "webkit/support/platform_support.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #import <objc/objc-runtime.h> | 9 #import <objc/objc-runtime.h> |
10 | 10 |
11 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
12 #include "base/data_pack.h" | 12 #include "base/data_pack.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/mac_util.h" | 15 #include "base/mac_util.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "grit/webkit_resources.h" | 18 #include "grit/webkit_resources.h" |
19 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" | 19 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" |
20 #include "webkit/plugins/npapi/plugin_list.h" | 20 #include "webkit/glue/plugins/plugin_list.h" |
21 #import "webkit/support/drt_application_mac.h" | 21 #import "webkit/support/drt_application_mac.h" |
22 #import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h" | 22 #import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h" |
23 | 23 |
24 static base::DataPack* g_resource_data_pack = NULL; | 24 static base::DataPack* g_resource_data_pack = NULL; |
25 | 25 |
26 namespace webkit_support { | 26 namespace webkit_support { |
27 | 27 |
28 static NSAutoreleasePool* autorelease_pool; | 28 static NSAutoreleasePool* autorelease_pool; |
29 | 29 |
30 void BeforeInitialize(bool unit_test_mode) { | 30 void BeforeInitialize(bool unit_test_mode) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 } | 142 } |
143 | 143 |
144 SwizzleNSPasteboard(); | 144 SwizzleNSPasteboard(); |
145 | 145 |
146 // Add <app bundle's parent dir>/plugins to the plugin path so we can load | 146 // Add <app bundle's parent dir>/plugins to the plugin path so we can load |
147 // test plugins. | 147 // test plugins. |
148 FilePath plugins_dir; | 148 FilePath plugins_dir; |
149 PathService::Get(base::DIR_EXE, &plugins_dir); | 149 PathService::Get(base::DIR_EXE, &plugins_dir); |
150 plugins_dir = plugins_dir.AppendASCII("../../../plugins"); | 150 plugins_dir = plugins_dir.AppendASCII("../../../plugins"); |
151 webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); | 151 NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); |
152 } | 152 } |
153 | 153 |
154 void BeforeShutdown() { | 154 void BeforeShutdown() { |
155 } | 155 } |
156 | 156 |
157 void AfterShutdown() { | 157 void AfterShutdown() { |
158 [DumpRenderTreePasteboard releaseLocalPasteboards]; | 158 [DumpRenderTreePasteboard releaseLocalPasteboards]; |
159 [autorelease_pool drain]; | 159 [autorelease_pool drain]; |
160 delete g_resource_data_pack; | 160 delete g_resource_data_pack; |
161 } | 161 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 return res; | 234 return res; |
235 } | 235 } |
236 | 236 |
237 default: | 237 default: |
238 break; | 238 break; |
239 } | 239 } |
240 return base::StringPiece(); | 240 return base::StringPiece(); |
241 } | 241 } |
242 | 242 |
243 } // namespace webkit_glue | 243 } // namespace webkit_glue |
OLD | NEW |