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

Unified Diff: chrome/browser/ui/views/website_settings/chosen_object_row.h

Issue 2306673003: Material Page Info (Views, 3/3): Update site settings section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pointers. Created 4 years, 3 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
Index: chrome/browser/ui/views/website_settings/chosen_object_row.h
diff --git a/chrome/browser/ui/views/website_settings/chosen_object_row.h b/chrome/browser/ui/views/website_settings/chosen_object_row.h
index d90f2c15f14560236bb30d48a8571441aa59ad62..3d3d9cc89023345e31c08a2102409585a2bb1f98 100644
--- a/chrome/browser/ui/views/website_settings/chosen_object_row.h
+++ b/chrome/browser/ui/views/website_settings/chosen_object_row.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "chrome/browser/ui/website_settings/website_settings_ui.h"
#include "ui/views/controls/button/button.h"
+#include "ui/views/layout/grid_layout.h"
#include "ui/views/view.h"
namespace views {
@@ -20,10 +21,14 @@ class ChosenObjectRowObserver;
// A ChosenObjectRow is a row in the Page Info bubble that shows an individual
// object (e.g. a Bluetooth device, a USB device) that the current site has
// access to.
-class ChosenObjectRow : public views::View, public views::ButtonListener {
+class ChosenObjectRow : public views::ButtonListener {
public:
+ // The constructor adds two views to the current row of |layout|:
+ // 1. An icon.
+ // 2. A label with a delete button.
explicit ChosenObjectRow(
msw 2016/09/26 20:47:55 nit: remove explicit
lgarron 2016/09/28 21:11:46 Done. At the risk of asking in the wrong place, w
msw 2016/09/30 00:37:04 The explicit keyword is a guard against implicit c
lgarron 2016/09/30 05:05:55 Ah, that makes sense, thanks.
- std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info);
+ std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info,
+ views::GridLayout* layout);
void AddObserver(ChosenObjectRowObserver* observer);
@@ -34,6 +39,7 @@ class ChosenObjectRow : public views::View, public views::ButtonListener {
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
views::ImageView* icon_; // Owned by the views hierarchy.
+ views::View* label_with_delete_; // Owned by the views hierarchy.
views::ImageButton* delete_button_; // Owned by the views hierarchy.
base::ObserverList<ChosenObjectRowObserver> observer_list_;

Powered by Google App Engine
This is Rietveld 408576698