| 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/browser/distillability_driver.h" | 5 #include "components/dom_distiller/content/browser/distillability_driver.h" |
| 6 | 6 |
| 7 #include "content/public/browser/render_frame_host.h" | 7 #include "content/public/browser/render_frame_host.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 #include "services/shell/public/cpp/interface_registry.h" | 12 #include "services/service_manager/public/cpp/interface_registry.h" |
| 13 | 13 |
| 14 DEFINE_WEB_CONTENTS_USER_DATA_KEY( | 14 DEFINE_WEB_CONTENTS_USER_DATA_KEY( |
| 15 dom_distiller::DistillabilityDriver); | 15 dom_distiller::DistillabilityDriver); |
| 16 | 16 |
| 17 namespace dom_distiller { | 17 namespace dom_distiller { |
| 18 | 18 |
| 19 // Implementation of the Mojo DistillabilityService. This is called by the | 19 // Implementation of the Mojo DistillabilityService. This is called by the |
| 20 // renderer to notify the browser that a page is distillable. | 20 // renderer to notify the browser that a page is distillable. |
| 21 class DistillabilityServiceImpl : public mojom::DistillabilityService { | 21 class DistillabilityServiceImpl : public mojom::DistillabilityService { |
| 22 public: | 22 public: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return; | 100 return; |
| 101 } | 101 } |
| 102 | 102 |
| 103 frame_host->GetInterfaceRegistry()->AddInterface( | 103 frame_host->GetInterfaceRegistry()->AddInterface( |
| 104 base::Bind(&DistillabilityDriver::CreateDistillabilityService, | 104 base::Bind(&DistillabilityDriver::CreateDistillabilityService, |
| 105 weak_factory_.GetWeakPtr())); | 105 weak_factory_.GetWeakPtr())); |
| 106 mojo_needs_setup_ = false; | 106 mojo_needs_setup_ = false; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace dom_distiller | 109 } // namespace dom_distiller |
| OLD | NEW |