OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/eula_view.h" | 5 #include "chrome/browser/chromeos/login/eula_view.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "chrome/browser/tab_contents/tab_contents.h" | 30 #include "chrome/browser/tab_contents/tab_contents.h" |
31 #include "chrome/browser/views/dom_view.h" | 31 #include "chrome/browser/views/dom_view.h" |
32 #include "chrome/browser/views/window.h" | 32 #include "chrome/browser/views/window.h" |
33 #include "chrome/common/native_web_keyboard_event.h" | 33 #include "chrome/common/native_web_keyboard_event.h" |
34 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
35 #include "grit/chromium_strings.h" | 35 #include "grit/chromium_strings.h" |
36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
37 #include "grit/locale_settings.h" | 37 #include "grit/locale_settings.h" |
38 #include "grit/theme_resources.h" | 38 #include "grit/theme_resources.h" |
39 #include "views/controls/button/checkbox.h" | 39 #include "views/controls/button/checkbox.h" |
40 #include "views/controls/button/native_button.h" | |
41 #include "views/controls/label.h" | 40 #include "views/controls/label.h" |
42 #include "views/controls/throbber.h" | 41 #include "views/controls/throbber.h" |
43 #include "views/grid_layout.h" | 42 #include "views/grid_layout.h" |
44 #include "views/layout_manager.h" | 43 #include "views/layout_manager.h" |
45 #include "views/standard_layout.h" | 44 #include "views/standard_layout.h" |
46 #include "views/widget/widget_gtk.h" | 45 #include "views/widget/widget_gtk.h" |
47 #include "views/window/dialog_delegate.h" | 46 #include "views/window/dialog_delegate.h" |
48 #include "views/window/window.h" | 47 #include "views/window/window.h" |
49 | 48 |
50 using views::WidgetGtk; | 49 using views::WidgetGtk; |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 system_security_settings_link_->SetController(this); | 386 system_security_settings_link_->SetController(this); |
388 | 387 |
389 if (!chromeos::CrosLibrary::Get()->EnsureLoaded() || | 388 if (!chromeos::CrosLibrary::Get()->EnsureLoaded() || |
390 !chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()-> | 389 !chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()-> |
391 TpmIsEnabled()) { | 390 TpmIsEnabled()) { |
392 system_security_settings_link_->SetEnabled(false); | 391 system_security_settings_link_->SetEnabled(false); |
393 } | 392 } |
394 | 393 |
395 layout->AddView(system_security_settings_link_); | 394 layout->AddView(system_security_settings_link_); |
396 | 395 |
397 back_button_ = new views::NativeButton(this, std::wstring()); | 396 back_button_ = new login::WideButton(this, std::wstring()); |
398 layout->AddView(back_button_); | 397 layout->AddView(back_button_); |
399 | 398 |
400 continue_button_ = new views::NativeButton(this, std::wstring()); | 399 continue_button_ = new login::WideButton(this, std::wstring()); |
401 layout->AddView(continue_button_); | 400 layout->AddView(continue_button_); |
402 layout->AddPaddingRow(0, kPadding); | 401 layout->AddPaddingRow(0, kPadding); |
403 | 402 |
404 UpdateLocalizedStrings(); | 403 UpdateLocalizedStrings(); |
405 } | 404 } |
406 | 405 |
407 void EulaView::UpdateLocalizedStrings() { | 406 void EulaView::UpdateLocalizedStrings() { |
408 // Load Google EULA and its title. | 407 // Load Google EULA and its title. |
409 LoadEulaView(google_eula_view_, google_eula_label_, GURL(kGoogleEulaUrl)); | 408 LoadEulaView(google_eula_view_, google_eula_label_, GURL(kGoogleEulaUrl)); |
410 | 409 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 bool EulaView::OnKeyPressed(const views::KeyEvent&) { | 531 bool EulaView::OnKeyPressed(const views::KeyEvent&) { |
533 // Close message bubble if shown. bubble_ will be set to NULL in callback. | 532 // Close message bubble if shown. bubble_ will be set to NULL in callback. |
534 if (bubble_) { | 533 if (bubble_) { |
535 bubble_->Close(); | 534 bubble_->Close(); |
536 return true; | 535 return true; |
537 } | 536 } |
538 return false; | 537 return false; |
539 } | 538 } |
540 | 539 |
541 } // namespace chromeos | 540 } // namespace chromeos |
OLD | NEW |