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

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

Issue 1265843005: Refactor feedback to use native JS object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@js-mojo-combine
Patch Set: impl comments Created 5 years, 3 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
« no previous file with comments | « no previous file | components/dom_distiller/content/browser/distiller_javascript_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index d21cd4a427dec8de8443191135021b9bc67d3923..37634b424be7b6ef6dcebfce1753e04e8f2a4dc0 100644
--- a/components/dom_distiller/content/browser/distiller_javascript_service_impl.h
+++ b/components/dom_distiller/content/browser/distiller_javascript_service_impl.h
@@ -5,6 +5,7 @@
#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/browser/external_feedback_reporter.h"
#include "components/dom_distiller/content/common/distiller_javascript_service.mojom.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
@@ -15,18 +16,30 @@ namespace dom_distiller {
class DistillerJavaScriptServiceImpl : public DistillerJavaScriptService {
public:
DistillerJavaScriptServiceImpl(
+ content::RenderFrameHost* render_frame_host,
+ ExternalFeedbackReporter* external_feedback_reporter,
mojo::InterfaceRequest<DistillerJavaScriptService> request);
~DistillerJavaScriptServiceImpl() override;
// Mojo DistillerJavaScriptService implementation.
+
+ // Echo implementation, this call does not actually return as it would be
+ // blocking.
void HandleDistillerEchoCall(const mojo::String& message) override;
+ // Send UMA feedback and start the external feedback reporter if one exists.
+ void HandleDistillerFeedbackCall(bool good) override;
+
private:
mojo::StrongBinding<DistillerJavaScriptService> binding_;
+ content::RenderFrameHost* render_frame_host_;
+ ExternalFeedbackReporter* external_feedback_reporter_;
};
// static
void CreateDistillerJavaScriptService(
+ content::RenderFrameHost* render_frame_host,
+ ExternalFeedbackReporter* feedback_reporter,
mojo::InterfaceRequest<DistillerJavaScriptService> request);
} // namespace dom_distiller
« no previous file with comments | « no previous file | components/dom_distiller/content/browser/distiller_javascript_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698