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

Unified Diff: ui/aura/toplevel_window_event_filter.h

Issue 7970001: Better Z-index support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/toplevel_window_event_filter.h
===================================================================
--- ui/aura/toplevel_window_event_filter.h (revision 101829)
+++ ui/aura/toplevel_window_event_filter.h (working copy)
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_WINDOW_MANAGER_H_
-#define UI_AURA_WINDOW_MANAGER_H_
+#ifndef UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_
+#define UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_
#pragma once
-#include "base/logging.h"
+#include "base/compiler_specific.h"
+#include "ui/aura/event_filter.h"
#include "ui/gfx/point.h"
namespace aura {
@@ -14,34 +15,26 @@
class Window;
class MouseEvent;
-// An object that filters events sent to an owner window, potentially performing
-// adjustments to the window's position, size and z-index.
-//
-// TODO(beng): Make this into an interface so we can have specializations for
-// different types of Window and product.
-class WindowManager {
+class ToplevelWindowEventFilter : public EventFilter {
public:
- explicit WindowManager(Window* owner);
- ~WindowManager();
+ explicit ToplevelWindowEventFilter(Window* owner);
+ ~ToplevelWindowEventFilter();
- // Try to handle |event| (before the owner's delegate gets a chance to).
- // Returns true if the event was handled by the WindowManager and should not
- // be forwarded to the owner's delegate.
- bool OnMouseEvent(MouseEvent* event);
+ // Overridden from EventFilter:
+ virtual bool OnMouseEvent(Window* target, MouseEvent* event) OVERRIDE;
private:
- // Moves the owner window and all of its parents to the front of their
+ // Moves the target window and all of its parents to the front of their
// respective z-orders.
- void MoveWindowToFront();
+ void MoveWindowToFront(Window* target);
- Window* owner_;
gfx::Point mouse_down_offset_;
gfx::Point window_location_;
int window_component_;
- DISALLOW_COPY_AND_ASSIGN(WindowManager);
+ DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventFilter);
};
} // namespace aura
-#endif // UI_AURA_WINDOW_MANAGER_H_
+#endif // UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698