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/ui/webui/chromeos/login/eula_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 : chromeos::LoginWebDialog(profile, NULL, parent_window, | 42 : chromeos::LoginWebDialog(profile, NULL, parent_window, |
43 l10n_util::GetStringUTF16(title_id), | 43 l10n_util::GetStringUTF16(title_id), |
44 url) { | 44 url) { |
45 } | 45 } |
46 | 46 |
47 void OnLoadingStateChanged(content::WebContents* source) override { | 47 void OnLoadingStateChanged(content::WebContents* source) override { |
48 chromeos::LoginWebDialog::OnLoadingStateChanged(source); | 48 chromeos::LoginWebDialog::OnLoadingStateChanged(source); |
49 // Remove visual elements that we can handle in EULA page. | 49 // Remove visual elements that we can handle in EULA page. |
50 bool is_loading = source->IsLoading(); | 50 bool is_loading = source->IsLoading(); |
51 if (!is_loading && source->GetWebUI()) { | 51 if (!is_loading && source->GetWebUI()) { |
52 source->GetWebUI()->CallJavascriptFunction( | 52 source->GetWebUI()->CallJavascriptFunctionUnsafe( |
53 "(function () {" | 53 "(function () {" |
54 " document.body.classList.toggle('dialog', true);" | 54 " document.body.classList.toggle('dialog', true);" |
55 " keyboard.initializeKeyboardFlow();" | 55 " keyboard.initializeKeyboardFlow();" |
56 "})"); | 56 "})"); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 private: | 60 private: |
61 DISALLOW_COPY_AND_ASSIGN(CreditsWebDialog); | 61 DISALLOW_COPY_AND_ASSIGN(CreditsWebDialog); |
62 }; | 62 }; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 IDS_ABOUT_VERSION_LICENSE_EULA, | 211 IDS_ABOUT_VERSION_LICENSE_EULA, |
212 GURL(chrome::kChromeUICreditsURL)); | 212 GURL(chrome::kChromeUICreditsURL)); |
213 } | 213 } |
214 | 214 |
215 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { | 215 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { |
216 if (model_) | 216 if (model_) |
217 model_->InitiatePasswordFetch(); | 217 model_->InitiatePasswordFetch(); |
218 } | 218 } |
219 | 219 |
220 } // namespace chromeos | 220 } // namespace chromeos |
OLD | NEW |