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

Side by Side Diff: ash/shelf/shelf_view.cc

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: followupfix-after-rebase 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 | « no previous file | ash/wm/overview/window_selector_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/shelf/shelf_view.h" 5 #include "ash/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 Shell::GetInstance()->UpdateShelfVisibility(); 1893 Shell::GetInstance()->UpdateShelfVisibility();
1894 } 1894 }
1895 1895
1896 void ShelfView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) { 1896 void ShelfView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) {
1897 FOR_EACH_OBSERVER(ShelfIconObserver, observers_, 1897 FOR_EACH_OBSERVER(ShelfIconObserver, observers_,
1898 OnShelfIconPositionsChanged()); 1898 OnShelfIconPositionsChanged());
1899 PreferredSizeChanged(); 1899 PreferredSizeChanged();
1900 } 1900 }
1901 1901
1902 void ShelfView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { 1902 void ShelfView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
1903 if (snap_back_from_rip_off_view_ && animator == bounds_animator_) { 1903 if (snap_back_from_rip_off_view_ && animator == bounds_animator_.get()) {
1904 if (!animator->IsAnimating(snap_back_from_rip_off_view_)) { 1904 if (!animator->IsAnimating(snap_back_from_rip_off_view_)) {
1905 // Coming here the animation of the ShelfButton is finished and the 1905 // Coming here the animation of the ShelfButton is finished and the
1906 // previously hidden status can be shown again. Since the button itself 1906 // previously hidden status can be shown again. Since the button itself
1907 // might have gone away or changed locations we check that the button 1907 // might have gone away or changed locations we check that the button
1908 // is still in the shelf and show its status again. 1908 // is still in the shelf and show its status again.
1909 for (int index = 0; index < view_model_->view_size(); index++) { 1909 for (int index = 0; index < view_model_->view_size(); index++) {
1910 views::View* view = view_model_->view_at(index); 1910 views::View* view = view_model_->view_at(index);
1911 if (view == snap_back_from_rip_off_view_) { 1911 if (view == snap_back_from_rip_off_view_) {
1912 CHECK_EQ(ShelfButton::kViewClassName, view->GetClassName()); 1912 CHECK_EQ(ShelfButton::kViewClassName, view->GetClassName());
1913 ShelfButton* button = static_cast<ShelfButton*>(view); 1913 ShelfButton* button = static_cast<ShelfButton*>(view);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 distance = bounds.x() - coordinate.x(); 1968 distance = bounds.x() - coordinate.x();
1969 break; 1969 break;
1970 case SHELF_ALIGNMENT_TOP: 1970 case SHELF_ALIGNMENT_TOP:
1971 distance = coordinate.y() - bounds.bottom(); 1971 distance = coordinate.y() - bounds.bottom();
1972 break; 1972 break;
1973 } 1973 }
1974 return distance > 0 ? distance : 0; 1974 return distance > 0 ? distance : 0;
1975 } 1975 }
1976 1976
1977 } // namespace ash 1977 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698