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 content { | |
16 class WebContents; | |
17 } // namespace content | |
jochen (gone - plz use gerrit)
2014/10/23 13:57:39
// namespace content not required for forward decl
Andrew Hayden (chromium.org)
2014/10/30 16:56:32
Acknowledged.
| |
18 | |
15 namespace translate { | 19 namespace translate { |
16 | 20 |
17 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider { | 21 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider { |
18 public: | 22 public: |
19 explicit DataFileBrowserCldDataProvider(content::WebContents*); | 23 explicit DataFileBrowserCldDataProvider(content::WebContents*); |
20 virtual ~DataFileBrowserCldDataProvider(); | 24 virtual ~DataFileBrowserCldDataProvider(); |
21 // BrowserCldDataProvider implementations: | 25 // BrowserCldDataProvider implementations: |
22 virtual bool OnMessageReceived(const IPC::Message&) override; | 26 virtual bool OnMessageReceived(const IPC::Message&) override; |
23 virtual void OnCldDataRequest() override; | 27 virtual void OnCldDataRequest() override; |
24 virtual void SendCldDataResponse() override; | 28 virtual void SendCldDataResponse() override; |
25 | 29 |
26 private: | 30 private: |
27 void SendCldDataResponseInternal(const base::File*, | 31 void SendCldDataResponseInternal(const base::File*, |
28 const uint64, | 32 const uint64, |
29 const uint64); | 33 const uint64); |
30 static void OnCldDataRequestInternal(); | 34 static void OnCldDataRequestInternal(); |
31 | 35 |
32 content::WebContents* web_contents_; | 36 content::WebContents* web_contents_; |
33 scoped_ptr<base::WeakPtrFactory<DataFileBrowserCldDataProvider> > | 37 scoped_ptr<base::WeakPtrFactory<DataFileBrowserCldDataProvider> > |
34 weak_pointer_factory_; | 38 weak_pointer_factory_; |
35 | 39 |
36 DISALLOW_COPY_AND_ASSIGN(DataFileBrowserCldDataProvider); | 40 DISALLOW_COPY_AND_ASSIGN(DataFileBrowserCldDataProvider); |
37 }; | 41 }; |
38 | 42 |
39 } // namespace translate | 43 } // namespace translate |
40 | 44 |
41 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVI DER_H_ | 45 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_DATA_FILE_BROWSER_CLD_DATA_PROVI DER_H_ |
OLD | NEW |