| 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 #include "chrome/browser/chromeos/offline/offline_load_page.h" | 5 #include "chrome/browser/chromeos/offline/offline_load_page.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 ExtensionURLInfo(url_)); | 108 ExtensionURLInfo(url_)); |
| 109 | 109 |
| 110 if (extension) | 110 if (extension) |
| 111 GetAppOfflineStrings(extension, failed_url, &strings); | 111 GetAppOfflineStrings(extension, failed_url, &strings); |
| 112 else | 112 else |
| 113 GetNormalOfflineStrings(failed_url, &strings); | 113 GetNormalOfflineStrings(failed_url, &strings); |
| 114 | 114 |
| 115 base::StringPiece html( | 115 base::StringPiece html( |
| 116 ResourceBundle::GetSharedInstance().GetRawDataResource( | 116 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 117 IDR_OFFLINE_LOAD_HTML)); | 117 IDR_OFFLINE_LOAD_HTML)); |
| 118 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); | 118 return webui::GetI18nTemplateHtml(html, &strings); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void OfflineLoadPage::OverrideRendererPrefs( | 121 void OfflineLoadPage::OverrideRendererPrefs( |
| 122 content::RendererPreferences* prefs) { | 122 content::RendererPreferences* prefs) { |
| 123 Profile* profile = Profile::FromBrowserContext( | 123 Profile* profile = Profile::FromBrowserContext( |
| 124 web_contents_->GetBrowserContext()); | 124 web_contents_->GetBrowserContext()); |
| 125 renderer_preferences_util::UpdateFromSystemSettings(prefs, profile); | 125 renderer_preferences_util::UpdateFromSystemSettings(prefs, profile); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void OfflineLoadPage::OnProceed() { | 128 void OfflineLoadPage::OnProceed() { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 for (size_t i = 0; i < cell_networks.size(); ++i) { | 222 for (size_t i = 0; i < cell_networks.size(); ++i) { |
| 223 chromeos::ActivationState activation_state = | 223 chromeos::ActivationState activation_state = |
| 224 cell_networks[i]->activation_state(); | 224 cell_networks[i]->activation_state(); |
| 225 if (activation_state == ACTIVATION_STATE_ACTIVATED) | 225 if (activation_state == ACTIVATION_STATE_ACTIVATED) |
| 226 return false; | 226 return false; |
| 227 } | 227 } |
| 228 return true; | 228 return true; |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace chromeos | 231 } // namespace chromeos |
| OLD | NEW |