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

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

Issue 2741303002: Run `git cl format` on all desktop page_info code. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/website_settings_popup_view.h" 5 #include "chrome/browser/ui/views/page_info/website_settings_popup_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text)); 317 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text));
318 label->SetMultiLine(true); 318 label->SetMultiLine(true);
319 label->SetAllowCharacterBreak(true); 319 label->SetAllowCharacterBreak(true);
320 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 320 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
321 AddChildView(label); 321 AddChildView(label);
322 322
323 views::BubbleDialogDelegateView::CreateBubble(this); 323 views::BubbleDialogDelegateView::CreateBubble(this);
324 } 324 }
325 325
326 InternalPageInfoPopupView::~InternalPageInfoPopupView() { 326 InternalPageInfoPopupView::~InternalPageInfoPopupView() {}
327 }
328 327
329 void InternalPageInfoPopupView::OnWidgetDestroying(views::Widget* widget) { 328 void InternalPageInfoPopupView::OnWidgetDestroying(views::Widget* widget) {
330 g_shown_popup_type = WebsiteSettingsPopupView::POPUP_NONE; 329 g_shown_popup_type = WebsiteSettingsPopupView::POPUP_NONE;
331 } 330 }
332 331
333 int InternalPageInfoPopupView::GetDialogButtons() const { 332 int InternalPageInfoPopupView::GetDialogButtons() const {
334 return ui::DIALOG_BUTTON_NONE; 333 return ui::DIALOG_BUTTON_NONE;
335 } 334 }
336 335
337 //////////////////////////////////////////////////////////////////////////////// 336 ////////////////////////////////////////////////////////////////////////////////
338 // WebsiteSettingsPopupView 337 // WebsiteSettingsPopupView
339 //////////////////////////////////////////////////////////////////////////////// 338 ////////////////////////////////////////////////////////////////////////////////
340 339
341 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() { 340 WebsiteSettingsPopupView::~WebsiteSettingsPopupView() {}
342 }
343 341
344 // static 342 // static
345 void WebsiteSettingsPopupView::ShowPopup( 343 void WebsiteSettingsPopupView::ShowPopup(
346 views::View* anchor_view, 344 views::View* anchor_view,
347 const gfx::Rect& anchor_rect, 345 const gfx::Rect& anchor_rect,
348 Profile* profile, 346 Profile* profile,
349 content::WebContents* web_contents, 347 content::WebContents* web_contents,
350 const GURL& url, 348 const GURL& url,
351 const security_state::SecurityInfo& security_info) { 349 const security_state::SecurityInfo& security_info) {
352 gfx::NativeView parent_window = 350 gfx::NativeView parent_window =
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // below the dialog title. 408 // below the dialog title.
411 set_margins(gfx::Insets(0, 0, margins().bottom(), 0)); 409 set_margins(gfx::Insets(0, 0, margins().bottom(), 0));
412 410
413 views::GridLayout* layout = new views::GridLayout(this); 411 views::GridLayout* layout = new views::GridLayout(this);
414 SetLayoutManager(layout); 412 SetLayoutManager(layout);
415 413
416 // Use a single ColumnSet here. Otherwise the preferred width doesn't properly 414 // Use a single ColumnSet here. Otherwise the preferred width doesn't properly
417 // propagate up to the dialog width. 415 // propagate up to the dialog width.
418 const int content_column = 0; 416 const int content_column = 0;
419 views::ColumnSet* column_set = layout->AddColumnSet(content_column); 417 views::ColumnSet* column_set = layout->AddColumnSet(content_column);
420 column_set->AddColumn(views::GridLayout::FILL, 418 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
421 views::GridLayout::FILL, 419 views::GridLayout::USE_PREF, 0, 0);
422 1,
423 views::GridLayout::USE_PREF,
424 0,
425 0);
426 420
427 header_ = new PopupHeaderView(this, this, side_margin); 421 header_ = new PopupHeaderView(this, this, side_margin);
428 layout->StartRow(1, content_column); 422 layout->StartRow(1, content_column);
429 layout->AddView(header_); 423 layout->AddView(header_);
430 424
431 layout->StartRow(0, content_column); 425 layout->StartRow(0, content_column);
432 separator_ = new views::Separator(); 426 separator_ = new views::Separator();
433 layout->AddView(separator_); 427 layout->AddView(separator_);
434 428
435 layout->AddPaddingRow(1, kHeaderMarginBottom); 429 layout->AddPaddingRow(1, kHeaderMarginBottom);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 return; 612 return;
619 613
620 permissions_view_ = new views::View(); 614 permissions_view_ = new views::View();
621 views::GridLayout* layout = new views::GridLayout(permissions_view_); 615 views::GridLayout* layout = new views::GridLayout(permissions_view_);
622 permissions_view_->SetLayoutManager(layout); 616 permissions_view_->SetLayoutManager(layout);
623 617
624 site_settings_view_->AddChildView(permissions_view_); 618 site_settings_view_->AddChildView(permissions_view_);
625 619
626 const int content_column = 0; 620 const int content_column = 0;
627 views::ColumnSet* column_set = layout->AddColumnSet(content_column); 621 views::ColumnSet* column_set = layout->AddColumnSet(content_column);
628 column_set->AddColumn(views::GridLayout::FILL, 622 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
629 views::GridLayout::FILL, 623 views::GridLayout::USE_PREF, 0, 0);
630 1,
631 views::GridLayout::USE_PREF,
632 0,
633 0);
634 const int permissions_column = 1; 624 const int permissions_column = 1;
635 views::ColumnSet* permissions_set = layout->AddColumnSet(permissions_column); 625 views::ColumnSet* permissions_set = layout->AddColumnSet(permissions_column);
636 permissions_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 626 permissions_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
637 0, views::GridLayout::FIXED, 627 0, views::GridLayout::FIXED,
638 kPermissionIconColumnWidth, 0); 628 kPermissionIconColumnWidth, 0);
639 permissions_set->AddPaddingColumn(0, kPermissionIconMarginLeft); 629 permissions_set->AddPaddingColumn(0, kPermissionIconMarginLeft);
640 permissions_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 630 permissions_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
641 0, views::GridLayout::USE_PREF, 0, 0); 631 0, views::GridLayout::USE_PREF, 0, 0);
642 permissions_set->AddPaddingColumn(1, kPermissionMenuSpacing); 632 permissions_set->AddPaddingColumn(1, kPermissionMenuSpacing);
643 permissions_set->AddColumn(views::GridLayout::TRAILING, 633 permissions_set->AddColumn(views::GridLayout::TRAILING,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); 750 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
761 break; 751 break;
762 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 752 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
763 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 753 presenter_->OnRevokeSSLErrorBypassButtonPressed();
764 GetWidget()->Close(); 754 GetWidget()->Close();
765 break; 755 break;
766 default: 756 default:
767 NOTREACHED(); 757 NOTREACHED();
768 } 758 }
769 } 759 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698