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

Side by Side Diff: components/dom_distiller/core/page_distiller.cc

Issue 167963003: Support for distilling prior pages in an article. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/core/page_distiller.h" 5 #include "components/dom_distiller/core/page_distiller.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // The JavaScript returns an array where the first element is the title, 67 // The JavaScript returns an array where the first element is the title,
68 // the second element is the article content HTML, and the remaining 68 // the second element is the article content HTML, and the remaining
69 // elements are image URLs referenced in the HTML. 69 // elements are image URLs referenced in the HTML.
70 switch (i) { 70 switch (i) {
71 case 0: 71 case 0:
72 page_info->title = item; 72 page_info->title = item;
73 break; 73 break;
74 case 1: 74 case 1:
75 page_info->html = item; 75 page_info->html = item;
76 break; 76 break;
77 case 2: { 77 case 2:
78 page_info->next_page_url = item; 78 page_info->next_page_url = item;
79 break; 79 break;
80 } 80 case 3:
81 page_info->prev_page_url = item;
82 break;
81 default: 83 default:
82 page_info->image_urls.push_back(item); 84 page_info->image_urls.push_back(item);
83 } 85 }
84 } 86 }
85 base::MessageLoop::current()->PostTask( 87 base::MessageLoop::current()->PostTask(
86 FROM_HERE, 88 FROM_HERE,
87 base::Bind(page_distiller_callback_, base::Passed(&page_info), true)); 89 base::Bind(page_distiller_callback_, base::Passed(&page_info), true));
88 } 90 }
89 } 91 }
90 92
91 } // namespace dom_distiller 93 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/page_distiller.h ('k') | third_party/readability/js/readability.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698