| 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_
|
|
|