| 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/page_info/page_info_bubble_view.h" | 5 #include "chrome/browser/ui/views/page_info/page_info_bubble_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 layout->StartRow(1, content_column); | 480 layout->StartRow(1, content_column); |
| 481 | 481 |
| 482 site_settings_view_ = CreateSiteSettingsView(side_margin); | 482 site_settings_view_ = CreateSiteSettingsView(side_margin); |
| 483 layout->AddView(site_settings_view_); | 483 layout->AddView(site_settings_view_); |
| 484 | 484 |
| 485 if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) { | 485 if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
| 486 // In non-material, titles are inset from the dialog margin. Ensure the | 486 // In non-material, titles are inset from the dialog margin. Ensure the |
| 487 // horizontal insets match. | 487 // horizontal insets match. |
| 488 set_title_margins( | 488 set_title_margins( |
| 489 gfx::Insets(ChromeLayoutProvider::Get()->GetDistanceMetric( | 489 gfx::Insets(ChromeLayoutProvider::Get()->GetDistanceMetric( |
| 490 DISTANCE_PANEL_CONTENT_MARGIN), | 490 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN), |
| 491 side_margin, 0, side_margin)); | 491 side_margin, 0, side_margin)); |
| 492 } | 492 } |
| 493 views::BubbleDialogDelegateView::CreateBubble(this); | 493 views::BubbleDialogDelegateView::CreateBubble(this); |
| 494 | 494 |
| 495 presenter_.reset(new PageInfo( | 495 presenter_.reset(new PageInfo( |
| 496 this, profile, TabSpecificContentSettings::FromWebContents(web_contents), | 496 this, profile, TabSpecificContentSettings::FromWebContents(web_contents), |
| 497 web_contents, url, security_info)); | 497 web_contents, url, security_info)); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void PageInfoBubbleView::RenderFrameDeleted( | 500 void PageInfoBubbleView::RenderFrameDeleted( |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED); | 792 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED); |
| 793 break; | 793 break; |
| 794 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: | 794 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: |
| 795 presenter_->OnRevokeSSLErrorBypassButtonPressed(); | 795 presenter_->OnRevokeSSLErrorBypassButtonPressed(); |
| 796 GetWidget()->Close(); | 796 GetWidget()->Close(); |
| 797 break; | 797 break; |
| 798 default: | 798 default: |
| 799 NOTREACHED(); | 799 NOTREACHED(); |
| 800 } | 800 } |
| 801 } | 801 } |
| OLD | NEW |