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_BROWSER_CLD_DATA_PROVIDER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_ |
6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_ | 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_ |
7 | 7 |
8 #include "ipc/ipc_listener.h" | 8 #include "ipc/ipc_listener.h" |
9 | 9 |
10 namespace IPC { | 10 namespace IPC { |
11 class Message; | 11 class Message; |
12 } | 12 } |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class RenderViewHost; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 namespace translate { | 18 namespace translate { |
19 | 19 |
20 // Browser-side interface responsible for providing CLD data. | 20 // Browser-side interface responsible for providing CLD data. |
21 // The implementation must be paired with a renderer-side implementation of | 21 // The implementation must be paired with a renderer-side implementation of |
22 // the RendererCldDataProvider class: | 22 // the RendererCldDataProvider class: |
23 // | 23 // |
24 // components/translate/content/renderer/renderer_cld_data_provider.h | 24 // components/translate/content/renderer/renderer_cld_data_provider.h |
25 // | 25 // |
(...skipping 22 matching lines...) Expand all Loading... |
48 virtual void OnCldDataRequest() = 0; | 48 virtual void OnCldDataRequest() = 0; |
49 | 49 |
50 // Invoked when OnCldDataRequest, above, results in a successful lookup or | 50 // Invoked when OnCldDataRequest, above, results in a successful lookup or |
51 // the data is already cached and ready to respond to. The implementation | 51 // the data is already cached and ready to respond to. The implementation |
52 // should take whatever action is appropriate for responding to the paired | 52 // should take whatever action is appropriate for responding to the paired |
53 // RendererCldDataProvider, typically by sending an IPC response. | 53 // RendererCldDataProvider, typically by sending an IPC response. |
54 virtual void SendCldDataResponse() = 0; | 54 virtual void SendCldDataResponse() = 0; |
55 }; | 55 }; |
56 | 56 |
57 // Static factory function defined by the implementation that produces a new | 57 // Static factory function defined by the implementation that produces a new |
58 // provider for the specified render view host. | 58 // provider for the specified WebContents. |
59 BrowserCldDataProvider* CreateBrowserCldDataProviderFor( | 59 BrowserCldDataProvider* CreateBrowserCldDataProviderFor( |
60 content::RenderViewHost*); | 60 content::WebContents*); |
61 | 61 |
62 } // namespace translate | 62 } // namespace translate |
63 | 63 |
64 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATAP_PROVIDER_H_ | 64 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATAP_PROVIDER_H_ |
OLD | NEW |