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 // Setup our text formatting strings. | |
Dan Beam
2013/04/17 00:57:01
I don't really understand what this comment adds,
rkc
2013/04/17 19:06:52
Done.
| |
103 webui::SetFontAndTextDirection(&strings); | |
104 | |
102 bool rtl = base::i18n::IsRTL(); | 105 bool rtl = base::i18n::IsRTL(); |
103 strings.SetString("textdirection", rtl ? "rtl" : "ltr"); | |
104 | |
105 string16 failed_url(ASCIIToUTF16(url_.spec())); | 106 string16 failed_url(ASCIIToUTF16(url_.spec())); |
106 if (rtl) | 107 if (rtl) |
Dan Beam
2013/04/17 00:57:01
nit: inline, i.e.
if (base::i18n::IsRTL())
rkc
2013/04/17 19:06:52
Done.
| |
107 base::i18n::WrapStringWithLTRFormatting(&failed_url); | 108 base::i18n::WrapStringWithLTRFormatting(&failed_url); |
108 strings.SetString("url", failed_url); | 109 strings.SetString("url", failed_url); |
109 | 110 |
110 // The offline page for app has icons and slightly different message. | 111 // The offline page for app has icons and slightly different message. |
111 Profile* profile = Profile::FromBrowserContext( | 112 Profile* profile = Profile::FromBrowserContext( |
112 web_contents_->GetBrowserContext()); | 113 web_contents_->GetBrowserContext()); |
113 DCHECK(profile); | 114 DCHECK(profile); |
114 const extensions::Extension* extension = NULL; | 115 const extensions::Extension* extension = NULL; |
115 ExtensionService* extensions_service = | 116 ExtensionService* extensions_service = |
116 extensions::ExtensionSystem::Get(profile)->extension_service(); | 117 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) { | 207 for (size_t i = 0; i < cell_networks.size(); ++i) { |
207 chromeos::ActivationState activation_state = | 208 chromeos::ActivationState activation_state = |
208 cell_networks[i]->activation_state(); | 209 cell_networks[i]->activation_state(); |
209 if (activation_state == ACTIVATION_STATE_ACTIVATED) | 210 if (activation_state == ACTIVATION_STATE_ACTIVATED) |
210 return false; | 211 return false; |
211 } | 212 } |
212 return true; | 213 return true; |
213 } | 214 } |
214 | 215 |
215 } // namespace chromeos | 216 } // namespace chromeos |
OLD | NEW |