OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVIDER
_H_ | 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_ | 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVIDER
_H_ |
7 | 7 |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "components/translate/content/browser/browser_cld_data_provider.h" | 13 #include "components/translate/content/browser/browser_cld_data_provider.h" |
14 | 14 |
15 namespace translate { | 15 namespace translate { |
16 | 16 |
17 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider { | 17 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider { |
18 public: | 18 public: |
19 explicit DataFileBrowserCldDataProvider(content::WebContents*); | 19 explicit DataFileBrowserCldDataProvider(content::WebContents*); |
20 virtual ~DataFileBrowserCldDataProvider(); | 20 virtual ~DataFileBrowserCldDataProvider(); |
21 // BrowserCldDataProvider implementations: | 21 // BrowserCldDataProvider implementations: |
22 virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE; | 22 virtual bool OnMessageReceived(const IPC::Message&) override; |
23 virtual void OnCldDataRequest() OVERRIDE; | 23 virtual void OnCldDataRequest() override; |
24 virtual void SendCldDataResponse() OVERRIDE; | 24 virtual void SendCldDataResponse() override; |
25 | 25 |
26 private: | 26 private: |
27 void SendCldDataResponseInternal(const base::File*, | 27 void SendCldDataResponseInternal(const base::File*, |
28 const uint64, | 28 const uint64, |
29 const uint64); | 29 const uint64); |
30 static void OnCldDataRequestInternal(); | 30 static void OnCldDataRequestInternal(); |
31 | 31 |
32 content::WebContents* web_contents_; | 32 content::WebContents* web_contents_; |
33 scoped_ptr<base::WeakPtrFactory<DataFileBrowserCldDataProvider> > | 33 scoped_ptr<base::WeakPtrFactory<DataFileBrowserCldDataProvider> > |
34 weak_pointer_factory_; | 34 weak_pointer_factory_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(DataFileBrowserCldDataProvider); | 36 DISALLOW_COPY_AND_ASSIGN(DataFileBrowserCldDataProvider); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace translate | 39 } // namespace translate |
40 | 40 |
41 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVI
DER_H_ | 41 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVI
DER_H_ |
OLD | NEW |