OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/resource_provider/public/cpp/resource_loader.h" | 5 #include "components/resource_provider/public/cpp/resource_loader.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/files/file.h" | 10 #include "base/files/file.h" |
9 #include "mojo/application/public/cpp/application_impl.h" | 11 #include "mojo/application/public/cpp/application_impl.h" |
10 #include "mojo/application/public/cpp/connect.h" | 12 #include "mojo/application/public/cpp/connect.h" |
11 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 13 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
12 #include "mojo/application/public/interfaces/shell.mojom.h" | 14 #include "mojo/application/public/interfaces/shell.mojom.h" |
13 #include "mojo/common/common_type_converters.h" | 15 #include "mojo/common/common_type_converters.h" |
14 #include "mojo/platform_handle/platform_handle_functions.h" | 16 #include "mojo/platform_handle/platform_handle_functions.h" |
15 | 17 |
16 namespace resource_provider { | 18 namespace resource_provider { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 CHECK(!resources.is_null()); | 62 CHECK(!resources.is_null()); |
61 CHECK_EQ(resources.size(), paths.size()); | 63 CHECK_EQ(resources.size(), paths.size()); |
62 for (size_t i = 0; i < resources.size(); ++i) { | 64 for (size_t i = 0; i < resources.size(); ++i) { |
63 resource_map_[paths[i]].reset( | 65 resource_map_[paths[i]].reset( |
64 new base::File(GetFileFromHandle(resources[i].Pass()))); | 66 new base::File(GetFileFromHandle(resources[i].Pass()))); |
65 } | 67 } |
66 loaded_ = true; | 68 loaded_ = true; |
67 } | 69 } |
68 | 70 |
69 } // namespace resource_provider | 71 } // namespace resource_provider |
OLD | NEW |