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

Side by Side Diff: components/dom_distiller/content/distiller_page_web_contents.h

Issue 1004223002: Pass more information by argument to the dom_distiller script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
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_DISTILLER_PAGE_WEB_CONTENTS_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_ 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // content::WebContentsObserver implementation. 62 // content::WebContentsObserver implementation.
63 void DocumentLoadedInFrame( 63 void DocumentLoadedInFrame(
64 content::RenderFrameHost* render_frame_host) override; 64 content::RenderFrameHost* render_frame_host) override;
65 65
66 void DidFailLoad(content::RenderFrameHost* render_frame_host, 66 void DidFailLoad(content::RenderFrameHost* render_frame_host,
67 const GURL& validated_url, 67 const GURL& validated_url,
68 int error_code, 68 int error_code,
69 const base::string16& error_description) override; 69 const base::string16& error_description) override;
70 70
71 protected: 71 protected:
72 bool StringifyOutput() override;
73 bool CreateNewContext() override;
72 void DistillPageImpl(const GURL& url, const std::string& script) override; 74 void DistillPageImpl(const GURL& url, const std::string& script) override;
73 75
74 private: 76 private:
75 friend class TestDistillerPageWebContents; 77 friend class TestDistillerPageWebContents;
76 78
77 enum State { 79 enum State {
78 // The page distiller is idle. 80 // The page distiller is idle.
79 IDLE, 81 IDLE,
80 // A page is currently loading. 82 // A page is currently loading.
81 LOADING_PAGE, 83 LOADING_PAGE,
(...skipping 24 matching lines...) Expand all
106 108
107 scoped_ptr<content::WebContents> web_contents_; 109 scoped_ptr<content::WebContents> web_contents_;
108 content::BrowserContext* browser_context_; 110 content::BrowserContext* browser_context_;
109 gfx::Size render_view_size_; 111 gfx::Size render_view_size_;
110 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents); 112 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents);
111 }; 113 };
112 114
113 } // namespace dom_distiller 115 } // namespace dom_distiller
114 116
115 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_ 117 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698