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

Side by Side Diff: components/dom_distiller/ios/distiller_page_ios.h

Issue 2327783002: Fix domdistiller for new JS execution (Closed)
Patch Set: Created 4 years, 3 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 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 #ifndef COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_
6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ 6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 bool StringifyOutput() override; 37 bool StringifyOutput() override;
38 void DistillPageImpl(const GURL& url, const std::string& script) override; 38 void DistillPageImpl(const GURL& url, const std::string& script) override;
39 39
40 private: 40 private:
41 friend class DistillerWebStateObserver; 41 friend class DistillerWebStateObserver;
42 42
43 // Called by |web_state_observer_| once the page has finished loading. 43 // Called by |web_state_observer_| once the page has finished loading.
44 void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status); 44 void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status);
45 45
46 // Called once the |script_| has been evaluated on the page. 46 // Called once the |script_| has been evaluated on the page.
47 void HandleJavaScriptResultString(NSString* result); 47 void HandleJavaScriptResult(id result);
48
49 std::unique_ptr<base::Value> ValueResultFromWKResult(id wk_result);
Eugene But (OOO till 7-30) 2016/09/09 15:28:28 Optional NIT: Maybe s/WKResult/ScriptResult for co
Eugene But (OOO till 7-30) 2016/09/09 15:28:28 Per Style Guide every non-trivial method needs com
lody 2016/09/19 15:34:35 Done.
48 50
49 web::BrowserState* browser_state_; 51 web::BrowserState* browser_state_;
50 GURL url_; 52 GURL url_;
51 std::string script_; 53 std::string script_;
52 std::unique_ptr<ios::WebControllerProvider> provider_; 54 std::unique_ptr<ios::WebControllerProvider> provider_;
53 std::unique_ptr<DistillerWebStateObserver> web_state_observer_; 55 std::unique_ptr<DistillerWebStateObserver> web_state_observer_;
54 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; 56 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_;
55 }; 57 };
56 58
57 } // namespace dom_distiller 59 } // namespace dom_distiller
58 60
59 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ 61 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller/ios/distiller_page_ios.mm » ('j') | components/dom_distiller/ios/distiller_page_ios.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698