| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/options/advanced_contents_view.h" | 5 #include "chrome/browser/views/options/advanced_contents_view.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <cryptuiapi.h> | 9 #include <cryptuiapi.h> |
| 10 #pragma comment(lib, "cryptui.lib") | 10 #pragma comment(lib, "cryptui.lib") |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "grit/app_resources.h" | 39 #include "grit/app_resources.h" |
| 40 #include "grit/chromium_strings.h" | 40 #include "grit/chromium_strings.h" |
| 41 #include "grit/generated_resources.h" | 41 #include "grit/generated_resources.h" |
| 42 #include "grit/locale_settings.h" | 42 #include "grit/locale_settings.h" |
| 43 #include "net/base/ssl_config_service.h" | 43 #include "net/base/ssl_config_service.h" |
| 44 #include "net/base/cookie_policy.h" | 44 #include "net/base/cookie_policy.h" |
| 45 #include "skia/ext/skia_utils_win.h" | 45 #include "skia/ext/skia_utils_win.h" |
| 46 #include "third_party/skia/include/core/SkBitmap.h" | 46 #include "third_party/skia/include/core/SkBitmap.h" |
| 47 #include "views/background.h" | 47 #include "views/background.h" |
| 48 #include "views/controls/button/checkbox.h" | 48 #include "views/controls/button/checkbox.h" |
| 49 #include "views/controls/combo_box.h" | 49 #include "views/controls/combobox/combobox.h" |
| 50 #include "views/controls/scroll_view.h" | 50 #include "views/controls/scroll_view.h" |
| 51 #include "views/controls/textfield/textfield.h" | 51 #include "views/controls/textfield/textfield.h" |
| 52 #include "views/grid_layout.h" | 52 #include "views/grid_layout.h" |
| 53 #include "views/standard_layout.h" | 53 #include "views/standard_layout.h" |
| 54 #include "views/widget/widget.h" | 54 #include "views/widget/widget.h" |
| 55 | 55 |
| 56 using views::GridLayout; | 56 using views::GridLayout; |
| 57 using views::ColumnSet; | 57 using views::ColumnSet; |
| 58 | 58 |
| 59 namespace { | 59 namespace { |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 layout->StartRow(0, single_column_layout_id); | 414 layout->StartRow(0, single_column_layout_id); |
| 415 layout->AddView(title_label_); | 415 layout->AddView(title_label_); |
| 416 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 416 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 417 layout->StartRow(0, inset_column_layout_id); | 417 layout->StartRow(0, inset_column_layout_id); |
| 418 layout->AddView(contents_); | 418 layout->AddView(contents_); |
| 419 } | 419 } |
| 420 | 420 |
| 421 //////////////////////////////////////////////////////////////////////////////// | 421 //////////////////////////////////////////////////////////////////////////////// |
| 422 // PrivacySection | 422 // PrivacySection |
| 423 | 423 |
| 424 class CookieBehaviorComboModel : public views::ComboBox::Model { | 424 class CookieBehaviorComboModel : public views::Combobox::Model { |
| 425 public: | 425 public: |
| 426 CookieBehaviorComboModel() {} | 426 CookieBehaviorComboModel() {} |
| 427 | 427 |
| 428 // Return the number of items in the combo box. | 428 // Return the number of items in the combo box. |
| 429 virtual int GetItemCount(views::ComboBox* source) { | 429 virtual int GetItemCount(views::Combobox* source) { |
| 430 return 3; | 430 return 3; |
| 431 } | 431 } |
| 432 | 432 |
| 433 virtual std::wstring GetItemAt(views::ComboBox* source, int index) { | 433 virtual std::wstring GetItemAt(views::Combobox* source, int index) { |
| 434 const int kStringIDs[] = { | 434 const int kStringIDs[] = { |
| 435 IDS_OPTIONS_COOKIES_ACCEPT_ALL_COOKIES, | 435 IDS_OPTIONS_COOKIES_ACCEPT_ALL_COOKIES, |
| 436 IDS_OPTIONS_COOKIES_RESTRICT_THIRD_PARTY_COOKIES, | 436 IDS_OPTIONS_COOKIES_RESTRICT_THIRD_PARTY_COOKIES, |
| 437 IDS_OPTIONS_COOKIES_BLOCK_ALL_COOKIES | 437 IDS_OPTIONS_COOKIES_BLOCK_ALL_COOKIES |
| 438 }; | 438 }; |
| 439 if (index >= 0 && index < arraysize(kStringIDs)) | 439 if (index >= 0 && index < arraysize(kStringIDs)) |
| 440 return l10n_util::GetString(kStringIDs[index]); | 440 return l10n_util::GetString(kStringIDs[index]); |
| 441 | 441 |
| 442 NOTREACHED(); | 442 NOTREACHED(); |
| 443 return L""; | 443 return L""; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 454 NOTREACHED(); | 454 NOTREACHED(); |
| 455 return net::CookiePolicy::ALLOW_ALL_COOKIES; | 455 return net::CookiePolicy::ALLOW_ALL_COOKIES; |
| 456 } | 456 } |
| 457 | 457 |
| 458 private: | 458 private: |
| 459 DISALLOW_COPY_AND_ASSIGN(CookieBehaviorComboModel); | 459 DISALLOW_COPY_AND_ASSIGN(CookieBehaviorComboModel); |
| 460 }; | 460 }; |
| 461 | 461 |
| 462 class PrivacySection : public AdvancedSection, | 462 class PrivacySection : public AdvancedSection, |
| 463 public views::ButtonListener, | 463 public views::ButtonListener, |
| 464 public views::ComboBox::Listener, | 464 public views::Combobox::Listener, |
| 465 public views::LinkController { | 465 public views::LinkController { |
| 466 public: | 466 public: |
| 467 explicit PrivacySection(Profile* profile); | 467 explicit PrivacySection(Profile* profile); |
| 468 virtual ~PrivacySection() {} | 468 virtual ~PrivacySection() {} |
| 469 | 469 |
| 470 // Overridden from views::ButtonListener: | 470 // Overridden from views::ButtonListener: |
| 471 virtual void ButtonPressed(views::Button* sender); | 471 virtual void ButtonPressed(views::Button* sender); |
| 472 | 472 |
| 473 // Overridden from views::ComboBox::Listener: | 473 // Overridden from views::Combobox::Listener: |
| 474 virtual void ItemChanged(views::ComboBox* sender, | 474 virtual void ItemChanged(views::Combobox* sender, |
| 475 int prev_index, | 475 int prev_index, |
| 476 int new_index); | 476 int new_index); |
| 477 | 477 |
| 478 // Overridden from views::LinkController: | 478 // Overridden from views::LinkController: |
| 479 virtual void LinkActivated(views::Link* source, int event_flags); | 479 virtual void LinkActivated(views::Link* source, int event_flags); |
| 480 | 480 |
| 481 // Overridden from views::View: | 481 // Overridden from views::View: |
| 482 virtual void Layout(); | 482 virtual void Layout(); |
| 483 | 483 |
| 484 protected: | 484 protected: |
| 485 // OptionsPageView overrides: | 485 // OptionsPageView overrides: |
| 486 virtual void InitControlLayout(); | 486 virtual void InitControlLayout(); |
| 487 virtual void NotifyPrefChanged(const std::wstring* pref_name); | 487 virtual void NotifyPrefChanged(const std::wstring* pref_name); |
| 488 | 488 |
| 489 private: | 489 private: |
| 490 // Controls for this section: | 490 // Controls for this section: |
| 491 views::Label* section_description_label_; | 491 views::Label* section_description_label_; |
| 492 views::Checkbox* enable_link_doctor_checkbox_; | 492 views::Checkbox* enable_link_doctor_checkbox_; |
| 493 views::Checkbox* enable_suggest_checkbox_; | 493 views::Checkbox* enable_suggest_checkbox_; |
| 494 views::Checkbox* enable_dns_prefetching_checkbox_; | 494 views::Checkbox* enable_dns_prefetching_checkbox_; |
| 495 views::Checkbox* enable_safe_browsing_checkbox_; | 495 views::Checkbox* enable_safe_browsing_checkbox_; |
| 496 views::Checkbox* reporting_enabled_checkbox_; | 496 views::Checkbox* reporting_enabled_checkbox_; |
| 497 views::Link* learn_more_link_; | 497 views::Link* learn_more_link_; |
| 498 views::Label* cookie_behavior_label_; | 498 views::Label* cookie_behavior_label_; |
| 499 views::ComboBox* cookie_behavior_combobox_; | 499 views::Combobox* cookie_behavior_combobox_; |
| 500 views::NativeButton* show_cookies_button_; | 500 views::NativeButton* show_cookies_button_; |
| 501 | 501 |
| 502 // Dummy for now. Used to populate cookies models. | 502 // Dummy for now. Used to populate cookies models. |
| 503 scoped_ptr<CookieBehaviorComboModel> allow_cookies_model_; | 503 scoped_ptr<CookieBehaviorComboModel> allow_cookies_model_; |
| 504 | 504 |
| 505 // Preferences for this section: | 505 // Preferences for this section: |
| 506 BooleanPrefMember alternate_error_pages_; | 506 BooleanPrefMember alternate_error_pages_; |
| 507 BooleanPrefMember use_suggest_; | 507 BooleanPrefMember use_suggest_; |
| 508 BooleanPrefMember dns_prefetch_enabled_; | 508 BooleanPrefMember dns_prefetch_enabled_; |
| 509 BooleanPrefMember safe_browsing_; | 509 BooleanPrefMember safe_browsing_; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 // do this then it will return 0 as a preferred width when GridLayout (called | 597 // do this then it will return 0 as a preferred width when GridLayout (called |
| 598 // from View::Layout) tries to access it. | 598 // from View::Layout) tries to access it. |
| 599 views::View* parent = GetParent(); | 599 views::View* parent = GetParent(); |
| 600 if (parent && parent->width()) { | 600 if (parent && parent->width()) { |
| 601 const int parent_width = parent->width(); | 601 const int parent_width = parent->width(); |
| 602 reporting_enabled_checkbox_->SetBounds(0, 0, parent_width - 20, 0); | 602 reporting_enabled_checkbox_->SetBounds(0, 0, parent_width - 20, 0); |
| 603 } | 603 } |
| 604 View::Layout(); | 604 View::Layout(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 void PrivacySection::ItemChanged(views::ComboBox* sender, | 607 void PrivacySection::ItemChanged(views::Combobox* sender, |
| 608 int prev_index, | 608 int prev_index, |
| 609 int new_index) { | 609 int new_index) { |
| 610 if (sender == cookie_behavior_combobox_) { | 610 if (sender == cookie_behavior_combobox_) { |
| 611 net::CookiePolicy::Type cookie_policy = | 611 net::CookiePolicy::Type cookie_policy = |
| 612 CookieBehaviorComboModel::IndexToCookiePolicy(new_index); | 612 CookieBehaviorComboModel::IndexToCookiePolicy(new_index); |
| 613 const wchar_t* kUserMetrics[] = { | 613 const wchar_t* kUserMetrics[] = { |
| 614 L"Options_AllowAllCookies", | 614 L"Options_AllowAllCookies", |
| 615 L"Options_BlockThirdPartyCookies", | 615 L"Options_BlockThirdPartyCookies", |
| 616 L"Options_BlockAllCookies" | 616 L"Options_BlockAllCookies" |
| 617 }; | 617 }; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 645 #if defined(GOOGLE_CHROME_BUILD) | 645 #if defined(GOOGLE_CHROME_BUILD) |
| 646 reporting_enabled_checkbox_->SetVisible(true); | 646 reporting_enabled_checkbox_->SetVisible(true); |
| 647 #else | 647 #else |
| 648 reporting_enabled_checkbox_->SetVisible(false); | 648 reporting_enabled_checkbox_->SetVisible(false); |
| 649 #endif | 649 #endif |
| 650 learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE)); | 650 learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE)); |
| 651 learn_more_link_->SetController(this); | 651 learn_more_link_->SetController(this); |
| 652 cookie_behavior_label_ = new views::Label( | 652 cookie_behavior_label_ = new views::Label( |
| 653 l10n_util::GetString(IDS_OPTIONS_COOKIES_ACCEPT_LABEL)); | 653 l10n_util::GetString(IDS_OPTIONS_COOKIES_ACCEPT_LABEL)); |
| 654 allow_cookies_model_.reset(new CookieBehaviorComboModel); | 654 allow_cookies_model_.reset(new CookieBehaviorComboModel); |
| 655 cookie_behavior_combobox_ = new views::ComboBox( | 655 cookie_behavior_combobox_ = new views::Combobox( |
| 656 allow_cookies_model_.get()); | 656 allow_cookies_model_.get()); |
| 657 cookie_behavior_combobox_->SetListener(this); | 657 cookie_behavior_combobox_->set_listener(this); |
| 658 show_cookies_button_ = new views::NativeButton( | 658 show_cookies_button_ = new views::NativeButton( |
| 659 this, l10n_util::GetString(IDS_OPTIONS_COOKIES_SHOWCOOKIES)); | 659 this, l10n_util::GetString(IDS_OPTIONS_COOKIES_SHOWCOOKIES)); |
| 660 | 660 |
| 661 GridLayout* layout = new GridLayout(contents_); | 661 GridLayout* layout = new GridLayout(contents_); |
| 662 contents_->SetLayoutManager(layout); | 662 contents_->SetLayoutManager(layout); |
| 663 | 663 |
| 664 const int single_column_view_set_id = 0; | 664 const int single_column_view_set_id = 0; |
| 665 AddWrappingColumnSet(layout, single_column_view_set_id); | 665 AddWrappingColumnSet(layout, single_column_view_set_id); |
| 666 const int dependent_labeled_field_set_id = 1; | 666 const int dependent_labeled_field_set_id = 1; |
| 667 AddDependentTwoColumnSet(layout, dependent_labeled_field_set_id); | 667 AddDependentTwoColumnSet(layout, dependent_labeled_field_set_id); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 false); | 861 false); |
| 862 | 862 |
| 863 // Gears. | 863 // Gears. |
| 864 AddTwoColumnRow(layout, gears_label_, gears_settings_button_, false, | 864 AddTwoColumnRow(layout, gears_label_, gears_settings_button_, false, |
| 865 single_double_column_set, false); | 865 single_double_column_set, false); |
| 866 } | 866 } |
| 867 | 867 |
| 868 //////////////////////////////////////////////////////////////////////////////// | 868 //////////////////////////////////////////////////////////////////////////////// |
| 869 // SecuritySection | 869 // SecuritySection |
| 870 | 870 |
| 871 class MixedContentComboModel : public views::ComboBox::Model { | 871 class MixedContentComboModel : public views::Combobox::Model { |
| 872 public: | 872 public: |
| 873 MixedContentComboModel() {} | 873 MixedContentComboModel() {} |
| 874 | 874 |
| 875 // Return the number of items in the combo box. | 875 // Return the number of items in the combo box. |
| 876 virtual int GetItemCount(views::ComboBox* source) { | 876 virtual int GetItemCount(views::Combobox* source) { |
| 877 return 3; | 877 return 3; |
| 878 } | 878 } |
| 879 | 879 |
| 880 virtual std::wstring GetItemAt(views::ComboBox* source, int index) { | 880 virtual std::wstring GetItemAt(views::Combobox* source, int index) { |
| 881 const int kStringIDs[] = { | 881 const int kStringIDs[] = { |
| 882 IDS_OPTIONS_INCLUDE_MIXED_CONTENT, | 882 IDS_OPTIONS_INCLUDE_MIXED_CONTENT, |
| 883 IDS_OPTIONS_INCLUDE_MIXED_CONTENT_IMAGE_ONLY, | 883 IDS_OPTIONS_INCLUDE_MIXED_CONTENT_IMAGE_ONLY, |
| 884 IDS_OPTIONS_INCLUDE_NO_MIXED_CONTENT | 884 IDS_OPTIONS_INCLUDE_NO_MIXED_CONTENT |
| 885 }; | 885 }; |
| 886 if (index >= 0 && index < arraysize(kStringIDs)) | 886 if (index >= 0 && index < arraysize(kStringIDs)) |
| 887 return l10n_util::GetString(kStringIDs[index]); | 887 return l10n_util::GetString(kStringIDs[index]); |
| 888 | 888 |
| 889 NOTREACHED(); | 889 NOTREACHED(); |
| 890 return L""; | 890 return L""; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 901 NOTREACHED(); | 901 NOTREACHED(); |
| 902 return FilterPolicy::DONT_FILTER; | 902 return FilterPolicy::DONT_FILTER; |
| 903 } | 903 } |
| 904 | 904 |
| 905 private: | 905 private: |
| 906 DISALLOW_COPY_AND_ASSIGN(MixedContentComboModel); | 906 DISALLOW_COPY_AND_ASSIGN(MixedContentComboModel); |
| 907 }; | 907 }; |
| 908 | 908 |
| 909 class SecuritySection : public AdvancedSection, | 909 class SecuritySection : public AdvancedSection, |
| 910 public views::ButtonListener, | 910 public views::ButtonListener, |
| 911 public views::ComboBox::Listener { | 911 public views::Combobox::Listener { |
| 912 public: | 912 public: |
| 913 explicit SecuritySection(Profile* profile); | 913 explicit SecuritySection(Profile* profile); |
| 914 virtual ~SecuritySection() {} | 914 virtual ~SecuritySection() {} |
| 915 | 915 |
| 916 // Overridden from views::ButtonListener: | 916 // Overridden from views::ButtonListener: |
| 917 virtual void ButtonPressed(views::Button* sender); | 917 virtual void ButtonPressed(views::Button* sender); |
| 918 | 918 |
| 919 // Overridden from views::ComboBox::Listener: | 919 // Overridden from views::Combobox::Listener: |
| 920 virtual void ItemChanged(views::ComboBox* sender, | 920 virtual void ItemChanged(views::Combobox* sender, |
| 921 int prev_index, | 921 int prev_index, |
| 922 int new_index); | 922 int new_index); |
| 923 | 923 |
| 924 protected: | 924 protected: |
| 925 // OptionsPageView overrides: | 925 // OptionsPageView overrides: |
| 926 virtual void InitControlLayout(); | 926 virtual void InitControlLayout(); |
| 927 virtual void NotifyPrefChanged(const std::wstring* pref_name); | 927 virtual void NotifyPrefChanged(const std::wstring* pref_name); |
| 928 | 928 |
| 929 private: | 929 private: |
| 930 // Controls for this section: | 930 // Controls for this section: |
| 931 views::Label* ssl_info_label_; | 931 views::Label* ssl_info_label_; |
| 932 views::Checkbox* enable_ssl2_checkbox_; | 932 views::Checkbox* enable_ssl2_checkbox_; |
| 933 views::Checkbox* check_for_cert_revocation_checkbox_; | 933 views::Checkbox* check_for_cert_revocation_checkbox_; |
| 934 views::Label* mixed_content_info_label_; | 934 views::Label* mixed_content_info_label_; |
| 935 views::ComboBox* mixed_content_combobox_; | 935 views::Combobox* mixed_content_combobox_; |
| 936 views::Label* manage_certificates_label_; | 936 views::Label* manage_certificates_label_; |
| 937 views::NativeButton* manage_certificates_button_; | 937 views::NativeButton* manage_certificates_button_; |
| 938 | 938 |
| 939 // The contents of the mixed content combobox. | 939 // The contents of the mixed content combobox. |
| 940 scoped_ptr<MixedContentComboModel> mixed_content_model_; | 940 scoped_ptr<MixedContentComboModel> mixed_content_model_; |
| 941 | 941 |
| 942 IntegerPrefMember filter_mixed_content_; | 942 IntegerPrefMember filter_mixed_content_; |
| 943 | 943 |
| 944 DISALLOW_COPY_AND_ASSIGN(SecuritySection); | 944 DISALLOW_COPY_AND_ASSIGN(SecuritySection); |
| 945 }; | 945 }; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 975 net::SSLConfigService::SetRevCheckingEnabled(enabled); | 975 net::SSLConfigService::SetRevCheckingEnabled(enabled); |
| 976 } else if (sender == manage_certificates_button_) { | 976 } else if (sender == manage_certificates_button_) { |
| 977 UserMetricsRecordAction(L"Options_ManagerCerts", NULL); | 977 UserMetricsRecordAction(L"Options_ManagerCerts", NULL); |
| 978 CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 }; | 978 CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 }; |
| 979 cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); | 979 cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); |
| 980 cert_mgr.hwndParent = GetWindow()->GetNativeWindow(); | 980 cert_mgr.hwndParent = GetWindow()->GetNativeWindow(); |
| 981 ::CryptUIDlgCertMgr(&cert_mgr); | 981 ::CryptUIDlgCertMgr(&cert_mgr); |
| 982 } | 982 } |
| 983 } | 983 } |
| 984 | 984 |
| 985 void SecuritySection::ItemChanged(views::ComboBox* sender, | 985 void SecuritySection::ItemChanged(views::Combobox* sender, |
| 986 int prev_index, | 986 int prev_index, |
| 987 int new_index) { | 987 int new_index) { |
| 988 if (sender == mixed_content_combobox_) { | 988 if (sender == mixed_content_combobox_) { |
| 989 // TODO(jcampan): bug #1112812: change this to the real enum once we have | 989 // TODO(jcampan): bug #1112812: change this to the real enum once we have |
| 990 // piped the images only filtering. | 990 // piped the images only filtering. |
| 991 FilterPolicy::Type filter_policy = | 991 FilterPolicy::Type filter_policy = |
| 992 MixedContentComboModel::IndexToFilterPolicy(new_index); | 992 MixedContentComboModel::IndexToFilterPolicy(new_index); |
| 993 const wchar_t* kUserMetrics[] = { | 993 const wchar_t* kUserMetrics[] = { |
| 994 L"Options_FilterNone", | 994 L"Options_FilterNone", |
| 995 L"Options_FilterAllExceptImages", | 995 L"Options_FilterAllExceptImages", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1008 l10n_util::GetString(IDS_OPTIONS_SSL_GROUP_DESCRIPTION)); | 1008 l10n_util::GetString(IDS_OPTIONS_SSL_GROUP_DESCRIPTION)); |
| 1009 enable_ssl2_checkbox_ = new views::Checkbox( | 1009 enable_ssl2_checkbox_ = new views::Checkbox( |
| 1010 l10n_util::GetString(IDS_OPTIONS_SSL_USESSL2)); | 1010 l10n_util::GetString(IDS_OPTIONS_SSL_USESSL2)); |
| 1011 enable_ssl2_checkbox_->set_listener(this); | 1011 enable_ssl2_checkbox_->set_listener(this); |
| 1012 check_for_cert_revocation_checkbox_ = new views::Checkbox( | 1012 check_for_cert_revocation_checkbox_ = new views::Checkbox( |
| 1013 l10n_util::GetString(IDS_OPTIONS_SSL_CHECKREVOCATION)); | 1013 l10n_util::GetString(IDS_OPTIONS_SSL_CHECKREVOCATION)); |
| 1014 check_for_cert_revocation_checkbox_->set_listener(this); | 1014 check_for_cert_revocation_checkbox_->set_listener(this); |
| 1015 mixed_content_info_label_ = new views::Label( | 1015 mixed_content_info_label_ = new views::Label( |
| 1016 l10n_util::GetString(IDS_OPTIONS_MIXED_CONTENT_LABEL)); | 1016 l10n_util::GetString(IDS_OPTIONS_MIXED_CONTENT_LABEL)); |
| 1017 mixed_content_model_.reset(new MixedContentComboModel); | 1017 mixed_content_model_.reset(new MixedContentComboModel); |
| 1018 mixed_content_combobox_ = new views::ComboBox( | 1018 mixed_content_combobox_ = new views::Combobox( |
| 1019 mixed_content_model_.get()); | 1019 mixed_content_model_.get()); |
| 1020 mixed_content_combobox_->SetListener(this); | 1020 mixed_content_combobox_->set_listener(this); |
| 1021 manage_certificates_label_ = new views::Label( | 1021 manage_certificates_label_ = new views::Label( |
| 1022 l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_LABEL)); | 1022 l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_LABEL)); |
| 1023 manage_certificates_button_ = new views::NativeButton( | 1023 manage_certificates_button_ = new views::NativeButton( |
| 1024 this, l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON)); | 1024 this, l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON)); |
| 1025 | 1025 |
| 1026 GridLayout* layout = new GridLayout(contents_); | 1026 GridLayout* layout = new GridLayout(contents_); |
| 1027 contents_->SetLayoutManager(layout); | 1027 contents_->SetLayoutManager(layout); |
| 1028 | 1028 |
| 1029 const int single_column_view_set_id = 0; | 1029 const int single_column_view_set_id = 0; |
| 1030 AddWrappingColumnSet(layout, single_column_view_set_id); | 1030 AddWrappingColumnSet(layout, single_column_view_set_id); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 | 1509 |
| 1510 void AdvancedScrollViewContainer::Layout() { | 1510 void AdvancedScrollViewContainer::Layout() { |
| 1511 gfx::Rect lb = GetLocalBounds(false); | 1511 gfx::Rect lb = GetLocalBounds(false); |
| 1512 | 1512 |
| 1513 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( | 1513 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( |
| 1514 gfx::NativeTheme::LIST); | 1514 gfx::NativeTheme::LIST); |
| 1515 lb.Inset(border.width(), border.height()); | 1515 lb.Inset(border.width(), border.height()); |
| 1516 scroll_view_->SetBounds(lb); | 1516 scroll_view_->SetBounds(lb); |
| 1517 scroll_view_->Layout(); | 1517 scroll_view_->Layout(); |
| 1518 } | 1518 } |
| OLD | NEW |