OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/signin/merge_session_load_page.h" | 5 #include "chrome/browser/chromeos/login/signin/merge_session_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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 strings.SetInteger("show_delay_time", kShowDelayTimeMS); | 83 strings.SetInteger("show_delay_time", kShowDelayTimeMS); |
84 strings.SetInteger("total_wait_time", kTotalWaitTimeMS); | 84 strings.SetInteger("total_wait_time", kTotalWaitTimeMS); |
85 // TODO(zelidrag): Flip the message to IDS_MERGE_SESSION_LOAD_HEADLINE | 85 // TODO(zelidrag): Flip the message to IDS_MERGE_SESSION_LOAD_HEADLINE |
86 // after merge. | 86 // after merge. |
87 strings.SetString("heading", | 87 strings.SetString("heading", |
88 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE)); | 88 l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE)); |
89 | 89 |
90 bool rtl = base::i18n::IsRTL(); | 90 bool rtl = base::i18n::IsRTL(); |
91 strings.SetString("textdirection", rtl ? "rtl" : "ltr"); | 91 strings.SetString("textdirection", rtl ? "rtl" : "ltr"); |
92 | 92 |
93 webui::UseVersion2 version2; | |
94 base::StringPiece html( | 93 base::StringPiece html( |
95 ResourceBundle::GetSharedInstance().GetRawDataResource( | 94 ResourceBundle::GetSharedInstance().GetRawDataResource( |
96 IDR_MERGE_SESSION_LOAD_HTML)); | 95 IDR_MERGE_SESSION_LOAD_HTML)); |
97 return webui::GetI18nTemplateHtml(html, &strings); | 96 return webui::GetI18nTemplateHtml(html, &strings); |
98 } | 97 } |
99 | 98 |
100 void MergeSessionLoadPage::OverrideRendererPrefs( | 99 void MergeSessionLoadPage::OverrideRendererPrefs( |
101 content::RendererPreferences* prefs) { | 100 content::RendererPreferences* prefs) { |
102 Profile* profile = Profile::FromBrowserContext( | 101 Profile* profile = Profile::FromBrowserContext( |
103 web_contents_->GetBrowserContext()); | 102 web_contents_->GetBrowserContext()); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 " NOT " : "") | 163 " NOT " : "") |
165 << " be blocking now, " | 164 << " be blocking now, " |
166 << state; | 165 << state; |
167 if (!manager->ShouldBlockTabLoading()) { | 166 if (!manager->ShouldBlockTabLoading()) { |
168 manager->RemoveObserver(this); | 167 manager->RemoveObserver(this); |
169 interstitial_page_->Proceed(); | 168 interstitial_page_->Proceed(); |
170 } | 169 } |
171 } | 170 } |
172 | 171 |
173 } // namespace chromeos | 172 } // namespace chromeos |
OLD | NEW |