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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 10 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Helper class to tweak display details of credits pages in the context | 30 // Helper class to tweak display details of credits pages in the context |
31 // of OOBE/EULA step. | 31 // of OOBE/EULA step. |
32 class CreditsWebDialog : public chromeos::LoginWebDialog { | 32 class CreditsWebDialog : public chromeos::LoginWebDialog { |
33 public: | 33 public: |
34 CreditsWebDialog(Profile* profile, | 34 CreditsWebDialog(Profile* profile, |
35 gfx::NativeWindow parent_window, | 35 gfx::NativeWindow parent_window, |
36 int title_id, | 36 int title_id, |
37 const GURL& url) | 37 const GURL& url) |
38 : chromeos::LoginWebDialog(profile, NULL, parent_window, | 38 : chromeos::LoginWebDialog(profile, NULL, parent_window, |
39 l10n_util::GetStringUTF16(title_id), | 39 l10n_util::GetStringUTF16(title_id), |
40 url, | 40 url) { |
41 chromeos::LoginWebDialog::STYLE_BUBBLE) { | |
42 } | 41 } |
43 | 42 |
44 virtual void OnLoadingStateChanged(content::WebContents* source) OVERRIDE { | 43 virtual void OnLoadingStateChanged(content::WebContents* source) OVERRIDE { |
45 chromeos::LoginWebDialog::OnLoadingStateChanged(source); | 44 chromeos::LoginWebDialog::OnLoadingStateChanged(source); |
46 // Remove visual elements that we can handle in EULA page. | 45 // Remove visual elements that we can handle in EULA page. |
47 bool is_loading = source->IsLoading(); | 46 bool is_loading = source->IsLoading(); |
48 if (!is_loading && source->GetWebUI()) { | 47 if (!is_loading && source->GetWebUI()) { |
49 source->GetWebUI()->CallJavascriptFunction( | 48 source->GetWebUI()->CallJavascriptFunction( |
50 "(function () {" | 49 "(function () {" |
51 " document.body.classList.toggle('dialog', true);" | 50 " document.body.classList.toggle('dialog', true);" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 IDS_ABOUT_VERSION_LICENSE_EULA, | 208 IDS_ABOUT_VERSION_LICENSE_EULA, |
210 GURL(chrome::kChromeUICreditsURL)); | 209 GURL(chrome::kChromeUICreditsURL)); |
211 } | 210 } |
212 | 211 |
213 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { | 212 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { |
214 if (delegate_) | 213 if (delegate_) |
215 delegate_->InitiatePasswordFetch(); | 214 delegate_->InitiatePasswordFetch(); |
216 } | 215 } |
217 | 216 |
218 } // namespace chromeos | 217 } // namespace chromeos |
OLD | NEW |