OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "ui/aura/window_observer.h" | 26 #include "ui/aura/window_observer.h" |
27 #include "ui/base/animation/multi_animation.h" | 27 #include "ui/base/animation/multi_animation.h" |
28 #include "ui/compositor/compositor.h" | 28 #include "ui/compositor/compositor.h" |
29 #include "ui/compositor/layer.h" | 29 #include "ui/compositor/layer.h" |
30 #include "ui/gfx/canvas.h" | 30 #include "ui/gfx/canvas.h" |
31 #include "ui/gfx/path.h" | 31 #include "ui/gfx/path.h" |
32 #include "ui/gfx/screen.h" | 32 #include "ui/gfx/screen.h" |
33 | 33 |
34 namespace aura { | 34 namespace aura { |
35 | 35 |
36 Window::TestApi::TestApi(Window* window) : window_(window) {} | |
37 | |
38 bool Window::TestApi::OwnsLayer() const { | |
39 return !!window_->layer_owner_.get(); | |
40 } | |
41 | |
42 bool Window::TestApi::ContainsMouse() { | |
43 return window_->ContainsMouse(); | |
44 } | |
45 | |
46 Window::Window(WindowDelegate* delegate) | 36 Window::Window(WindowDelegate* delegate) |
47 : type_(client::WINDOW_TYPE_UNKNOWN), | 37 : type_(client::WINDOW_TYPE_UNKNOWN), |
48 owned_by_parent_(true), | 38 owned_by_parent_(true), |
49 delegate_(delegate), | 39 delegate_(delegate), |
50 parent_(NULL), | 40 parent_(NULL), |
51 transient_parent_(NULL), | 41 transient_parent_(NULL), |
52 visible_(false), | 42 visible_(false), |
53 id_(-1), | 43 id_(-1), |
54 transparent_(false), | 44 transparent_(false), |
55 user_data_(NULL), | 45 user_data_(NULL), |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 bool contains_mouse = false; | 1029 bool contains_mouse = false; |
1040 if (IsVisible()) { | 1030 if (IsVisible()) { |
1041 RootWindow* root_window = GetRootWindow(); | 1031 RootWindow* root_window = GetRootWindow(); |
1042 contains_mouse = root_window && | 1032 contains_mouse = root_window && |
1043 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 1033 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
1044 } | 1034 } |
1045 return contains_mouse; | 1035 return contains_mouse; |
1046 } | 1036 } |
1047 | 1037 |
1048 } // namespace aura | 1038 } // namespace aura |
OLD | NEW |