OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ | 5 #ifndef CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ | 6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 : public content::RenderFrameObserver, | 38 : public content::RenderFrameObserver, |
39 public content::RenderFrameObserverTracker<NetErrorHelper>, | 39 public content::RenderFrameObserverTracker<NetErrorHelper>, |
40 public content::RenderProcessObserver, | 40 public content::RenderProcessObserver, |
41 public error_page::NetErrorHelperCore::Delegate { | 41 public error_page::NetErrorHelperCore::Delegate { |
42 public: | 42 public: |
43 explicit NetErrorHelper(content::RenderFrame* render_view); | 43 explicit NetErrorHelper(content::RenderFrame* render_view); |
44 ~NetErrorHelper() override; | 44 ~NetErrorHelper() override; |
45 | 45 |
46 // Button press notification from error page. | 46 // Button press notification from error page. |
47 void ReloadButtonPressed(); | 47 void ReloadButtonPressed(); |
48 void LoadStaleButtonPressed(); | 48 void ShowSavedCopyButtonPressed(); |
49 void MoreButtonPressed(); | 49 void MoreButtonPressed(); |
50 | 50 |
51 // RenderFrameObserver implementation. | 51 // RenderFrameObserver implementation. |
52 void DidStartProvisionalLoad() override; | 52 void DidStartProvisionalLoad() override; |
53 void DidCommitProvisionalLoad(bool is_new_navigation) override; | 53 void DidCommitProvisionalLoad(bool is_new_navigation) override; |
54 void DidFinishLoad() override; | 54 void DidFinishLoad() override; |
55 void OnStop() override; | 55 void OnStop() override; |
56 void WasShown() override; | 56 void WasShown() override; |
57 void WasHidden() override; | 57 void WasHidden() override; |
58 | 58 |
(...skipping 23 matching lines...) Expand all Loading... |
82 // Called when a link with the given tracking ID is pressed. | 82 // Called when a link with the given tracking ID is pressed. |
83 void TrackClick(int tracking_id); | 83 void TrackClick(int tracking_id); |
84 | 84 |
85 private: | 85 private: |
86 // NetErrorHelperCore::Delegate implementation: | 86 // NetErrorHelperCore::Delegate implementation: |
87 void GenerateLocalizedErrorPage( | 87 void GenerateLocalizedErrorPage( |
88 const blink::WebURLError& error, | 88 const blink::WebURLError& error, |
89 bool is_failed_post, | 89 bool is_failed_post, |
90 scoped_ptr<error_page::ErrorPageParams> params, | 90 scoped_ptr<error_page::ErrorPageParams> params, |
91 bool* reload_button_shown, | 91 bool* reload_button_shown, |
92 bool* load_stale_button_shown, | 92 bool* show_saved_copy_button_shown, |
93 std::string* html) const override; | 93 std::string* html) const override; |
94 void LoadErrorPageInMainFrame(const std::string& html, | 94 void LoadErrorPageInMainFrame(const std::string& html, |
95 const GURL& failed_url) override; | 95 const GURL& failed_url) override; |
96 void EnablePageHelperFunctions() override; | 96 void EnablePageHelperFunctions() override; |
97 void UpdateErrorPage(const blink::WebURLError& error, | 97 void UpdateErrorPage(const blink::WebURLError& error, |
98 bool is_failed_post) override; | 98 bool is_failed_post) override; |
99 void FetchNavigationCorrections( | 99 void FetchNavigationCorrections( |
100 const GURL& navigation_correction_url, | 100 const GURL& navigation_correction_url, |
101 const std::string& navigation_correction_request_body) override; | 101 const std::string& navigation_correction_request_body) override; |
102 void CancelFetchNavigationCorrections() override; | 102 void CancelFetchNavigationCorrections() override; |
(...skipping 17 matching lines...) Expand all Loading... |
120 | 120 |
121 scoped_ptr<content::ResourceFetcher> correction_fetcher_; | 121 scoped_ptr<content::ResourceFetcher> correction_fetcher_; |
122 scoped_ptr<content::ResourceFetcher> tracking_fetcher_; | 122 scoped_ptr<content::ResourceFetcher> tracking_fetcher_; |
123 | 123 |
124 scoped_ptr<error_page::NetErrorHelperCore> core_; | 124 scoped_ptr<error_page::NetErrorHelperCore> core_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(NetErrorHelper); | 126 DISALLOW_COPY_AND_ASSIGN(NetErrorHelper); |
127 }; | 127 }; |
128 | 128 |
129 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ | 129 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
OLD | NEW |