| 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/managed_mode/managed_mode_interstitial.h" | 5 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 strings.SetString("backButton", l10n_util::GetStringUTF16(IDS_BACK_BUTTON)); | 104 strings.SetString("backButton", l10n_util::GetStringUTF16(IDS_BACK_BUTTON)); |
| 105 strings.SetString( | 105 strings.SetString( |
| 106 "contentPacksSectionButton", | 106 "contentPacksSectionButton", |
| 107 l10n_util::GetStringUTF16(IDS_CONTENT_PACKS_SECTION_BUTTON)); | 107 l10n_util::GetStringUTF16(IDS_CONTENT_PACKS_SECTION_BUTTON)); |
| 108 web_ui_util::SetFontAndTextDirection(&strings); | 108 web_ui_util::SetFontAndTextDirection(&strings); |
| 109 | 109 |
| 110 base::StringPiece html( | 110 base::StringPiece html( |
| 111 ResourceBundle::GetSharedInstance().GetRawDataResource( | 111 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 112 IDR_MANAGED_MODE_BLOCK_INTERSTITIAL_HTML)); | 112 IDR_MANAGED_MODE_BLOCK_INTERSTITIAL_HTML)); |
| 113 | 113 |
| 114 jstemplate_builder::UseVersion2 version; | 114 webui::UseVersion2 version; |
| 115 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); | 115 return webui::GetI18nTemplateHtml(html, &strings); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void ManagedModeInterstitial::CommandReceived(const std::string& command) { | 118 void ManagedModeInterstitial::CommandReceived(const std::string& command) { |
| 119 if (command == "\"preview\"") { | 119 if (command == "\"preview\"") { |
| 120 interstitial_page_->Proceed(); | 120 interstitial_page_->Proceed(); |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 | 123 |
| 124 if (command == "\"back\"") { | 124 if (command == "\"back\"") { |
| 125 interstitial_page_->DontProceed(); | 125 interstitial_page_->DontProceed(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 140 | 140 |
| 141 void ManagedModeInterstitial::OnDontProceed() { | 141 void ManagedModeInterstitial::OnDontProceed() { |
| 142 DispatchContinueRequest(false); | 142 DispatchContinueRequest(false); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { | 145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { |
| 146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 147 base::Bind(callback_, continue_request)); | 147 base::Bind(callback_, continue_request)); |
| 148 } | 148 } |
| 149 | 149 |
| OLD | NEW |