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

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

Issue 146843010: Add support for multipage distillation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 #include "components/dom_distiller/core/distiller_page.h" 5 #include "components/dom_distiller/core/distiller_page.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "url/gurl.h" 8 #include "url/gurl.h"
9 9
10 namespace dom_distiller { 10 namespace dom_distiller {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (!delegate_) 45 if (!delegate_)
46 return; 46 return;
47 delegate_->OnLoadURLDone(); 47 delegate_->OnLoadURLDone();
48 } 48 }
49 49
50 void DistillerPage::OnLoadURLFailed() { 50 void DistillerPage::OnLoadURLFailed() {
51 state_ = PAGELOAD_FAILED; 51 state_ = PAGELOAD_FAILED;
52 scoped_ptr<base::Value> empty(base::Value::CreateNullValue()); 52 scoped_ptr<base::Value> empty(base::Value::CreateNullValue());
53 if (!delegate_) 53 if (!delegate_)
54 return; 54 return;
55 delegate_->OnExecuteJavaScriptDone(empty.get()); 55 delegate_->OnExecuteJavaScriptDone(GURL(), empty.get());
56 } 56 }
57 57
58 void DistillerPage::OnExecuteJavaScriptDone( 58 void DistillerPage::OnExecuteJavaScriptDone(const GURL& page_url,
59 const base::Value* value) { 59 const base::Value* value) {
60 DCHECK_EQ(EXECUTING_JAVASCRIPT, state_); 60 DCHECK_EQ(EXECUTING_JAVASCRIPT, state_);
61 state_ = PAGE_AVAILABLE; 61 state_ = PAGE_AVAILABLE;
62 if (!delegate_) 62 if (!delegate_)
63 return; 63 return;
64 delegate_->OnExecuteJavaScriptDone(value); 64 delegate_->OnExecuteJavaScriptDone(page_url, value);
65 } 65 }
66 66
67 } // namespace dom_distiller 67 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distiller_page.h ('k') | components/dom_distiller/core/distiller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698