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 #include "static_renderer_cld_data_provider.h" | |
6 | |
7 #include "content/public/renderer/render_view_observer.h" | |
8 #include "ipc/ipc_message.h" | |
9 | |
10 namespace translate { | |
11 // Implementation of the static factory method from RendererCldDataProvider, | |
12 // hooking up this specific implementation for all of Chromium. | |
13 RendererCldDataProvider* CreateRendererCldDataProviderFor( | |
14 content::RenderViewObserver* render_view_observer) { | |
15 return new StaticRendererCldDataProvider(); | |
16 } | |
17 | |
18 StaticRendererCldDataProvider::StaticRendererCldDataProvider() { | |
19 } | |
20 | |
21 StaticRendererCldDataProvider::~StaticRendererCldDataProvider() { | |
22 } | |
23 | |
24 bool StaticRendererCldDataProvider::OnMessageReceived( | |
25 const IPC::Message& message) { | |
26 // No-op: data is statically linked | |
27 return false; | |
28 } | |
29 | |
30 void StaticRendererCldDataProvider::SendCldDataRequest() { | |
31 // No-op: data is statically linked | |
32 } | |
33 | |
34 bool StaticRendererCldDataProvider::IsCldDataAvailable() { | |
35 // No-op: data is statically linked | |
36 return true; | |
37 } | |
38 | |
39 void StaticRendererCldDataProvider::SetCldAvailableCallback( | |
40 base::Callback<void(void)> callback) { | |
41 // Data is statically linked, so just call immediately. | |
42 callback.Run(); | |
43 } | |
44 | |
45 } // namespace translate | |
OLD | NEW |