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

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

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: Rebase (conflict in layout_delegate.h due to r457774) 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>
11 11
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "chrome/browser/certificate_viewer.h" 18 #include "chrome/browser/certificate_viewer.h"
19 #include "chrome/browser/infobars/infobar_service.h" 19 #include "chrome/browser/infobars/infobar_service.h"
20 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/browser.h" 21 #include "chrome/browser/ui/browser.h"
22 #include "chrome/browser/ui/browser_dialogs.h" 22 #include "chrome/browser/ui/browser_dialogs.h"
23 #include "chrome/browser/ui/layout_constants.h" 23 #include "chrome/browser/ui/layout_constants.h"
24 #include "chrome/browser/ui/page_info/website_settings.h" 24 #include "chrome/browser/ui/page_info/website_settings.h"
25 #include "chrome/browser/ui/views/collected_cookies_views.h" 25 #include "chrome/browser/ui/views/collected_cookies_views.h"
26 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
26 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 27 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
27 #include "chrome/browser/ui/views/page_info/chosen_object_row.h" 28 #include "chrome/browser/ui/views/page_info/chosen_object_row.h"
28 #include "chrome/browser/ui/views/page_info/non_accessible_image_view.h" 29 #include "chrome/browser/ui/views/page_info/non_accessible_image_view.h"
29 #include "chrome/browser/ui/views/page_info/permission_selector_row.h" 30 #include "chrome/browser/ui/views/page_info/permission_selector_row.h"
30 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
31 #include "chrome/grit/chromium_strings.h" 32 #include "chrome/grit/chromium_strings.h"
32 #include "chrome/grit/generated_resources.h" 33 #include "chrome/grit/generated_resources.h"
33 #include "chrome/grit/theme_resources.h" 34 #include "chrome/grit/theme_resources.h"
34 #include "components/content_settings/core/common/content_settings_types.h" 35 #include "components/content_settings/core/common/content_settings_types.h"
35 #include "components/strings/grit/components_chromium_strings.h" 36 #include "components/strings/grit/components_chromium_strings.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 ->IsOffTheRecord(); 576 ->IsOffTheRecord();
576 views::ImageView* icon = new NonAccessibleImageView(); 577 views::ImageView* icon = new NonAccessibleImageView();
577 const gfx::Image& image = WebsiteSettingsUI::GetPermissionIcon(info); 578 const gfx::Image& image = WebsiteSettingsUI::GetPermissionIcon(info);
578 icon->SetImage(image.ToImageSkia()); 579 icon->SetImage(image.ToImageSkia());
579 layout->AddView( 580 layout->AddView(
580 icon, 1, 2, views::GridLayout::FILL, 581 icon, 1, 2, views::GridLayout::FILL,
581 // TODO: The vertical alignment may change to CENTER once Harmony is 582 // TODO: The vertical alignment may change to CENTER once Harmony is
582 // implemented. See https://crbug.com/512442#c48 583 // implemented. See https://crbug.com/512442#c48
583 views::GridLayout::LEADING); 584 views::GridLayout::LEADING);
584 585
585 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
586 const gfx::FontList& font_list = rb.GetFontListWithDelta(1);
587 views::Label* cookies_label = new views::Label( 586 views::Label* cookies_label = new views::Label(
588 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA), 587 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA),
589 font_list); 588 CONTEXT_BODY_TEXT_LARGE);
590 layout->AddView(cookies_label); 589 layout->AddView(cookies_label);
591 layout->StartRow(1, cookies_view_column); 590 layout->StartRow(1, cookies_view_column);
592 layout->SkipColumns(1); 591 layout->SkipColumns(1);
593 592
594 layout->AddView(cookie_dialog_link_); 593 layout->AddView(cookie_dialog_link_);
595 594
596 layout->AddPaddingRow(0, kCookiesViewVerticalPadding); 595 layout->AddPaddingRow(0, kCookiesViewVerticalPadding);
597 } 596 }
598 597
599 layout->Layout(cookies_view_); 598 layout->Layout(cookies_view_);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); 749 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
751 break; 750 break;
752 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 751 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
753 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 752 presenter_->OnRevokeSSLErrorBypassButtonPressed();
754 GetWidget()->Close(); 753 GetWidget()->Close();
755 break; 754 break;
756 default: 755 default:
757 NOTREACHED(); 756 NOTREACHED();
758 } 757 }
759 } 758 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698