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 "grit/webkit_resources.h" | 13 #include "grit/webkit_resources.h" |
14 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 15 #include "ui/base/resource/resource_handle.h" |
15 #include "webkit/support/test_webkit_platform_support.h" | 16 #include "webkit/support/test_webkit_platform_support.h" |
16 | 17 |
17 namespace webkit_support { | 18 namespace webkit_support { |
18 | 19 |
19 // TODO(tkent): Implement some of the followings for platform-dependent tasks | 20 // TODO(tkent): Implement some of the followings for platform-dependent tasks |
20 // such as loading resource. | 21 // such as loading resource. |
21 | 22 |
22 void BeforeInitialize(bool unit_test_mode) { | 23 void BeforeInitialize(bool unit_test_mode) { |
23 } | 24 } |
24 | 25 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if (resize_corner_data.empty()) { | 66 if (resize_corner_data.empty()) { |
66 FilePath path = resources_path.Append("textAreaResizeCorner.png"); | 67 FilePath path = resources_path.Append("textAreaResizeCorner.png"); |
67 bool success = file_util::ReadFileToString(path, &resize_corner_data); | 68 bool success = file_util::ReadFileToString(path, &resize_corner_data); |
68 if (!success) | 69 if (!success) |
69 LOG(FATAL) << "Failed reading: " << path.value(); | 70 LOG(FATAL) << "Failed reading: " << path.value(); |
70 } | 71 } |
71 return resize_corner_data; | 72 return resize_corner_data; |
72 } | 73 } |
73 } | 74 } |
74 | 75 |
75 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); | 76 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 77 resource_id, ui::ResourceHandle::kScaleFactorNone); |
76 } | 78 } |
OLD | NEW |