| OLD | NEW |
| 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 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 launcher_menu_runner_->RunMenuAt(source->GetWidget(), nullptr, anchor, | 1843 launcher_menu_runner_->RunMenuAt(source->GetWidget(), nullptr, anchor, |
| 1844 menu_alignment, source_type); | 1844 menu_alignment, source_type); |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) { | 1847 void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) { |
| 1848 context_menu_id_ = 0; | 1848 context_menu_id_ = 0; |
| 1849 shelf_->shelf_widget()->ForceUndimming(false); | 1849 shelf_->shelf_widget()->ForceUndimming(false); |
| 1850 | 1850 |
| 1851 // Hide the hide overflow bubble after showing a context menu for its items. | 1851 // Hide the hide overflow bubble after showing a context menu for its items. |
| 1852 if (owner_overflow_bubble_) | 1852 if (owner_overflow_bubble_) |
| 1853 owner_overflow_bubble_->HideBubbleAndRefreshButton(); | 1853 owner_overflow_bubble_->Hide(); |
| 1854 | 1854 |
| 1855 closing_event_time_ = launcher_menu_runner_->closing_event_time(); | 1855 closing_event_time_ = launcher_menu_runner_->closing_event_time(); |
| 1856 | 1856 |
| 1857 if (ink_drop) | 1857 if (ink_drop) |
| 1858 ink_drop->AnimateToState(views::InkDropState::DEACTIVATED); | 1858 ink_drop->AnimateToState(views::InkDropState::DEACTIVATED); |
| 1859 | 1859 |
| 1860 launcher_menu_runner_.reset(); | 1860 launcher_menu_runner_.reset(); |
| 1861 menu_model_adapter_.reset(); | 1861 menu_model_adapter_.reset(); |
| 1862 menu_model_.reset(); | 1862 menu_model_.reset(); |
| 1863 scoped_target_root_window_.reset(); | 1863 scoped_target_root_window_.reset(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 | 1908 |
| 1909 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { | 1909 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { |
| 1910 const gfx::Rect bounds = GetBoundsInScreen(); | 1910 const gfx::Rect bounds = GetBoundsInScreen(); |
| 1911 int distance = shelf_->SelectValueForShelfAlignment( | 1911 int distance = shelf_->SelectValueForShelfAlignment( |
| 1912 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), | 1912 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), |
| 1913 bounds.x() - coordinate.x()); | 1913 bounds.x() - coordinate.x()); |
| 1914 return distance > 0 ? distance : 0; | 1914 return distance > 0 ? distance : 0; |
| 1915 } | 1915 } |
| 1916 | 1916 |
| 1917 } // namespace ash | 1917 } // namespace ash |
| OLD | NEW |