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" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
13 #include "base/test/test_stub_android.h" | 13 #include "base/test/test_stub_android.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "grit/webkit_resources.h" | 15 #include "grit/webkit_resources.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/base/resource/resource_handle.h" |
17 #include "webkit/support/test_webkit_platform_support.h" | 18 #include "webkit/support/test_webkit_platform_support.h" |
18 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 19 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
19 | 20 |
20 namespace webkit_support { | 21 namespace webkit_support { |
21 | 22 |
22 void BeforeInitialize(bool unit_test_mode) { | 23 void BeforeInitialize(bool unit_test_mode) { |
23 InitAndroidOSPathStub(); | 24 InitAndroidOSPathStub(); |
24 // Set XML_CATALOG_FILES environment variable to blank to prevent libxml from | 25 // Set XML_CATALOG_FILES environment variable to blank to prevent libxml from |
25 // loading and complaining the non-exsistent /etc/xml/catalog file. | 26 // loading and complaining the non-exsistent /etc/xml/catalog file. |
26 setenv("XML_CATALOG_FILES", "", 0); | 27 setenv("XML_CATALOG_FILES", "", 0); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 if (resize_corner_data.empty()) { | 82 if (resize_corner_data.empty()) { |
82 FilePath path = resources_path.Append("textAreaResizeCorner.png"); | 83 FilePath path = resources_path.Append("textAreaResizeCorner.png"); |
83 bool success = file_util::ReadFileToString(path, &resize_corner_data); | 84 bool success = file_util::ReadFileToString(path, &resize_corner_data); |
84 if (!success) | 85 if (!success) |
85 LOG(FATAL) << "Failed reading: " << path.value(); | 86 LOG(FATAL) << "Failed reading: " << path.value(); |
86 } | 87 } |
87 return resize_corner_data; | 88 return resize_corner_data; |
88 } | 89 } |
89 } | 90 } |
90 | 91 |
91 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); | 92 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 93 resource_id, ui::ResourceHandle::kScaleFactorNone); |
92 } | 94 } |
OLD | NEW |