Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/chromeos/offline/offline_load_page.cc

Issue 14311003: Fix font on offline load page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/offline_load.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/offline_load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698