| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 content::RenderFrameHost* render_frame_host) override; | 66 content::RenderFrameHost* render_frame_host) override; |
| 67 | 67 |
| 68 void DidFailLoad(content::RenderFrameHost* render_frame_host, | 68 void DidFailLoad(content::RenderFrameHost* render_frame_host, |
| 69 const GURL& validated_url, | 69 const GURL& validated_url, |
| 70 int error_code, | 70 int error_code, |
| 71 const base::string16& error_description, | 71 const base::string16& error_description, |
| 72 bool was_ignored_by_handler) override; | 72 bool was_ignored_by_handler) override; |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 bool StringifyOutput() override; | 75 bool StringifyOutput() override; |
| 76 bool CreateNewContext() override; | |
| 77 void DistillPageImpl(const GURL& url, const std::string& script) override; | 76 void DistillPageImpl(const GURL& url, const std::string& script) override; |
| 78 | 77 |
| 79 private: | 78 private: |
| 80 friend class TestDistillerPageWebContents; | 79 friend class TestDistillerPageWebContents; |
| 81 | 80 |
| 82 enum State { | 81 enum State { |
| 83 // The page distiller is idle. | 82 // The page distiller is idle. |
| 84 IDLE, | 83 IDLE, |
| 85 // A page is currently loading. | 84 // A page is currently loading. |
| 86 LOADING_PAGE, | 85 LOADING_PAGE, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 114 | 113 |
| 115 content::BrowserContext* browser_context_; | 114 content::BrowserContext* browser_context_; |
| 116 gfx::Size render_view_size_; | 115 gfx::Size render_view_size_; |
| 117 base::WeakPtrFactory<DistillerPageWebContents> weak_factory_; | 116 base::WeakPtrFactory<DistillerPageWebContents> weak_factory_; |
| 118 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents); | 117 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents); |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 } // namespace dom_distiller | 120 } // namespace dom_distiller |
| 122 | 121 |
| 123 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_
H_ | 122 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_PAGE_WEB_CONTENTS_
H_ |
| OLD | NEW |