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

Unified Diff: ui/message_center/notifier_settings.cc

Issue 12052057: Introduces 'context' param to NotifierSettingsView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: ui/message_center/notifier_settings.cc
diff --git a/ui/message_center/notifier_settings.cc b/ui/message_center/notifier_settings.cc
index 9dc89c263eb7b91f24ee3e2d434fd31ad012ea80..70926d443104cc0fe6f07a97b40811b611fc4836 100644
--- a/ui/message_center/notifier_settings.cc
+++ b/ui/message_center/notifier_settings.cc
@@ -50,7 +50,7 @@ class NotifierSettingsView::NotifierButton : public views::CustomButton,
AddChildView(new views::Label(notifier.name));
}
- void UpdateIconImage(gfx::ImageSkia icon) {
+ void UpdateIconImage(const gfx::ImageSkia& icon) {
notifier_.icon = icon;
if (icon.isNull()) {
delete icon_view_;
@@ -80,6 +80,7 @@ class NotifierSettingsView::NotifierButton : public views::CustomButton,
}
private:
+ // views::ButtonListener overrides:
void ButtonPressed(views::Button* button, const ui::Event& event) {
DCHECK(button == checkbox_);
// The checkbox state has already changed at this point, but we'll update
@@ -107,11 +108,13 @@ NotifierSettingsView::Notifier::Notifier(
}
// static
-NotifierSettingsView* NotifierSettingsView::Create(Delegate* delegate) {
+NotifierSettingsView* NotifierSettingsView::Create(Delegate* delegate,
+ gfx::NativeView context) {
NotifierSettingsView* view = new NotifierSettingsView(delegate);
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.delegate = view;
+ params.context = context;
widget->Init(params);
widget->Show();

Powered by Google App Engine
This is Rietveld 408576698