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

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

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 3 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
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/common/shelf/shelf_view.h" 5 #include "ash/common/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 launcher_menu_runner_->RunMenuAt(source->GetWidget(), nullptr, anchor, 1848 launcher_menu_runner_->RunMenuAt(source->GetWidget(), nullptr, anchor,
1849 menu_alignment, source_type); 1849 menu_alignment, source_type);
1850 } 1850 }
1851 1851
1852 void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) { 1852 void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) {
1853 context_menu_id_ = 0; 1853 context_menu_id_ = 0;
1854 shelf_widget_->ForceUndimming(false); 1854 shelf_widget_->ForceUndimming(false);
1855 1855
1856 // Hide the hide overflow bubble after showing a context menu for its items. 1856 // Hide the hide overflow bubble after showing a context menu for its items.
1857 if (owner_overflow_bubble_) 1857 if (owner_overflow_bubble_)
1858 owner_overflow_bubble_->HideBubbleAndRefreshButton(); 1858 owner_overflow_bubble_->Hide();
1859 1859
1860 closing_event_time_ = launcher_menu_runner_->closing_event_time(); 1860 closing_event_time_ = launcher_menu_runner_->closing_event_time();
1861 1861
1862 if (ink_drop) 1862 if (ink_drop)
1863 ink_drop->AnimateToState(views::InkDropState::DEACTIVATED); 1863 ink_drop->AnimateToState(views::InkDropState::DEACTIVATED);
1864 1864
1865 launcher_menu_runner_.reset(); 1865 launcher_menu_runner_.reset();
1866 menu_model_adapter_.reset(); 1866 menu_model_adapter_.reset();
1867 menu_model_.reset(); 1867 menu_model_.reset();
1868 scoped_root_window_for_new_windows_.reset(); 1868 scoped_root_window_for_new_windows_.reset();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 1913
1914 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { 1914 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const {
1915 const gfx::Rect bounds = GetBoundsInScreen(); 1915 const gfx::Rect bounds = GetBoundsInScreen();
1916 int distance = wm_shelf_->SelectValueForShelfAlignment( 1916 int distance = wm_shelf_->SelectValueForShelfAlignment(
1917 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), 1917 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(),
1918 bounds.x() - coordinate.x()); 1918 bounds.x() - coordinate.x());
1919 return distance > 0 ? distance : 0; 1919 return distance > 0 ? distance : 0;
1920 } 1920 }
1921 1921
1922 } // namespace ash 1922 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698