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

Unified Diff: ash/wm/root_window_event_filter.cc

Issue 9609016: Initial cut at multi-window resize code. There's still some TODOs, but (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/root_window_event_filter.cc
diff --git a/ash/wm/root_window_event_filter.cc b/ash/wm/root_window_event_filter.cc
index 7fcaa74e6787bb8d3da6b84cb332971c2f3c639c..5fd90245461ff85454d287bde8763573a0f6aab9 100644
--- a/ash/wm/root_window_event_filter.cc
+++ b/ash/wm/root_window_event_filter.cc
@@ -19,30 +19,6 @@ namespace internal {
namespace {
-// Returns the default cursor for a window component.
-gfx::NativeCursor CursorForWindowComponent(int window_component) {
- switch (window_component) {
- case HTBOTTOM:
- return aura::kCursorSouthResize;
- case HTBOTTOMLEFT:
- return aura::kCursorSouthWestResize;
- case HTBOTTOMRIGHT:
- return aura::kCursorSouthEastResize;
- case HTLEFT:
- return aura::kCursorWestResize;
- case HTRIGHT:
- return aura::kCursorEastResize;
- case HTTOP:
- return aura::kCursorNorthResize;
- case HTTOPLEFT:
- return aura::kCursorNorthWestResize;
- case HTTOPRIGHT:
- return aura::kCursorNorthEastResize;
- default:
- return aura::kCursorNull;
- }
-}
-
aura::Window* FindFocusableWindowFor(aura::Window* window) {
while (window && !window->CanFocus())
window = window->parent();
@@ -67,6 +43,31 @@ RootWindowEventFilter::~RootWindowEventFilter() {
// check_empty == true and will DCHECK failure if it is not empty.
}
+// static
+gfx::NativeCursor RootWindowEventFilter::CursorForWindowComponent(
+ int window_component) {
+ switch (window_component) {
+ case HTBOTTOM:
+ return aura::kCursorSouthResize;
+ case HTBOTTOMLEFT:
+ return aura::kCursorSouthWestResize;
+ case HTBOTTOMRIGHT:
+ return aura::kCursorSouthEastResize;
+ case HTLEFT:
+ return aura::kCursorWestResize;
+ case HTRIGHT:
+ return aura::kCursorEastResize;
+ case HTTOP:
+ return aura::kCursorNorthResize;
+ case HTTOPLEFT:
+ return aura::kCursorNorthWestResize;
+ case HTTOPRIGHT:
+ return aura::kCursorNorthEastResize;
+ default:
+ return aura::kCursorNull;
+ }
+}
+
void RootWindowEventFilter::LockCursor() {
cursor_lock_count_++;
}

Powered by Google App Engine
This is Rietveld 408576698