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

Side by Side Diff: aura/window_manager.h

Issue 7886042: Move Aura to UI subdir. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AURA_WINDOW_MANAGER_H_
6 #define AURA_WINDOW_MANAGER_H_
7 #pragma once
8
9 #include "base/logging.h"
10 #include "ui/gfx/point.h"
11
12 namespace aura {
13
14 class Window;
15 class MouseEvent;
16
17 // An object that filters events sent to an owner window, potentially performing
18 // adjustments to the window's position, size and z-index.
19 //
20 // TODO(beng): Make this into an interface so we can have specializations for
21 // different types of Window and product.
22 class WindowManager {
23 public:
24 explicit WindowManager(Window* owner);
25 ~WindowManager();
26
27 // Try to handle |event| (before the owner's delegate gets a chance to).
28 // Returns true if the event was handled by the WindowManager and should not
29 // be forwarded to the owner's delegate.
30 bool OnMouseEvent(MouseEvent* event);
31
32 private:
33 // Moves the owner window and all of its parents to the front of their
34 // respective z-orders.
35 void MoveWindowToFront();
36
37 Window* owner_;
38 gfx::Point mouse_down_offset_;
39 gfx::Point window_location_;
40 int window_component_;
41
42 DISALLOW_COPY_AND_ASSIGN(WindowManager);
43 };
44
45 } // namespace aura
46
47 #endif // AURA_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « aura/window_delegate.h ('k') | aura/window_manager.cc » ('j') | ui/aura/aura.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698