OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_TRANSLATE_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_ | |
6 #define CHROME_BROWSER_TRANSLATE_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_ | |
Takashi Toyoshima
2014/06/19 10:20:35
macro name
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
Done.
| |
7 | |
8 #include "base/files/file.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "components/translate/content/browser/browser_cld_data_provider.h" | |
11 #include "content/public/browser/render_view_host.h" | |
12 | |
13 namespace content { | |
14 | |
15 class DataFileBrowserCldDataProvider : public BrowserCldDataProvider { | |
16 public: | |
17 DataFileBrowserCldDataProvider(content::RenderViewHost*); | |
Takashi Toyoshima
2014/06/19 10:20:35
explicit
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
Done.
| |
18 bool OnMessageReceived(const IPC::Message&); | |
19 void OnCldDataRequest(); | |
20 void SendCldDataResponse(); | |
21 private: | |
Takashi Toyoshima
2014/06/19 10:20:35
single space before 'private'
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
Done.
| |
22 void SendCldDataResponseInternal(const base::File*, | |
23 const uint64, | |
24 const uint64); | |
25 void OnCldDataRequestInternal(); | |
26 | |
27 content::RenderViewHost* render_view_host; | |
28 base::WeakPtrFactory<DataFileBrowserCldDataProvider> weak_pointer_factory_; | |
Takashi Toyoshima
2014/06/19 10:20:34
DISALLOW_COPY_AND_ASSIGN
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
Done.
| |
29 }; | |
30 | |
31 // Implementation of the static factory method from BrowserCldDataProvider, | |
Takashi Toyoshima
2014/06/19 10:20:35
Any reason to have this implementation in the head
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
I figured it was an ok place for it, but I was of
| |
32 // hooking up this specific implementation for all of Chromium. | |
33 BrowserCldDataProvider* BrowserCldDataProviderFor( | |
Takashi Toyoshima
2014/06/19 10:20:35
CreateBrowser...() is better name since it starts
Andrew Hayden (chromium.org)
2014/06/19 13:40:20
Done.
| |
34 content::RenderViewHost* render_view_host) { | |
35 return new DataFileBrowserCldDataProvider(render_view_host); | |
36 } | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CHROME_BROWSER_TRANSLATE_DATA_FILE_BROWSER_CLD_DATA_PROVIDER_H_ | |
OLD | NEW |