| 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/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/certificate_viewer.h" | 9 #include "chrome/browser/certificate_viewer.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 status_->SetEnabledColor(text_color); | 215 status_->SetEnabledColor(text_color); |
| 216 } | 216 } |
| 217 | 217 |
| 218 //////////////////////////////////////////////////////////////////////////////// | 218 //////////////////////////////////////////////////////////////////////////////// |
| 219 // InternalPageInfoPopupView | 219 // InternalPageInfoPopupView |
| 220 //////////////////////////////////////////////////////////////////////////////// | 220 //////////////////////////////////////////////////////////////////////////////// |
| 221 | 221 |
| 222 InternalPageInfoPopupView::InternalPageInfoPopupView(views::View* anchor_view) | 222 InternalPageInfoPopupView::InternalPageInfoPopupView(views::View* anchor_view) |
| 223 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT) { | 223 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT) { |
| 224 // Compensate for built-in vertical padding in the anchor view's image. | 224 // Compensate for built-in vertical padding in the anchor view's image. |
| 225 set_anchor_insets(gfx::Insets(kLocationIconVerticalMargin, 0, | 225 set_anchor_view_insets(gfx::Insets(kLocationIconVerticalMargin, 0, |
| 226 kLocationIconVerticalMargin, 0)); | 226 kLocationIconVerticalMargin, 0)); |
| 227 | 227 |
| 228 const int kSpacing = 4; | 228 const int kSpacing = 4; |
| 229 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kSpacing, | 229 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kSpacing, |
| 230 kSpacing, kSpacing)); | 230 kSpacing, kSpacing)); |
| 231 views::ImageView* icon_view = new views::ImageView(); | 231 views::ImageView* icon_view = new views::ImageView(); |
| 232 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 232 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 233 icon_view->SetImage(rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_26)); | 233 icon_view->SetImage(rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_26)); |
| 234 AddChildView(icon_view); | 234 AddChildView(icon_view); |
| 235 | 235 |
| 236 views::Label* label = | 236 views::Label* label = |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 cookie_dialog_link_(NULL), | 284 cookie_dialog_link_(NULL), |
| 285 permissions_content_(NULL), | 285 permissions_content_(NULL), |
| 286 connection_tab_(NULL), | 286 connection_tab_(NULL), |
| 287 identity_info_content_(NULL), | 287 identity_info_content_(NULL), |
| 288 certificate_dialog_link_(NULL), | 288 certificate_dialog_link_(NULL), |
| 289 cert_id_(0), | 289 cert_id_(0), |
| 290 help_center_link_(NULL), | 290 help_center_link_(NULL), |
| 291 connection_info_content_(NULL), | 291 connection_info_content_(NULL), |
| 292 page_info_content_(NULL) { | 292 page_info_content_(NULL) { |
| 293 // Compensate for built-in vertical padding in the anchor view's image. | 293 // Compensate for built-in vertical padding in the anchor view's image. |
| 294 set_anchor_insets(gfx::Insets(kLocationIconVerticalMargin, 0, | 294 set_anchor_view_insets(gfx::Insets(kLocationIconVerticalMargin, 0, |
| 295 kLocationIconVerticalMargin, 0)); | 295 kLocationIconVerticalMargin, 0)); |
| 296 | 296 |
| 297 views::GridLayout* layout = new views::GridLayout(this); | 297 views::GridLayout* layout = new views::GridLayout(this); |
| 298 SetLayoutManager(layout); | 298 SetLayoutManager(layout); |
| 299 const int content_column = 0; | 299 const int content_column = 0; |
| 300 views::ColumnSet* column_set = layout->AddColumnSet(content_column); | 300 views::ColumnSet* column_set = layout->AddColumnSet(content_column); |
| 301 column_set->AddColumn(views::GridLayout::FILL, | 301 column_set->AddColumn(views::GridLayout::FILL, |
| 302 views::GridLayout::FILL, | 302 views::GridLayout::FILL, |
| 303 1, | 303 1, |
| 304 views::GridLayout::USE_PREF, | 304 views::GridLayout::USE_PREF, |
| 305 0, | 305 0, |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 | 742 |
| 743 if (link) { | 743 if (link) { |
| 744 content_layout->StartRow(1, 0); | 744 content_layout->StartRow(1, 0); |
| 745 content_layout->AddView(link); | 745 content_layout->AddView(link); |
| 746 } | 746 } |
| 747 | 747 |
| 748 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, | 748 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, |
| 749 views::GridLayout::LEADING); | 749 views::GridLayout::LEADING); |
| 750 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); | 750 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); |
| 751 } | 751 } |
| OLD | NEW |