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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1164213002: Changes reference to pixels to DIPs in comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/wm/default_state.cc ('k') | no next file » | 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 "chrome/browser/ui/views/tabs/tab_drag_controller.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Delay, in ms, during dragging before we bring a window to front. 64 // Delay, in ms, during dragging before we bring a window to front.
65 const int kBringToFrontDelay = 750; 65 const int kBringToFrontDelay = 750;
66 66
67 // Initial delay before moving tabs when the dragged tab is close to the edge of 67 // Initial delay before moving tabs when the dragged tab is close to the edge of
68 // the stacked tabs. 68 // the stacked tabs.
69 const int kMoveAttachedInitialDelay = 600; 69 const int kMoveAttachedInitialDelay = 600;
70 70
71 // Delay for moving tabs after the initial delay has passed. 71 // Delay for moving tabs after the initial delay has passed.
72 const int kMoveAttachedSubsequentDelay = 300; 72 const int kMoveAttachedSubsequentDelay = 300;
73 73
74 const int kHorizontalMoveThreshold = 16; // Pixels. 74 const int kHorizontalMoveThreshold = 16; // DIPs.
75 75
76 // Distance from the next/previous stacked before before we consider the tab 76 // Distance from the next/previous stacked before before we consider the tab
77 // close enough to trigger moving. 77 // close enough to trigger moving.
78 const int kStackedDistance = 36; 78 const int kStackedDistance = 36;
79 79
80 // A dragged window is forced to be a bit smaller than maximized bounds during a 80 // A dragged window is forced to be a bit smaller than maximized bounds during a
81 // drag. This prevents the dragged browser widget from getting maximized at 81 // drag. This prevents the dragged browser widget from getting maximized at
82 // creation and makes it easier to drag tabs out of a restored window that had 82 // creation and makes it easier to drag tabs out of a restored window that had
83 // maximized size. 83 // maximized size.
84 const int kMaximizedWindowInset = 10; // Pixels. 84 const int kMaximizedWindowInset = 10; // DIPs.
85 85
86 #if defined(USE_ASH) 86 #if defined(USE_ASH)
87 void SetWindowPositionManaged(gfx::NativeWindow window, bool value) { 87 void SetWindowPositionManaged(gfx::NativeWindow window, bool value) {
88 ash::wm::GetWindowState(window)->set_window_position_managed(value); 88 ash::wm::GetWindowState(window)->set_window_position_managed(value);
89 } 89 }
90 90
91 // Returns true if |tab_strip| browser window is docked. 91 // Returns true if |tab_strip| browser window is docked.
92 bool IsDockedOrSnapped(const TabStrip* tab_strip) { 92 bool IsDockedOrSnapped(const TabStrip* tab_strip) {
93 DCHECK(tab_strip); 93 DCHECK(tab_strip);
94 ash::wm::WindowState* window_state = 94 ash::wm::WindowState* window_state =
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 it != browser_list->end(); ++it) { 1816 it != browser_list->end(); ++it) {
1817 if ((*it)->tab_strip_model()->empty()) 1817 if ((*it)->tab_strip_model()->empty())
1818 exclude.insert((*it)->window()->GetNativeWindow()); 1818 exclude.insert((*it)->window()->GetNativeWindow());
1819 } 1819 }
1820 #endif 1820 #endif
1821 return GetLocalProcessWindowAtPoint(host_desktop_type_, 1821 return GetLocalProcessWindowAtPoint(host_desktop_type_,
1822 screen_point, 1822 screen_point,
1823 exclude); 1823 exclude);
1824 1824
1825 } 1825 }
OLDNEW
« no previous file with comments | « ash/wm/default_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698