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

Side by Side Diff: ui/message_center/views/notifier_settings_view.cc

Issue 1421713002: Explicitly convert Point to PointF for event code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip
Patch Set: pointfconvert-prod: . Created 5 years, 1 month 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
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/views/accessibility/ax_view_obj_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const gfx::PointF kPoint(110.f, 120.f);
375 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point, 375 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, kPoint, kPoint,
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_) {
385 // The checkbox state has already changed at this point, but we'll update 385 // The checkbox state has already changed at this point, but we'll update
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/views/accessibility/ax_view_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698