| 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 #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 "gfx/gfx_module.h" | |
| 14 #include "grit/webkit_resources.h" | 13 #include "grit/webkit_resources.h" |
| 15 #include "ui/base/resource/data_pack.h" | 14 #include "ui/base/resource/data_pack.h" |
| 15 #include "ui/gfx/gfx_module.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // Data resources on linux. This is a pointer to the mmapped resources file. | 19 // Data resources on linux. This is a pointer to the mmapped resources file. |
| 20 ui::DataPack* g_resource_data_pack = NULL; | 20 ui::DataPack* g_resource_data_pack = NULL; |
| 21 | 21 |
| 22 base::StringPiece TestResourceProvider(int resource_id) { | 22 base::StringPiece TestResourceProvider(int resource_id) { |
| 23 base::StringPiece res; | 23 base::StringPiece res; |
| 24 if (g_resource_data_pack) | 24 if (g_resource_data_pack) |
| 25 g_resource_data_pack->GetStringPiece(resource_id, &res); | 25 g_resource_data_pack->GetStringPiece(resource_id, &res); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 return resize_corner_data; | 95 return resize_corner_data; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 base::StringPiece res; | 98 base::StringPiece res; |
| 99 g_resource_data_pack->GetStringPiece(resource_id, &res); | 99 g_resource_data_pack->GetStringPiece(resource_id, &res); |
| 100 return res; | 100 return res; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace webkit_glue | 103 } // namespace webkit_glue |
| OLD | NEW |