| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/views/notifier_settings_view.h" | 5 #include "ui/message_center/views/notifier_settings_view.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 return learn_more_ != NULL; | 364 return learn_more_ != NULL; |
| 365 } | 365 } |
| 366 | 366 |
| 367 const Notifier& NotifierSettingsView::NotifierButton::notifier() const { | 367 const Notifier& NotifierSettingsView::NotifierButton::notifier() const { |
| 368 return *notifier_.get(); | 368 return *notifier_.get(); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void NotifierSettingsView::NotifierButton::SendLearnMorePressedForTest() { | 371 void NotifierSettingsView::NotifierButton::SendLearnMorePressedForTest() { |
| 372 if (learn_more_ == NULL) | 372 if (learn_more_ == NULL) |
| 373 return; | 373 return; |
| 374 gfx::Point point(110, 120); | 374 gfx::PointF point(110.f, 120.f); |
| 375 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point, | 375 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point, |
| 376 ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, | 376 ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, |
| 377 ui::EF_LEFT_MOUSE_BUTTON); | 377 ui::EF_LEFT_MOUSE_BUTTON); |
| 378 ButtonPressed(learn_more_, pressed); | 378 ButtonPressed(learn_more_, pressed); |
| 379 } | 379 } |
| 380 | 380 |
| 381 void NotifierSettingsView::NotifierButton::ButtonPressed( | 381 void NotifierSettingsView::NotifierButton::ButtonPressed( |
| 382 views::Button* button, | 382 views::Button* button, |
| 383 const ui::Event& event) { | 383 const ui::Event& event) { |
| 384 if (button == checkbox_) { | 384 if (button == checkbox_) { |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 notifier_group_selector_, | 696 notifier_group_selector_, |
| 697 menu_anchor, | 697 menu_anchor, |
| 698 views::MENU_ANCHOR_BUBBLE_ABOVE, | 698 views::MENU_ANCHOR_BUBBLE_ABOVE, |
| 699 ui::MENU_SOURCE_MOUSE)) | 699 ui::MENU_SOURCE_MOUSE)) |
| 700 return; | 700 return; |
| 701 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 701 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
| 702 center_view->OnSettingsChanged(); | 702 center_view->OnSettingsChanged(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 } // namespace message_center | 705 } // namespace message_center |
| OLD | NEW |