OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/merge_session_load_page.h" | 5 #include "chrome/browser/chromeos/login/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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 OAuth2LoginManager* manager = GetOAuth2LoginManager(); | 70 OAuth2LoginManager* manager = GetOAuth2LoginManager(); |
71 if (manager && manager->ShouldBlockTabLoading()) { | 71 if (manager && manager->ShouldBlockTabLoading()) { |
72 manager->AddObserver(this); | 72 manager->AddObserver(this); |
73 interstitial_page_->Show(); | 73 interstitial_page_->Show(); |
74 } else { | 74 } else { |
75 interstitial_page_->Proceed(); | 75 interstitial_page_->Proceed(); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 std::string MergeSessionLoadPage::GetHTMLContents() { | 79 std::string MergeSessionLoadPage::GetHTMLContents() { |
80 DictionaryValue strings; | 80 base::DictionaryValue strings; |
81 strings.SetString("title", web_contents_->GetTitle()); | 81 strings.SetString("title", web_contents_->GetTitle()); |
82 // Set the timeout to show the page. | 82 // Set the timeout to show the page. |
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(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 " NOT " : "") | 163 " NOT " : "") |
164 << " be blocking now, " | 164 << " be blocking now, " |
165 << state; | 165 << state; |
166 if (!manager->ShouldBlockTabLoading()) { | 166 if (!manager->ShouldBlockTabLoading()) { |
167 manager->RemoveObserver(this); | 167 manager->RemoveObserver(this); |
168 interstitial_page_->Proceed(); | 168 interstitial_page_->Proceed(); |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 } // namespace chromeos | 172 } // namespace chromeos |
OLD | NEW |