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

Unified Diff: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc

Issue 1661063002: Add message and Help Center link to the chooser UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added chooser UI comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
diff --git a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
index 4a412c6a53ccd7af07c70572614ddc340035e1bc..f6c2b8d4323da700c4ca03fc9dca3a4040b09c24 100644
--- a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
+++ b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
@@ -30,6 +30,8 @@
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/label_button_border.h"
+#include "ui/views/controls/label.h"
+#include "ui/views/controls/separator.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/controls/table/table_view_observer.h"
#include "ui/views/layout/box_layout.h"
@@ -146,6 +148,21 @@ ChooserBubbleUiViewDelegate::ChooserBubbleUiViewDelegate(
owner_(owner),
chooser_bubble_delegate_(chooser_bubble_delegate),
button_pressed_(false) {
+ // ------------------------------------
+ // | Chooser bubble title |
+ // | -------------------------------- |
+ // | | option 0 | |
+ // | | option 1 | |
+ // | | option 2 | |
+ // | | | |
+ // | | | |
+ // | | | |
+ // | -------------------------------- |
+ // | [ Connect] [ Cancel ] |
+ // | -------------------------------- |
+ // | Privacy message |
+ // ------------------------------------
+
views::GridLayout* layout = new views::GridLayout(this);
SetLayoutManager(layout);
@@ -169,9 +186,8 @@ ChooserBubbleUiViewDelegate::ChooserBubbleUiViewDelegate(
views::GridLayout::FILL, views::GridLayout::FILL,
kChooserPermissionBubbleWidth,
kChooserPermissionBubbleHeight);
- if (chooser_bubble_delegate_->NumOptions() == 0) {
+ if (chooser_bubble_delegate_->NumOptions() == 0)
table_view_->SetEnabled(false);
- }
layout->AddPaddingRow(0, kItemMajorSpacing);
@@ -209,6 +225,25 @@ ChooserBubbleUiViewDelegate::ChooserBubbleUiViewDelegate(
button_layout->AddView(cancel_button_);
button_layout->AddPaddingRow(0, kBubbleOuterMargin);
+
+ layout->AddPaddingRow(0, kItemMajorSpacing);
+
+ // Lay out the separator.
+ layout->StartRow(1, 0);
+ views::Separator* separator =
+ new views::Separator(views::Separator::HORIZONTAL);
+ layout->AddView(separator);
+
+ layout->AddPaddingRow(0, kItemMajorSpacing);
+
+ // Lay out the privacy message label.
+ layout->StartRow(1, 0);
+ views::Label* label = new views::Label(
+ l10n_util::GetStringUTF16(IDS_CHOOSER_BUBBLE_PRIVACY_MESSAGE_TEXT));
+ label->SetMultiLine(true);
+ label->SizeToFit(kChooserPermissionBubbleWidth);
+ label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
+ layout->AddView(label);
}
ChooserBubbleUiViewDelegate::~ChooserBubbleUiViewDelegate() {
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698