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

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

Issue 2074213002: mash: Move ash_switches.* to ash/common; cleanup DEPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix broken relative include. Created 4 years, 6 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_navigator_unittest.cc ('k') | ash/shelf/shelf_widget.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 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_switches.h"
11 #include "ash/aura/wm_window_aura.h" 10 #include "ash/aura/wm_window_aura.h"
12 #include "ash/common/ash_constants.h" 11 #include "ash/common/ash_constants.h"
12 #include "ash/common/ash_switches.h"
13 #include "ash/common/shelf/shelf_constants.h" 13 #include "ash/common/shelf/shelf_constants.h"
14 #include "ash/common/shelf/shelf_item_delegate_manager.h" 14 #include "ash/common/shelf/shelf_item_delegate_manager.h"
15 #include "ash/common/shelf/shelf_menu_model.h" 15 #include "ash/common/shelf/shelf_menu_model.h"
16 #include "ash/common/shelf/shelf_model.h" 16 #include "ash/common/shelf/shelf_model.h"
17 #include "ash/common/wm/root_window_finder.h" 17 #include "ash/common/wm/root_window_finder.h"
18 #include "ash/drag_drop/drag_image_view.h" 18 #include "ash/drag_drop/drag_image_view.h"
19 #include "ash/metrics/user_metrics_recorder.h" 19 #include "ash/metrics/user_metrics_recorder.h"
20 #include "ash/scoped_target_root_window.h" 20 #include "ash/scoped_target_root_window.h"
21 #include "ash/shelf/app_list_button.h" 21 #include "ash/shelf/app_list_button.h"
22 #include "ash/shelf/overflow_bubble.h" 22 #include "ash/shelf/overflow_bubble.h"
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 1919
1920 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { 1920 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const {
1921 const gfx::Rect bounds = GetBoundsInScreen(); 1921 const gfx::Rect bounds = GetBoundsInScreen();
1922 int distance = shelf_->SelectValueForShelfAlignment( 1922 int distance = shelf_->SelectValueForShelfAlignment(
1923 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), 1923 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(),
1924 bounds.x() - coordinate.x()); 1924 bounds.x() - coordinate.x());
1925 return distance > 0 ? distance : 0; 1925 return distance > 0 ? distance : 0;
1926 } 1926 }
1927 1927
1928 } // namespace ash 1928 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_navigator_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698