| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ |
| 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // IsGoogleCachedAMPPage will determine if the current page is a Google AMP | 72 // IsGoogleCachedAMPPage will determine if the current page is a Google AMP |
| 73 // page. | 73 // page. |
| 74 bool IsGoogleCachedAMPPage(); | 74 bool IsGoogleCachedAMPPage(); |
| 75 // HandleGoogleCachedAMPPage will navigate to the iframe containing the actual | 75 // HandleGoogleCachedAMPPage will navigate to the iframe containing the actual |
| 76 // article page. | 76 // article page. |
| 77 void HandleGoogleCachedAMPPage(); | 77 void HandleGoogleCachedAMPPage(); |
| 78 // Handles the JavaScript response. If the URL of the iframe is returned, | 78 // Handles the JavaScript response. If the URL of the iframe is returned, |
| 79 // triggers a navigation to it. Stop distillation of the page there as the new | 79 // triggers a navigation to it. Stop distillation of the page there as the new |
| 80 // load will trigger a new distillation. | 80 // load will trigger a new distillation. |
| 81 bool HandleGoogleCachedAMPPageJavaScriptResult(id result, id error); | 81 bool HandleGoogleCachedAMPPageJavaScriptResult(id result, id error); |
| 82 |
| 83 // Work around the fact that articles from wikipedia has the major part of the |
| 84 // article hidden. |
| 85 // IsWikipediaPage determines if the current page is a wikipedia article. |
| 86 bool IsWikipediaPage(); |
| 87 // HandleWikipediaPage sets the style of collapsable parts of article to |
| 88 // visible. |
| 89 void HandleWikipediaPage(); |
| 90 |
| 82 // Continue the distillation on the page that is currently loaded in | 91 // Continue the distillation on the page that is currently loaded in |
| 83 // |CurrentWebState()|. | 92 // |CurrentWebState()|. |
| 84 void ContinuePageDistillation(); | 93 void ContinuePageDistillation(); |
| 85 | 94 |
| 86 // Continues distillation by calling superclass |OnLoadURLDone|. | 95 // Continues distillation by calling superclass |OnLoadURLDone|. |
| 87 void DelayedOnLoadURLDone(int delayed_task_id); | 96 void DelayedOnLoadURLDone(int delayed_task_id); |
| 88 GURL original_url_; | 97 GURL original_url_; |
| 89 | 98 |
| 90 FaviconWebStateDispatcher* web_state_dispatcher_; | 99 FaviconWebStateDispatcher* web_state_dispatcher_; |
| 91 ReadingListDistillerPageDelegate* delegate_; | 100 ReadingListDistillerPageDelegate* delegate_; |
| 92 int delayed_task_id_; | 101 int delayed_task_id_; |
| 93 base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_; | 102 base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_; |
| 94 | 103 |
| 95 DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPage); | 104 DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPage); |
| 96 }; | 105 }; |
| 97 | 106 |
| 98 } // namespace reading_list | 107 } // namespace reading_list |
| 99 | 108 |
| 100 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | 109 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ |
| OLD | NEW |