OLD | NEW |
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 IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ |
6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ | 6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const std::string& GetContentsMimeType() const override; | 46 const std::string& GetContentsMimeType() const override; |
47 const std::string& GetContentLanguageHeader() const override; | 47 const std::string& GetContentLanguageHeader() const override; |
48 bool ContentIsHTML() const override; | 48 bool ContentIsHTML() const override; |
49 const base::string16& GetTitle() const override; | 49 const base::string16& GetTitle() const override; |
50 bool IsLoading() const override; | 50 bool IsLoading() const override; |
51 double GetLoadingProgress() const override; | 51 double GetLoadingProgress() const override; |
52 bool IsBeingDestroyed() const override; | 52 bool IsBeingDestroyed() const override; |
53 const GURL& GetVisibleURL() const override; | 53 const GURL& GetVisibleURL() const override; |
54 const GURL& GetLastCommittedURL() const override; | 54 const GURL& GetLastCommittedURL() const override; |
55 GURL GetCurrentURL(URLVerificationTrustLevel* trust_level) const override; | 55 GURL GetCurrentURL(URLVerificationTrustLevel* trust_level) const override; |
56 void ShowTransientContentView(CRWContentView* content_view) override {} | 56 void ShowTransientContentView(CRWContentView* content_view) override; |
57 void AddScriptCommandCallback(const ScriptCommandCallback& callback, | 57 void AddScriptCommandCallback(const ScriptCommandCallback& callback, |
58 const std::string& command_prefix) override {} | 58 const std::string& command_prefix) override {} |
59 void RemoveScriptCommandCallback(const std::string& command_prefix) override { | 59 void RemoveScriptCommandCallback(const std::string& command_prefix) override { |
60 } | 60 } |
61 CRWWebViewProxyType GetWebViewProxy() const override; | 61 CRWWebViewProxyType GetWebViewProxy() const override; |
62 bool IsShowingWebInterstitial() const override; | 62 bool IsShowingWebInterstitial() const override; |
63 WebInterstitial* GetWebInterstitial() const override; | 63 WebInterstitial* GetWebInterstitial() const override; |
64 void OnPasswordInputShownOnHttp() override {} | 64 void OnPasswordInputShownOnHttp() override {} |
65 void OnCreditCardInputShownOnHttp() override {} | 65 void OnCreditCardInputShownOnHttp() override {} |
66 | 66 |
(...skipping 13 matching lines...) Expand all Loading... |
80 void SetLoading(bool is_loading); | 80 void SetLoading(bool is_loading); |
81 void SetCurrentURL(const GURL& url); | 81 void SetCurrentURL(const GURL& url); |
82 void SetTrustLevel(URLVerificationTrustLevel trust_level); | 82 void SetTrustLevel(URLVerificationTrustLevel trust_level); |
83 void SetNavigationManager( | 83 void SetNavigationManager( |
84 std::unique_ptr<NavigationManager> navigation_manager); | 84 std::unique_ptr<NavigationManager> navigation_manager); |
85 void SetView(UIView* view); | 85 void SetView(UIView* view); |
86 | 86 |
87 // Notifier for tests. | 87 // Notifier for tests. |
88 void OnPageLoaded(PageLoadCompletionStatus load_completion_status); | 88 void OnPageLoaded(PageLoadCompletionStatus load_completion_status); |
89 void OnProvisionalNavigationStarted(const GURL& url); | 89 void OnProvisionalNavigationStarted(const GURL& url); |
| 90 void OnRenderProcessGone(); |
90 | 91 |
91 private: | 92 private: |
92 BrowserState* browser_state_; | 93 BrowserState* browser_state_; |
93 bool web_usage_enabled_; | 94 bool web_usage_enabled_; |
94 bool is_loading_; | 95 bool is_loading_; |
95 GURL url_; | 96 GURL url_; |
96 base::string16 title_; | 97 base::string16 title_; |
97 URLVerificationTrustLevel trust_level_; | 98 URLVerificationTrustLevel trust_level_; |
98 bool content_is_html_; | 99 bool content_is_html_; |
99 std::string mime_type_; | 100 std::string mime_type_; |
100 std::string content_language_; | 101 std::string content_language_; |
101 std::unique_ptr<NavigationManager> navigation_manager_; | 102 std::unique_ptr<NavigationManager> navigation_manager_; |
102 base::scoped_nsobject<UIView> view_; | 103 base::scoped_nsobject<UIView> view_; |
103 | 104 |
104 // A list of observers notified when page state changes. Weak references. | 105 // A list of observers notified when page state changes. Weak references. |
105 base::ObserverList<WebStateObserver, true> observers_; | 106 base::ObserverList<WebStateObserver, true> observers_; |
106 }; | 107 }; |
107 | 108 |
108 } // namespace web | 109 } // namespace web |
109 | 110 |
110 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ | 111 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_H_ |
OLD | NEW |