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 "base/memory/ptr_util.h" |
7 #include "content/public/browser/render_frame_host.h" | 8 #include "content/public/browser/render_frame_host.h" |
8 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
9 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
10 #include "content/public/browser/web_contents_user_data.h" | 11 #include "content/public/browser/web_contents_user_data.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 #include "services/service_manager/public/cpp/interface_registry.h" | 13 #include "services/service_manager/public/cpp/interface_registry.h" |
13 | 14 |
14 DEFINE_WEB_CONTENTS_USER_DATA_KEY( | 15 DEFINE_WEB_CONTENTS_USER_DATA_KEY( |
15 dom_distiller::DistillabilityDriver); | 16 dom_distiller::DistillabilityDriver); |
16 | 17 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return; | 101 return; |
101 } | 102 } |
102 | 103 |
103 frame_host->GetInterfaceRegistry()->AddInterface( | 104 frame_host->GetInterfaceRegistry()->AddInterface( |
104 base::Bind(&DistillabilityDriver::CreateDistillabilityService, | 105 base::Bind(&DistillabilityDriver::CreateDistillabilityService, |
105 weak_factory_.GetWeakPtr())); | 106 weak_factory_.GetWeakPtr())); |
106 mojo_needs_setup_ = false; | 107 mojo_needs_setup_ = false; |
107 } | 108 } |
108 | 109 |
109 } // namespace dom_distiller | 110 } // namespace dom_distiller |
OLD | NEW |