summaryrefslogtreecommitdiffstats
path: root/components/resource_provider/resource_provider_impl.h
blob: 8f319d3d79cdf3b29a575a6c796c1d9be3a97e5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_IMPL_H_
#define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_IMPL_H_

#include "base/files/file_path.h"
#include "base/macros.h"
#include "components/resource_provider/public/interfaces/resource_provider.mojom.h"

namespace resource_provider {

// ResourceProvider implementation that loads resources in background threads.
class ResourceProviderImpl : public resource_provider::ResourceProvider {
 public:
  ResourceProviderImpl(const base::FilePath& application_path,
                       const std::string& resource_provider_app_url);
  ~ResourceProviderImpl() override;

 private:
  // ResourceProvider:
  void GetResources(mojo::Array<mojo::String> paths,
                    const GetResourcesCallback& callback) override;

  const base::FilePath application_path_;
  const std::string resource_provider_app_url_;

  DISALLOW_COPY_AND_ASSIGN(ResourceProviderImpl);
};

}  // namespace resource_provider

#endif  // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_IMPL_H_