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 "ios/chrome/browser/dom_distiller/distiller_viewer.h" | 5 #include "ios/chrome/browser/dom_distiller/distiller_viewer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "components/dom_distiller/core/distilled_page_prefs.h" | 9 #include "components/dom_distiller/core/distilled_page_prefs.h" |
10 #include "components/dom_distiller/core/dom_distiller_service.h" | 10 #include "components/dom_distiller/core/dom_distiller_service.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 | 31 |
32 viewer_handle_ = distillerService->ViewUrl( | 32 viewer_handle_ = distillerService->ViewUrl( |
33 this, distillerService->CreateDefaultDistillerPage(gfx::Size()), url); | 33 this, distillerService->CreateDefaultDistillerPage(gfx::Size()), url); |
34 } | 34 } |
35 | 35 |
36 DistillerViewer::~DistillerViewer() { | 36 DistillerViewer::~DistillerViewer() { |
37 } | 37 } |
38 | 38 |
39 void DistillerViewer::OnArticleReady( | 39 void DistillerViewer::OnArticleReady( |
40 const DistilledArticleProto* article_proto) { | 40 const DistilledArticleProto* article_proto) { |
41 const std::string html = viewer::GetUnsafeArticleHtml( | 41 const std::string html = viewer::GetUnsafeArticleTemplateHtml( |
42 article_proto, distilled_page_prefs_->GetTheme(), | 42 &article_proto->pages(0), distilled_page_prefs_->GetTheme(), |
cjhopman
2015/03/27 00:45:15
It looks like your change will make it so iOS does
cjhopman
2015/03/27 00:48:33
I don't see the code that uses this for iOS (maybe
mdjones
2015/03/30 23:12:27
Done, but this should be considered a temporary fi
mdjones
2015/03/30 23:12:27
Acknowledged.
| |
43 distilled_page_prefs_->GetFontFamily()); | 43 distilled_page_prefs_->GetFontFamily()); |
44 | 44 |
45 callback_.Run(url_, html); | 45 callback_.Run(url_, html); |
46 | 46 |
47 // No need to hold on to the ViewerHandle now that distillation is complete. | 47 // No need to hold on to the ViewerHandle now that distillation is complete. |
48 viewer_handle_.reset(); | 48 viewer_handle_.reset(); |
49 } | 49 } |
50 | 50 |
51 } // namespace dom_distiller | 51 } // namespace dom_distiller |
OLD | NEW |