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

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

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 #include "chrome/browser/ui/views/website_settings/chosen_object_row.h" 5 #include "chrome/browser/ui/views/website_settings/chosen_object_row.h"
6 6
7 #include "chrome/browser/ui/views/website_settings/chosen_object_row_observer.h" 7 #include "chrome/browser/ui/views/website_settings/chosen_object_row_observer.h"
8 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h " 8 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/resources/grit/ui_resources.h" 11 #include "ui/resources/grit/ui_resources.h"
12 #include "ui/views/controls/button/image_button.h"
13 #include "ui/views/controls/image_view.h" 12 #include "ui/views/controls/image_view.h"
14 #include "ui/views/controls/label.h" 13 #include "ui/views/controls/label.h"
15 #include "ui/views/layout/grid_layout.h" 14 #include "ui/views/layout/grid_layout.h"
16 15
17 ChosenObjectRow::ChosenObjectRow( 16 ChosenObjectRow::ChosenObjectRow(
18 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info) 17 std::unique_ptr<WebsiteSettingsUI::ChosenObjectInfo> info)
19 : info_(std::move(info)) { 18 : info_(std::move(info)) {
20 views::GridLayout* layout = new views::GridLayout(this); 19 views::GridLayout* layout = new views::GridLayout(this);
21 SetLayoutManager(layout); 20 SetLayoutManager(layout);
22 const int column_set_id = 0; 21 const int column_set_id = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 WebsiteSettingsUI::GetChosenObjectIcon(*info_, true); 73 WebsiteSettingsUI::GetChosenObjectIcon(*info_, true);
75 icon_->SetImage(image.ToImageSkia()); 74 icon_->SetImage(image.ToImageSkia());
76 75
77 RemoveChildView(delete_button_); 76 RemoveChildView(delete_button_);
78 delete delete_button_; 77 delete delete_button_;
79 delete_button_ = nullptr; 78 delete_button_ = nullptr;
80 79
81 for (ChosenObjectRowObserver& observer : observer_list_) 80 for (ChosenObjectRowObserver& observer : observer_list_)
82 observer.OnChosenObjectDeleted(*info_); 81 observer.OnChosenObjectDeleted(*info_);
83 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698