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"
21 class DataFileBrowserCldDataProvider
: public BrowserCldDataProvider
{
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
;
32 void SendCldDataResponseInternal(const base::File
*,
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_