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

Side by Side Diff: webkit/support/platform_support_mac.mm

Issue 9374020: mac: Remove InitWebCoreSystemInterface() calls from many random places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 12 #include "base/file_util.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/mac/bundle_locations.h" 14 #include "base/mac/bundle_locations.h"
15 #include "base/mac/mac_util.h" 15 #include "base/mac/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 "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "grit/webkit_resources.h" 19 #include "grit/webkit_resources.h"
20 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface .h"
21 #include "ui/base/resource/data_pack.h" 20 #include "ui/base/resource/data_pack.h"
22 #include "webkit/plugins/npapi/plugin_list.h" 21 #include "webkit/plugins/npapi/plugin_list.h"
23 #include "webkit/support/test_webkit_platform_support.h" 22 #include "webkit/support/test_webkit_platform_support.h"
24 #import "webkit/support/drt_application_mac.h" 23 #import "webkit/support/drt_application_mac.h"
25 #import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h" 24 #import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h"
26 25
27 static ui::DataPack* g_resource_data_pack = NULL; 26 static ui::DataPack* g_resource_data_pack = NULL;
28 27
29 namespace webkit_support { 28 namespace webkit_support {
30 29
31 static NSAutoreleasePool* autorelease_pool; 30 static NSAutoreleasePool* autorelease_pool;
32 31
33 void BeforeInitialize(bool unit_test_mode) { 32 void BeforeInitialize(bool unit_test_mode) {
34 [CrDrtApplication sharedApplication]; 33 [CrDrtApplication sharedApplication];
35 // Need to initialize NSAutoreleasePool before InitWebCoreSystemInterface().
36 autorelease_pool = [[NSAutoreleasePool alloc] init]; 34 autorelease_pool = [[NSAutoreleasePool alloc] init];
37 DCHECK(autorelease_pool); 35 DCHECK(autorelease_pool);
38 InitWebCoreSystemInterface();
39 } 36 }
40 37
41 #if OBJC_API_VERSION == 2 38 #if OBJC_API_VERSION == 2
42 static void SwizzleAllMethods(Class imposter, Class original) { 39 static void SwizzleAllMethods(Class imposter, Class original) {
43 unsigned int imposterMethodCount = 0; 40 unsigned int imposterMethodCount = 0;
44 Method* imposterMethods = 41 Method* imposterMethods =
45 class_copyMethodList(imposter, &imposterMethodCount); 42 class_copyMethodList(imposter, &imposterMethodCount);
46 43
47 unsigned int originalMethodCount = 0; 44 unsigned int originalMethodCount = 0;
48 Method* originalMethods = 45 Method* originalMethods =
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 221 }
225 } 222 }
226 return resize_corner_data; 223 return resize_corner_data;
227 } 224 }
228 } 225 }
229 base::StringPiece res; 226 base::StringPiece res;
230 if (g_resource_data_pack) 227 if (g_resource_data_pack)
231 g_resource_data_pack->GetStringPiece(resource_id, &res); 228 g_resource_data_pack->GetStringPiece(resource_id, &res);
232 return res; 229 return res;
233 } 230 }
OLDNEW
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | webkit/tools/test_shell/test_shell_platform_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698