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

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

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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 | Annotate | Revision Log
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 const Notifier& NotifierSettingsView::NotifierButton::notifier() const { 378 const Notifier& NotifierSettingsView::NotifierButton::notifier() const {
379 return *notifier_.get(); 379 return *notifier_.get();
380 } 380 }
381 381
382 void NotifierSettingsView::NotifierButton::SendLearnMorePressedForTest() { 382 void NotifierSettingsView::NotifierButton::SendLearnMorePressedForTest() {
383 if (learn_more_ == NULL) 383 if (learn_more_ == NULL)
384 return; 384 return;
385 gfx::Point point(110, 120); 385 gfx::Point point(110, 120);
386 ui::MouseEvent pressed( 386 ui::MouseEvent pressed(
387 ui::ET_MOUSE_PRESSED, point, point, ui::EF_LEFT_MOUSE_BUTTON); 387 ui::ET_MOUSE_PRESSED, point, point, ui::EF_LEFT_MOUSE_BUTTON,
388 ui::EF_LEFT_MOUSE_BUTTON);
388 ButtonPressed(learn_more_, pressed); 389 ButtonPressed(learn_more_, pressed);
389 } 390 }
390 391
391 void NotifierSettingsView::NotifierButton::ButtonPressed( 392 void NotifierSettingsView::NotifierButton::ButtonPressed(
392 views::Button* button, 393 views::Button* button,
393 const ui::Event& event) { 394 const ui::Event& event) {
394 if (button == checkbox_) { 395 if (button == checkbox_) {
395 // The checkbox state has already changed at this point, but we'll update 396 // The checkbox state has already changed at this point, but we'll update
396 // the state on NotifierSettingsView::ButtonPressed() too, so here change 397 // the state on NotifierSettingsView::ButtonPressed() too, so here change
397 // back to the previous state. 398 // back to the previous state.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 menu_anchor, 720 menu_anchor,
720 views::MenuItemView::BUBBLE_ABOVE, 721 views::MenuItemView::BUBBLE_ABOVE,
721 ui::MENU_SOURCE_MOUSE, 722 ui::MENU_SOURCE_MOUSE,
722 views::MenuRunner::CONTEXT_MENU)) 723 views::MenuRunner::CONTEXT_MENU))
723 return; 724 return;
724 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); 725 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent());
725 center_view->OnSettingsChanged(); 726 center_view->OnSettingsChanged();
726 } 727 }
727 728
728 } // namespace message_center 729 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_popup_collection_unittest.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698