| OLD | NEW |
| 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 #include "components/dom_distiller/content/renderer/distiller_page_notifier_serv
ice_impl.h" | 5 #include "components/dom_distiller/content/renderer/distiller_page_notifier_serv
ice_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" | 9 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" |
| 10 #include "components/dom_distiller/content/renderer/distiller_native_javascript.
h" | 10 #include "components/dom_distiller/content/renderer/distiller_native_javascript.
h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 11 | 12 |
| 12 namespace dom_distiller { | 13 namespace dom_distiller { |
| 13 | 14 |
| 14 DistillerPageNotifierServiceImpl::DistillerPageNotifierServiceImpl( | 15 DistillerPageNotifierServiceImpl::DistillerPageNotifierServiceImpl( |
| 15 DistillerJsRenderFrameObserver* observer, | 16 DistillerJsRenderFrameObserver* observer) |
| 16 mojo::InterfaceRequest<mojom::DistillerPageNotifierService> request) | 17 : distiller_js_observer_(observer) {} |
| 17 : binding_(this, std::move(request)), distiller_js_observer_(observer) {} | |
| 18 | 18 |
| 19 void DistillerPageNotifierServiceImpl::NotifyIsDistillerPage() { | 19 void DistillerPageNotifierServiceImpl::NotifyIsDistillerPage() { |
| 20 // TODO(mdjones): Send some form of unique ID so this call knows | 20 // TODO(mdjones): Send some form of unique ID so this call knows |
| 21 // which tab it should respond to.. | 21 // which tab it should respond to.. |
| 22 distiller_js_observer_->SetIsDistillerPage(); | 22 distiller_js_observer_->SetIsDistillerPage(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 DistillerPageNotifierServiceImpl::~DistillerPageNotifierServiceImpl() {} | 25 DistillerPageNotifierServiceImpl::~DistillerPageNotifierServiceImpl() {} |
| 26 | 26 |
| 27 } // namespace dom_distiller | 27 } // namespace dom_distiller |
| OLD | NEW |