Commit ed8b3251 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Replace cookie blocking illustrations

Replace illustrations for third-party cookie blocking UI.
Remove margin to ensure illustrations span the full width of the dialog.

Bug: 967668
Change-Id: Ic2d6d3728e5f0f99f64c516b3f3eadbe974ca6ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850153
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705485}
parent 12a234ca
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_types.h" #include "ui/base/ui_base_types.h"
#include "ui/gfx/text_utils.h" #include "ui/gfx/text_utils.h"
#include "ui/views/background.h"
#include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/image_view.h" #include "ui/views/controls/image_view.h"
#include "ui/views/controls/link.h" #include "ui/views/controls/link.h"
#include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
namespace { namespace {
// Singleton instance of the cookie bubble. The cookie bubble can only be // Singleton instance of the cookie bubble. The cookie bubble can only be
...@@ -187,6 +187,12 @@ void CookieControlsBubbleView::Init() { ...@@ -187,6 +187,12 @@ void CookieControlsBubbleView::Init() {
text->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); text->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT);
text->SetMultiLine(true); text->SetMultiLine(true);
text_ = AddChildView(std::move(text)); text_ = AddChildView(std::move(text));
// TODO(crbug.com/1013092): The bubble should display a header view with full
// width without having to tweak margins.
gfx::Insets insets = margins();
set_margins(gfx::Insets(insets.top(), 0, insets.bottom(), 0));
SetBorder(views::CreateEmptyBorder(0, insets.left(), 0, insets.right()));
} }
std::unique_ptr<views::View> CookieControlsBubbleView::CreateExtraView() { std::unique_ptr<views::View> CookieControlsBubbleView::CreateExtraView() {
...@@ -200,6 +206,8 @@ std::unique_ptr<views::View> CookieControlsBubbleView::CreateExtraView() { ...@@ -200,6 +206,8 @@ std::unique_ptr<views::View> CookieControlsBubbleView::CreateExtraView() {
void CookieControlsBubbleView::AddedToWidget() { void CookieControlsBubbleView::AddedToWidget() {
auto header_view = std::make_unique<NonAccessibleImageView>(); auto header_view = std::make_unique<NonAccessibleImageView>();
header_view_ = header_view.get(); header_view_ = header_view.get();
header_view_->SetBackground(views::CreateThemedSolidBackground(
header_view_, ui::NativeTheme::kColorId_BubbleFooterBackground));
GetBubbleFrameView()->SetHeaderView(std::move(header_view)); GetBubbleFrameView()->SetHeaderView(std::move(header_view));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment