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

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

Issue 1811203002: Remove unused ShelfModelObserver::ShelfStatusChanged() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make SetStatus a simple setter, set_status. Created 4 years, 9 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/shelf/shelf_view.h ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller.h » ('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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 void ShelfView::ShelfItemMoved(int start_index, int target_index) { 1579 void ShelfView::ShelfItemMoved(int start_index, int target_index) {
1580 view_model_->Move(start_index, target_index); 1580 view_model_->Move(start_index, target_index);
1581 // When cancelling a drag due to a shelf item being added, the currently 1581 // When cancelling a drag due to a shelf item being added, the currently
1582 // dragged item is moved back to its initial position. AnimateToIdealBounds 1582 // dragged item is moved back to its initial position. AnimateToIdealBounds
1583 // will be called again when the new item is added to the |view_model_| but 1583 // will be called again when the new item is added to the |view_model_| but
1584 // at this time the |view_model_| is inconsistent with the |model_|. 1584 // at this time the |view_model_| is inconsistent with the |model_|.
1585 if (!cancelling_drag_model_changed_) 1585 if (!cancelling_drag_model_changed_)
1586 AnimateToIdealBounds(); 1586 AnimateToIdealBounds();
1587 } 1587 }
1588 1588
1589 void ShelfView::ShelfStatusChanged() {
1590 // Nothing to do here.
1591 }
1592
1593 void ShelfView::PointerPressedOnButton(views::View* view, 1589 void ShelfView::PointerPressedOnButton(views::View* view,
1594 Pointer pointer, 1590 Pointer pointer,
1595 const ui::LocatedEvent& event) { 1591 const ui::LocatedEvent& event) {
1596 if (drag_view_) 1592 if (drag_view_)
1597 return; 1593 return;
1598 1594
1599 int index = view_model_->GetIndexOfView(view); 1595 int index = view_model_->GetIndexOfView(view);
1600 if (index == -1) 1596 if (index == -1)
1601 return; 1597 return;
1602 1598
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 1955
1960 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { 1956 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const {
1961 const gfx::Rect bounds = GetBoundsInScreen(); 1957 const gfx::Rect bounds = GetBoundsInScreen();
1962 int distance = shelf_->SelectValueForShelfAlignment( 1958 int distance = shelf_->SelectValueForShelfAlignment(
1963 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), 1959 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(),
1964 bounds.x() - coordinate.x(), coordinate.y() - bounds.bottom()); 1960 bounds.x() - coordinate.x(), coordinate.y() - bounds.bottom());
1965 return distance > 0 ? distance : 0; 1961 return distance > 0 ? distance : 0;
1966 } 1962 }
1967 1963
1968 } // namespace ash 1964 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.h ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698