OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/message_center/message_center_bubble.h" | 5 #include "ui/message_center/message_center_bubble.h" |
6 | 6 |
7 #include "grit/ui_strings.h" | 7 #include "grit/ui_strings.h" |
8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.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" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 layout->AddView(notification_label_); | 210 layout->AddView(notification_label_); |
211 layout->AddView(settings_button_); | 211 layout->AddView(settings_button_); |
212 layout->AddView(close_all_button); | 212 layout->AddView(close_all_button); |
213 set_close_all_button(close_all_button); | 213 set_close_all_button(close_all_button); |
214 } | 214 } |
215 | 215 |
216 private: | 216 private: |
217 // views::ButtonListener overrides: | 217 // views::ButtonListener overrides: |
218 virtual void ButtonPressed(views::Button* sender, | 218 virtual void ButtonPressed(views::Button* sender, |
219 const ui::Event& event) OVERRIDE { | 219 const ui::Event& event) OVERRIDE { |
220 // TODO(mukai): Replace ShowNotificationSettings with | |
221 // ShowNotificationSettingsDialog(GetWidget()->GetNativeView()) | |
222 if (sender == close_all_button()) | 220 if (sender == close_all_button()) |
223 list_delegate()->SendRemoveAllNotifications(); | 221 list_delegate()->SendRemoveAllNotifications(); |
224 else if (sender == settings_button_) | 222 else if (sender == settings_button_) |
225 list_delegate()->ShowNotificationSettings(""); | 223 list_delegate()->ShowNotificationSettingsDialog( |
| 224 GetWidget()->GetNativeView()); |
226 else | 225 else |
227 NOTREACHED(); | 226 NOTREACHED(); |
228 } | 227 } |
229 | 228 |
230 views::Label* notification_label_; | 229 views::Label* notification_label_; |
231 views::Button* settings_button_; | 230 views::Button* settings_button_; |
232 | 231 |
233 DISALLOW_COPY_AND_ASSIGN(WebNotificationButtonView2); | 232 DISALLOW_COPY_AND_ASSIGN(WebNotificationButtonView2); |
234 }; | 233 }; |
235 | 234 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 } | 515 } |
517 | 516 |
518 void MessageCenterBubble::OnMouseExitedView() { | 517 void MessageCenterBubble::OnMouseExitedView() { |
519 } | 518 } |
520 | 519 |
521 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 520 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
522 return contents_view_->NumMessageViews(); | 521 return contents_view_->NumMessageViews(); |
523 } | 522 } |
524 | 523 |
525 } // namespace message_center | 524 } // namespace message_center |
OLD | NEW |