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

Unified Diff: components/dom_distiller/content/browser/distiller_javascript_service_impl.h

Issue 1231083007: Expose distiller functions to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-content
Patch Set: Address comments Created 5 years, 4 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/dom_distiller/content/browser/distiller_javascript_service_impl.h
diff --git a/components/dom_distiller/content/browser/distiller_javascript_service_impl.h b/components/dom_distiller/content/browser/distiller_javascript_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..18c77e8ddbcf37390d6798b3ba2909597a885093
--- /dev/null
+++ b/components/dom_distiller/content/browser/distiller_javascript_service_impl.h
@@ -0,0 +1,28 @@
+// Copyright 2015 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_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IMPL_H_
+#define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IMPL_H_
+
+#include "components/dom_distiller/content/common/distiller_javascript_service.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
+
+namespace dom_distiller {
+
+// This is the receiving end of "distiller" JavaScript object calls.
+class DistillerJavaScriptServiceImpl
+ : public mojo::InterfaceImpl<DistillerJavaScriptService> {
+ public:
+ DistillerJavaScriptServiceImpl();
+ void HandleDistillerEchoCall(const mojo::String& message) override;
nyquist 2015/08/19 10:59:54 Could you add a comment about what this implements
mdjones 2015/08/19 20:25:19 Done.
+ ~DistillerJavaScriptServiceImpl() override;
nyquist 2015/08/19 10:59:54 Move after constructor.
mdjones 2015/08/19 20:25:19 Done.
+};
+
+// static
+void CreateDistillerJavaScriptService(
+ mojo::InterfaceRequest<DistillerJavaScriptService> request);
+
+} // namespace dom_distiller
+
+#endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698