Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / components / translate / content / browser / data_file_browser_cld_data_provider.h
blob687d2b591a66da7cfebae07dd072d8617b46e151
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_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_
8 #include "base/files/file.h"
9 #include "base/files/file_path.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "components/translate/content/browser/browser_cld_data_provider.h"
15 namespace content {
16 class WebContents;
19 namespace translate {
21 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider {
22 public:
23 explicit DataFileBrowserCldDataProvider(content::WebContents*);
24 ~DataFileBrowserCldDataProvider() override;
26 // BrowserCldDataProvider implementations:
27 bool OnMessageReceived(const IPC::Message&) override;
28 void OnCldDataRequest() override;
29 void SendCldDataResponse() override;
31 private:
32 void SendCldDataResponseInternal(const base::File*,
33 const uint64,
34 const uint64);
35 static void OnCldDataRequestInternal();
37 content::WebContents* web_contents_;
38 scoped_ptr<base::WeakPtrFactory<DataFileBrowserCldDataProvider> >
39 weak_pointer_factory_;
41 DISALLOW_COPY_AND_ASSIGN(DataFileBrowserCldDataProvider);
44 } // namespace translate
46 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_