OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include "base/compiler_specific.h" |
11 #include "base/task.h" | 12 #include "base/task.h" |
12 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" | 13 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" |
13 #include "net/base/network_change_notifier.h" | 14 #include "net/base/network_change_notifier.h" |
14 | 15 |
15 class Extension; | 16 class Extension; |
16 class OfflineResourceHandler; | 17 class OfflineResourceHandler; |
17 class TabContents; | 18 class TabContents; |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class DictionaryValue; | 21 class DictionaryValue; |
(...skipping 13 matching lines...) Expand all Loading... |
34 OfflineResourceHandler* handler); | 35 OfflineResourceHandler* handler); |
35 | 36 |
36 protected: | 37 protected: |
37 virtual ~OfflineLoadPage(); | 38 virtual ~OfflineLoadPage(); |
38 | 39 |
39 // Overridden by tests. | 40 // Overridden by tests. |
40 virtual void NotifyBlockingPageComplete(bool proceed); | 41 virtual void NotifyBlockingPageComplete(bool proceed); |
41 | 42 |
42 private: | 43 private: |
43 // ChromeInterstitialPage implementation. | 44 // ChromeInterstitialPage implementation. |
44 virtual std::string GetHTMLContents(); | 45 virtual std::string GetHTMLContents() OVERRIDE; |
45 virtual void CommandReceived(const std::string& command); | 46 virtual void CommandReceived(const std::string& command) OVERRIDE; |
46 virtual void Proceed(); | 47 virtual void Proceed() OVERRIDE; |
47 virtual void DontProceed(); | 48 virtual void DontProceed() OVERRIDE; |
48 | 49 |
49 // net::NetworkChangeNotifier::OnlineStateObserver overrides. | 50 // net::NetworkChangeNotifier::OnlineStateObserver overrides. |
50 virtual void OnOnlineStateChanged(bool online) OVERRIDE; | 51 virtual void OnOnlineStateChanged(bool online) OVERRIDE; |
51 | 52 |
52 // Retrieves template strings of the offline page for app and | 53 // Retrieves template strings of the offline page for app and |
53 // normal site. | 54 // normal site. |
54 void GetAppOfflineStrings(const Extension* app, | 55 void GetAppOfflineStrings(const Extension* app, |
55 const string16& faield_url, | 56 const string16& faield_url, |
56 base::DictionaryValue* strings) const; | 57 base::DictionaryValue* strings) const; |
57 void GetNormalOfflineStrings(const string16& faield_url, | 58 void GetNormalOfflineStrings(const string16& faield_url, |
(...skipping 10 matching lines...) Expand all Loading... |
68 ScopedRunnableMethodFactory<OfflineLoadPage> method_factory_; | 69 ScopedRunnableMethodFactory<OfflineLoadPage> method_factory_; |
69 | 70 |
70 bool in_test_; | 71 bool in_test_; |
71 | 72 |
72 DISALLOW_COPY_AND_ASSIGN(OfflineLoadPage); | 73 DISALLOW_COPY_AND_ASSIGN(OfflineLoadPage); |
73 }; | 74 }; |
74 | 75 |
75 } // namespace chromeos | 76 } // namespace chromeos |
76 | 77 |
77 #endif // CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_OFFLINE_OFFLINE_LOAD_PAGE_H_ |
OLD | NEW |