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 "webkit/support/platform_support.h" | 5 #include "webkit/support/platform_support.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 void BeforeInitialize(bool unit_test_mode) { | 22 void BeforeInitialize(bool unit_test_mode) { |
23 } | 23 } |
24 | 24 |
25 void AfterInitialize(bool unit_test_mode) { | 25 void AfterInitialize(bool unit_test_mode) { |
26 if (unit_test_mode) | 26 if (unit_test_mode) |
27 return; // We don't have a resource pack when running the unit-tests. | 27 return; // We don't have a resource pack when running the unit-tests. |
28 | 28 |
29 FilePath data_path; | 29 FilePath data_path; |
30 PathService::Get(base::DIR_EXE, &data_path); | 30 PathService::Get(base::DIR_EXE, &data_path); |
31 data_path = data_path.Append("DumpRenderTree.pak"); | 31 data_path = data_path.Append("DumpRenderTree.pak"); |
32 ResourceBundle::InitSharedInstanceWithPakFile(data_path); | 32 ResourceBundle::InitSharedInstanceWithPakPath(data_path); |
33 } | 33 } |
34 | 34 |
35 void BeforeShutdown() { | 35 void BeforeShutdown() { |
36 ResourceBundle::CleanupSharedInstance(); | 36 ResourceBundle::CleanupSharedInstance(); |
37 } | 37 } |
38 | 38 |
39 void AfterShutdown() { | 39 void AfterShutdown() { |
40 } | 40 } |
41 | 41 |
42 } // namespace webkit_support | 42 } // namespace webkit_support |
(...skipping 27 matching lines...) Expand all Loading... |
70 if (!success) | 70 if (!success) |
71 LOG(FATAL) << "Failed reading: " << path.value(); | 71 LOG(FATAL) << "Failed reading: " << path.value(); |
72 } | 72 } |
73 return resize_corner_data; | 73 return resize_corner_data; |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 return ResourceBundle::GetSharedInstance().GetRawDataResource( | 77 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
78 resource_id, scale_factor); | 78 resource_id, scale_factor); |
79 } | 79 } |
OLD | NEW |