Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome/browser/ui/views/page_info/page_info_bubble_view.cc

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: edits 2 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 layout->StartRow(1, content_column); 473 layout->StartRow(1, content_column);
474 474
475 site_settings_view_ = CreateSiteSettingsView(side_margin); 475 site_settings_view_ = CreateSiteSettingsView(side_margin);
476 layout->AddView(site_settings_view_); 476 layout->AddView(site_settings_view_);
477 477
478 if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) { 478 if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) {
479 // In non-material, titles are inset from the dialog margin. Ensure the 479 // In non-material, titles are inset from the dialog margin. Ensure the
480 // horizontal insets match. 480 // horizontal insets match.
481 set_title_margins( 481 set_title_margins(
482 gfx::Insets(ChromeLayoutProvider::Get()->GetDistanceMetric( 482 gfx::Insets(ChromeLayoutProvider::Get()->GetDistanceMetric(
483 DISTANCE_PANEL_CONTENT_MARGIN), 483 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
484 side_margin, 0, side_margin)); 484 side_margin, 0, side_margin));
485 } 485 }
486 views::BubbleDialogDelegateView::CreateBubble(this); 486 views::BubbleDialogDelegateView::CreateBubble(this);
487 487
488 presenter_.reset(new PageInfo( 488 presenter_.reset(new PageInfo(
489 this, profile, TabSpecificContentSettings::FromWebContents(web_contents), 489 this, profile, TabSpecificContentSettings::FromWebContents(web_contents),
490 web_contents, url, security_info)); 490 web_contents, url, security_info));
491 } 491 }
492 492
493 void PageInfoBubbleView::RenderFrameDeleted( 493 void PageInfoBubbleView::RenderFrameDeleted(
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED); 785 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED);
786 break; 786 break;
787 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 787 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
788 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 788 presenter_->OnRevokeSSLErrorBypassButtonPressed();
789 GetWidget()->Close(); 789 GetWidget()->Close();
790 break; 790 break;
791 default: 791 default:
792 NOTREACHED(); 792 NOTREACHED();
793 } 793 }
794 } 794 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698