Chromium Code Reviews| Index: ui/aura_shell/default_container_event_filter.h |
| diff --git a/ui/aura_shell/default_container_event_filter.h b/ui/aura_shell/default_container_event_filter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..31a04e721f64165821b08c9846454ea466af2a97 |
| --- /dev/null |
| +++ b/ui/aura_shell/default_container_event_filter.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_ |
| +#define UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_ |
| +#pragma once |
| + |
| +#include "ui/aura/toplevel_window_event_filter.h" |
| + |
| +namespace aura_shell { |
| +namespace internal { |
| + |
| +class DefaultContainerEventFilter : public aura::ToplevelWindowEventFilter { |
| + public: |
| + explicit DefaultContainerEventFilter(aura::Window* owner); |
| + virtual ~DefaultContainerEventFilter(); |
| + |
| + // Overridden from aura::ToplevelWindowEventFilter: |
| + virtual bool OnMouseEvent(aura::Window* target, |
| + aura::MouseEvent* event) OVERRIDE; |
| + |
| + private: |
| + enum DragState { |
| + DRAG_NONE, |
| + DRAG_MOVE, |
| + DRAG_RESIZE |
| + }; |
| + |
| + // If a mouse drag event did start drag operation, it advances |
| + // |drag_state_| to one of DRAG_MOVE or DRAG_RESIZE and returns true. |
| + bool MaybeDragStart(); |
|
sky
2011/10/25 20:58:05
How about naming this UpdateDragState with a comme
oshima
2011/10/25 23:37:23
Done.
|
| + |
| + DragState drag_state_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DefaultContainerEventFilter); |
| +}; |
| + |
| +} // namespace internal |
| +} // namespace aura_shell |
| + |
| +#endif // UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_ |