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

Side by Side Diff: ash/launcher/launcher_view.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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
« no previous file with comments | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/launcher/launcher_view_unittest.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) 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 "ash/launcher/launcher_view.h" 5 #include "ash/launcher/launcher_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/app_list_button.h" 9 #include "ash/launcher/app_list_button.h"
10 #include "ash/launcher/launcher_button.h" 10 #include "ash/launcher/launcher_button.h"
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 views::View* child = child_at(i); 698 views::View* child = child_at(i);
699 if (child == overflow_button_) 699 if (child == overflow_button_)
700 continue; 700 continue;
701 701
702 // The tooltip shouldn't show over the app-list window. 702 // The tooltip shouldn't show over the app-list window.
703 if (child == GetAppListButtonView() && 703 if (child == GetAppListButtonView() &&
704 Shell::GetInstance()->GetAppListWindow()) 704 Shell::GetInstance()->GetAppListWindow())
705 continue; 705 continue;
706 706
707 gfx::Rect child_bounds = child->GetMirroredBounds(); 707 gfx::Rect child_bounds = child->GetMirroredBounds();
708 active_bounds = active_bounds.Union(child_bounds); 708 active_bounds.Union(child_bounds);
709 } 709 }
710 710
711 return !active_bounds.Contains(cursor_location); 711 return !active_bounds.Contains(cursor_location);
712 } 712 }
713 713
714 int LauncherView::CancelDrag(int modified_index) { 714 int LauncherView::CancelDrag(int modified_index) {
715 if (!drag_view_) 715 if (!drag_view_)
716 return modified_index; 716 return modified_index;
717 bool was_dragging = dragging(); 717 bool was_dragging = dragging();
718 int drag_view_index = view_model_->GetIndexOfView(drag_view_); 718 int drag_view_index = view_model_->GetIndexOfView(drag_view_);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, 1073 FOR_EACH_OBSERVER(LauncherIconObserver, observers_,
1074 OnLauncherIconPositionsChanged()); 1074 OnLauncherIconPositionsChanged());
1075 PreferredSizeChanged(); 1075 PreferredSizeChanged();
1076 } 1076 }
1077 1077
1078 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { 1078 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
1079 } 1079 }
1080 1080
1081 } // namespace internal 1081 } // namespace internal
1082 } // namespace ash 1082 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698