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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Get the Chromium/Chrome icon, we can't access the icon via chrome://theme | 93 // Get the Chromium/Chrome icon, we can't access the icon via chrome://theme |
94 // on the webpage since the interstitial page isn't a webui and doesn't have | 94 // on the webpage since the interstitial page isn't a webui and doesn't have |
95 // access to chrome:// URL's. | 95 // access to chrome:// URL's. |
96 strings.SetString("icon", | 96 strings.SetString("icon", |
97 webui::GetBitmapDataUrlFromResource(IDR_PRODUCT_LOGO_32)); | 97 webui::GetBitmapDataUrlFromResource(IDR_PRODUCT_LOGO_32)); |
98 | 98 |
99 // Activation | 99 // Activation |
100 strings.SetBoolean("show_activation", ShowActivationMessage()); | 100 strings.SetBoolean("show_activation", ShowActivationMessage()); |
101 | 101 |
102 bool rtl = base::i18n::IsRTL(); | 102 webui::SetFontAndTextDirection(&strings); |
103 strings.SetString("textdirection", rtl ? "rtl" : "ltr"); | |
104 | |
105 string16 failed_url(ASCIIToUTF16(url_.spec())); | 103 string16 failed_url(ASCIIToUTF16(url_.spec())); |
106 if (rtl) | 104 if (base::i18n::IsRTL()) |
107 base::i18n::WrapStringWithLTRFormatting(&failed_url); | 105 base::i18n::WrapStringWithLTRFormatting(&failed_url); |
108 strings.SetString("url", failed_url); | 106 strings.SetString("url", failed_url); |
109 | 107 |
110 // The offline page for app has icons and slightly different message. | 108 // The offline page for app has icons and slightly different message. |
111 Profile* profile = Profile::FromBrowserContext( | 109 Profile* profile = Profile::FromBrowserContext( |
112 web_contents_->GetBrowserContext()); | 110 web_contents_->GetBrowserContext()); |
113 DCHECK(profile); | 111 DCHECK(profile); |
114 const extensions::Extension* extension = NULL; | 112 const extensions::Extension* extension = NULL; |
115 ExtensionService* extensions_service = | 113 ExtensionService* extensions_service = |
116 extensions::ExtensionSystem::Get(profile)->extension_service(); | 114 extensions::ExtensionSystem::Get(profile)->extension_service(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 for (size_t i = 0; i < cell_networks.size(); ++i) { | 204 for (size_t i = 0; i < cell_networks.size(); ++i) { |
207 chromeos::ActivationState activation_state = | 205 chromeos::ActivationState activation_state = |
208 cell_networks[i]->activation_state(); | 206 cell_networks[i]->activation_state(); |
209 if (activation_state == ACTIVATION_STATE_ACTIVATED) | 207 if (activation_state == ACTIVATION_STATE_ACTIVATED) |
210 return false; | 208 return false; |
211 } | 209 } |
212 return true; | 210 return true; |
213 } | 211 } |
214 | 212 |
215 } // namespace chromeos | 213 } // namespace chromeos |
OLD | NEW |