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

Side by Side Diff: ios/web/public/test/test_web_state.cc

Issue 1022463002: [iOS] Upstream files in //ios/chrome/browser/autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « ios/web/public/test/test_web_state.h ('k') | ios/web/public/web_state/crw_web_view_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ios/web/public/test/test_web_state.h" 5 #include "ios/web/public/test/test_web_state.h"
6 6
7 namespace web { 7 namespace web {
8 8
9 TestWebState::TestWebState() : trust_level_(kAbsolute), content_is_html_(true) {
10 }
11
12 TestWebState::~TestWebState() = default;
13
14 UIView* TestWebState::GetView() {
15 return nullptr;
16 }
17
18 WebViewType TestWebState::GetWebViewType() const {
19 return web::UI_WEB_VIEW_TYPE;
20 }
21
9 BrowserState* TestWebState::GetBrowserState() const { 22 BrowserState* TestWebState::GetBrowserState() const {
10 return nullptr; 23 return nullptr;
11 } 24 }
12 25
13 NavigationManager* TestWebState::GetNavigationManager() { 26 NavigationManager* TestWebState::GetNavigationManager() {
14 return nullptr; 27 return nullptr;
15 } 28 }
16 29
17 CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const { 30 CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const {
18 return nullptr; 31 return nullptr;
19 } 32 }
20 33
21 const std::string& TestWebState::GetContentsMimeType() const { 34 const std::string& TestWebState::GetContentsMimeType() const {
22 return mime_type_; 35 return mime_type_;
23 } 36 }
24 37
25 const std::string& TestWebState::GetContentLanguageHeader() const { 38 const std::string& TestWebState::GetContentLanguageHeader() const {
26 return content_language_; 39 return content_language_;
27 } 40 }
28 41
29 bool TestWebState::ContentIsHTML() const { 42 bool TestWebState::ContentIsHTML() const {
30 return true; 43 return content_is_html_;
31 } 44 }
32 45
33 const GURL& TestWebState::GetVisibleURL() const { 46 const GURL& TestWebState::GetVisibleURL() const {
34 return url_; 47 return url_;
35 } 48 }
36 49
37 const GURL& TestWebState::GetLastCommittedURL() const { 50 const GURL& TestWebState::GetLastCommittedURL() const {
38 return url_; 51 return url_;
39 } 52 }
40 53
54 GURL TestWebState::GetCurrentURL(URLVerificationTrustLevel* trust_level) const {
55 *trust_level = trust_level_;
56 return url_;
57 }
58
59 bool TestWebState::IsShowingWebInterstitial() const {
60 return false;
61 }
62
63 WebInterstitial* TestWebState::GetWebInterstitial() const {
64 return nullptr;
65 }
66
67 void TestWebState::SetContentIsHTML(bool content_is_html) {
68 content_is_html_ = content_is_html;
69 }
70
71 void TestWebState::SetCurrentURL(const GURL& url) {
72 url_ = url;
73 }
74
75 void TestWebState::SetTrustLevel(URLVerificationTrustLevel trust_level) {
76 trust_level_ = trust_level;
77 }
78
79 CRWWebViewProxyType TestWebState::GetWebViewProxy() const {
80 return nullptr;
81 }
82
41 } // namespace web 83 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/test_web_state.h ('k') | ios/web/public/web_state/crw_web_view_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698