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

Side by Side 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: Rebase 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM PL_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM PL_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM PL_H_ 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM PL_H_
7 7
8 #include "components/dom_distiller/content/browser/external_feedback_reporter.h"
8 #include "components/dom_distiller/content/common/distiller_javascript_service.m ojom.h" 9 #include "components/dom_distiller/content/common/distiller_javascript_service.m ojom.h"
9 #include "third_party/mojo/src/mojo/public/cpp/bindings/string.h" 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
11 12
12 namespace dom_distiller { 13 namespace dom_distiller {
13 14
14 // This is the receiving end of "distiller" JavaScript object calls. 15 // This is the receiving end of "distiller" JavaScript object calls.
15 class DistillerJavaScriptServiceImpl : public DistillerJavaScriptService { 16 class DistillerJavaScriptServiceImpl : public DistillerJavaScriptService {
16 public: 17 public:
17 DistillerJavaScriptServiceImpl( 18 DistillerJavaScriptServiceImpl(
18 mojo::InterfaceRequest<DistillerJavaScriptService> request); 19 mojo::InterfaceRequest<DistillerJavaScriptService> request,
20 content::RenderFrameHost* render_frame_host,
21 ExternalFeedbackReporter* external_feedback_reporter);
19 ~DistillerJavaScriptServiceImpl() override; 22 ~DistillerJavaScriptServiceImpl() override;
20 23
21 // Mojo DistillerJavaScriptService implementation. 24 // Mojo DistillerJavaScriptService implementation.
22 void HandleDistillerEchoCall(const mojo::String& message) override; 25 void HandleDistillerEchoCall(const mojo::String& message) override;
26 void HandleDistillerFeedbackCall(bool good) override;
23 27
24 private: 28 private:
25 mojo::StrongBinding<DistillerJavaScriptService> binding_; 29 mojo::StrongBinding<DistillerJavaScriptService> binding_;
wychen 2015/09/09 21:12:24 Where is this used?
mdjones 2015/09/09 22:35:16 Mojo's pipe uses it. See: https://code.google.com
30 content::RenderFrameHost* render_frame_host_;
31 ExternalFeedbackReporter* external_feedback_reporter_;
26 }; 32 };
27 33
28 // static 34 // static
29 void CreateDistillerJavaScriptService( 35 void CreateDistillerJavaScriptService(
wychen 2015/09/09 21:12:24 Would it be more readable if the order of the para
mdjones 2015/09/09 22:35:16 The way that this is used (with base::Bind) requir
36 content::RenderFrameHost* render_frame_host,
37 ExternalFeedbackReporter* feedback_reporter,
30 mojo::InterfaceRequest<DistillerJavaScriptService> request); 38 mojo::InterfaceRequest<DistillerJavaScriptService> request);
31 39
32 } // namespace dom_distiller 40 } // namespace dom_distiller
33 41
34 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE _IMPL_H_ 42 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE _IMPL_H_
OLDNEW
« 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