Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1617)

Unified Diff: components/translate/content/renderer/static_renderer_cld_data_provider.h

Issue 333603002: Modularize Compact Language Detector 2 (CLD2) data sources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge https://codereview.chromium.org/326383005 Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/translate/content/renderer/static_renderer_cld_data_provider.h
diff --git a/components/translate/content/renderer/static_renderer_cld_data_provider.h b/components/translate/content/renderer/static_renderer_cld_data_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..fcd212b5ca6d10839f361e436928d2ab3c86943c
--- /dev/null
+++ b/components/translate/content/renderer/static_renderer_cld_data_provider.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_
+#define COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_
+
+#include "base/files/file.h"
+#include "base/files/memory_mapped_file.h"
+#include "base/lazy_instance.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/translate/content/renderer/renderer_cld_data_provider.h"
+#include "ipc/ipc_platform_file.h"
+
+namespace translate {
+
+class StaticRendererCldDataProvider : public RendererCldDataProvider {
+ public:
+ explicit StaticRendererCldDataProvider();
+ virtual ~StaticRendererCldDataProvider();
+ // RendererCldDataProvider implementations:
+ virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE;
+ virtual void SendCldDataRequest() OVERRIDE;
+ virtual void SetCldAvailableCallback(base::Callback<void(void)>) OVERRIDE;
+ virtual bool IsCldDataAvailable() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StaticRendererCldDataProvider);
+};
+
+} // namespace translate
+
+#endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_STATIC_RENDERER_CLD_DATA_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698