| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 public: | 36 public: |
| 37 // Passed a boolean indicating whether or not it is OK to proceed with the | 37 // Passed a boolean indicating whether or not it is OK to proceed with the |
| 38 // page load. | 38 // page load. |
| 39 typedef base::Callback<void(bool /*proceed*/)> CompletionCallback; | 39 typedef base::Callback<void(bool /*proceed*/)> CompletionCallback; |
| 40 | 40 |
| 41 // Create a offline load page for the |web_contents|. The callback will be | 41 // Create a offline load page for the |web_contents|. The callback will be |
| 42 // run on the IO thread. | 42 // run on the IO thread. |
| 43 OfflineLoadPage(content::WebContents* web_contents, const GURL& url, | 43 OfflineLoadPage(content::WebContents* web_contents, const GURL& url, |
| 44 const CompletionCallback& callback); | 44 const CompletionCallback& callback); |
| 45 | 45 |
| 46 void Show(); |
| 47 |
| 46 protected: | 48 protected: |
| 47 virtual ~OfflineLoadPage(); | 49 virtual ~OfflineLoadPage(); |
| 48 | 50 |
| 49 // Overridden by tests. | 51 // Overridden by tests. |
| 50 virtual void NotifyBlockingPageComplete(bool proceed); | 52 virtual void NotifyBlockingPageComplete(bool proceed); |
| 51 | 53 |
| 52 private: | 54 private: |
| 53 friend class TestOfflineLoadPage; | 55 friend class TestOfflineLoadPage; |
| 54 | 56 |
| 55 // InterstitialPageDelegate implementation. | 57 // InterstitialPageDelegate implementation. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 83 content::WebContents* web_contents_; | 85 content::WebContents* web_contents_; |
| 84 GURL url_; | 86 GURL url_; |
| 85 InterstitialPage* interstitial_page_; // Owns us. | 87 InterstitialPage* interstitial_page_; // Owns us. |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(OfflineLoadPage); | 89 DISALLOW_COPY_AND_ASSIGN(OfflineLoadPage); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace chromeos | 92 } // namespace chromeos |
| 91 | 93 |
| 92 #endif // CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ |
| OLD | NEW |