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

Side by Side Diff: chrome/browser/ui/views/website_settings/chosen_object_row.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 9 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/image_button.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 12
13 namespace views { 13 namespace views {
14 class ImageButton;
15 class ImageView; 14 class ImageView;
16 } 15 }
17 16
18 class ChosenObjectRowObserver; 17 class ChosenObjectRowObserver;
19 18
20 // A ChosenObjectRow is a row in the Page Info bubble that shows an individual 19 // A ChosenObjectRow is a row in the Page Info bubble that shows an individual
21 // object (e.g. a Bluetooth device, a USB device) that the current site has 20 // object (e.g. a Bluetooth device, a USB device) that the current site has
22 // access to. 21 // access to.
23 class ChosenObjectRow : public views::View, public views::ButtonListener { 22 class ChosenObjectRow : public views::View, public views::ImageButtonDelegate {
24 public: 23 public:
25 explicit ChosenObjectRow( 24 explicit ChosenObjectRow(
26 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info); 25 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info);
27 26
28 void AddObserver(ChosenObjectRowObserver* observer); 27 void AddObserver(ChosenObjectRowObserver* observer);
29 28
30 private: 29 private:
31 ~ChosenObjectRow() override; 30 ~ChosenObjectRow() override;
32 31
33 // views::ButtonListener implementation. 32 // views::ImageButtonDelegate:
34 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 33 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
35 34
36 views::ImageView* icon_; // Owned by the views hierarchy. 35 views::ImageView* icon_; // Owned by the views hierarchy.
37 views::ImageButton* delete_button_; // Owned by the views hierarchy. 36 views::ImageButton* delete_button_; // Owned by the views hierarchy.
38 37
39 base::ObserverList<ChosenObjectRowObserver> observer_list_; 38 base::ObserverList<ChosenObjectRowObserver> observer_list_;
40 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info_; 39 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info_;
41 40
42 DISALLOW_COPY_AND_ASSIGN(ChosenObjectRow); 41 DISALLOW_COPY_AND_ASSIGN(ChosenObjectRow);
43 }; 42 };
44 43
45 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_ 44 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOSEN_OBJECT_ROW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698