| 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/views/website_settings/website_settings_popup_view.h
" | 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/api/infobars/infobar_service.h" | 9 #include "chrome/browser/api/infobars/infobar_service.h" |
| 10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 layout->StartRow(1, content_column); | 315 layout->StartRow(1, content_column); |
| 316 layout->AddView(tabbed_pane_); | 316 layout->AddView(tabbed_pane_); |
| 317 // Tabs must be added after the tabbed_pane_ was added to the views | 317 // Tabs must be added after the tabbed_pane_ was added to the views |
| 318 // hierachy. Adding the |tabbed_pane_| to the views hierachy triggers the | 318 // hierachy. Adding the |tabbed_pane_| to the views hierachy triggers the |
| 319 // initialization of the native tab UI element. If the native tab UI | 319 // initialization of the native tab UI element. If the native tab UI |
| 320 // element is not initalized adding a tab will result in a NULL pointer | 320 // element is not initalized adding a tab will result in a NULL pointer |
| 321 // exception. | 321 // exception. |
| 322 tabbed_pane_->AddTabAtIndex( | 322 tabbed_pane_->AddTabAtIndex( |
| 323 TAB_ID_PERMISSIONS, | 323 TAB_ID_PERMISSIONS, |
| 324 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TAB_LABEL_PERMISSIONS), | 324 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TAB_LABEL_PERMISSIONS), |
| 325 CreatePermissionsTab(), | 325 CreatePermissionsTab()); |
| 326 true); | |
| 327 connection_tab_ = CreateConnectionTab(); | 326 connection_tab_ = CreateConnectionTab(); |
| 328 tabbed_pane_->AddTabAtIndex( | 327 tabbed_pane_->AddTabAtIndex( |
| 329 TAB_ID_CONNECTION, | 328 TAB_ID_CONNECTION, |
| 330 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TAB_LABEL_CONNECTION), | 329 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TAB_LABEL_CONNECTION), |
| 331 connection_tab_, | 330 connection_tab_); |
| 332 true); | |
| 333 DCHECK_EQ(tabbed_pane_->GetTabCount(), NUM_TAB_IDS); | 331 DCHECK_EQ(tabbed_pane_->GetTabCount(), NUM_TAB_IDS); |
| 334 tabbed_pane_->set_listener(this); | 332 tabbed_pane_->set_listener(this); |
| 335 | 333 |
| 336 set_margins(gfx::Insets(kPopupMarginTop, kPopupMarginLeft, | 334 set_margins(gfx::Insets(kPopupMarginTop, kPopupMarginLeft, |
| 337 kPopupMarginBottom, kPopupMarginRight)); | 335 kPopupMarginBottom, kPopupMarginRight)); |
| 338 | 336 |
| 339 views::BubbleDelegateView::CreateBubble(this); | 337 views::BubbleDelegateView::CreateBubble(this); |
| 340 this->Show(); | 338 this->Show(); |
| 341 SizeToContents(); | 339 SizeToContents(); |
| 342 | 340 |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 744 |
| 747 if (link) { | 745 if (link) { |
| 748 content_layout->StartRow(1, 0); | 746 content_layout->StartRow(1, 0); |
| 749 content_layout->AddView(link); | 747 content_layout->AddView(link); |
| 750 } | 748 } |
| 751 | 749 |
| 752 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, | 750 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, |
| 753 views::GridLayout::LEADING); | 751 views::GridLayout::LEADING); |
| 754 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); | 752 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); |
| 755 } | 753 } |
| OLD | NEW |