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

Side by Side Diff: chrome/browser/chromeos/notifications/notification_panel.cc

Issue 7747044: [chromeos] Do not move notifications to KEEP_SIZE state when mouse moved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/notifications/notification_browsertest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Draws the view for the balloons. 5 // Draws the view for the balloons.
6 6
7 #include "chrome/browser/chromeos/notifications/notification_panel.h" 7 #include "chrome/browser/chromeos/notifications/notification_panel.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // PanelController public. 643 // PanelController public.
644 644
645 void NotificationPanel::OnMouseLeave() { 645 void NotificationPanel::OnMouseLeave() {
646 SetActiveView(NULL); 646 SetActiveView(NULL);
647 if (balloon_container_->GetNotificationCount() == 0) 647 if (balloon_container_->GetNotificationCount() == 0)
648 SET_STATE(CLOSED); 648 SET_STATE(CLOSED);
649 UpdatePanel(true); 649 UpdatePanel(true);
650 } 650 }
651 651
652 void NotificationPanel::OnMouseMotion(const gfx::Point& point) { 652 void NotificationPanel::OnMouseMotion(const gfx::Point& point) {
653 SetActiveView(balloon_container_->FindBalloonView(point)); 653 SetActiveView(balloon_container_->FindBalloonView(point));
oshima 2011/08/26 18:17:46 Can you add comment that this used to set the stat
dgozman 2011/08/29 07:03:17 Done.
654 SET_STATE(KEEP_SIZE);
655 // We need to set the focus to scroll view to get mouse wheel 654 // We need to set the focus to scroll view to get mouse wheel
656 // working. Setting focus when mouse moves on the panel 655 // working. Setting focus when mouse moves on the panel
657 // because focus may be taken by other view. 656 // because focus may be taken by other view.
658 scroll_view_->RequestFocus(); 657 scroll_view_->RequestFocus();
659 } 658 }
660 659
661 NotificationPanelTester* NotificationPanel::GetTester() { 660 NotificationPanelTester* NotificationPanel::GetTester() {
662 if (!tester_.get()) 661 if (!tester_.get())
663 tester_.reset(new NotificationPanelTester(this)); 662 tester_.reset(new NotificationPanelTester(this));
664 return tester_.get(); 663 return tester_.get();
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 &origin); 861 &origin);
863 return rect.Contains(gfx::Rect(origin, view->size())); 862 return rect.Contains(gfx::Rect(origin, view->size()));
864 } 863 }
865 864
866 865
867 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const { 866 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const {
868 return panel_->active_ == view; 867 return panel_->active_ == view;
869 } 868 }
870 869
871 } // namespace chromeos 870 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/notifications/notification_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698