1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_
8 #include "base/files/file.h"
9 #include "base/files/memory_mapped_file.h"
10 #include "base/lazy_instance.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "components/translate/content/renderer/renderer_cld_data_provider.h"
14 #include "ipc/ipc_platform_file.h"
18 class StaticRendererCldDataProvider : public RendererCldDataProvider {
20 explicit StaticRendererCldDataProvider();
21 ~StaticRendererCldDataProvider() override;
22 // RendererCldDataProvider implementations:
23 bool OnMessageReceived(const IPC::Message&) override;
24 void SendCldDataRequest() override;
25 void SetCldAvailableCallback(base::Callback<void(void)>) override;
26 bool IsCldDataAvailable() override;
29 DISALLOW_COPY_AND_ASSIGN(StaticRendererCldDataProvider);
32 } // namespace translate
34 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_