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/oak/oak_aura_window_display.h" | 5 #include "ui/oak/oak_aura_window_display.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
12 #include "ui/base/models/table_model_observer.h" | 12 #include "ui/base/models/table_model_observer.h" |
13 #include "ui/oak/oak_pretty_print.h" | 13 #include "ui/oak/oak_pretty_print.h" |
| 14 #include "ui/views/corewm/window_util.h" |
14 | 15 |
15 namespace oak { | 16 namespace oak { |
16 namespace internal { | 17 namespace internal { |
17 namespace { | 18 namespace { |
18 enum { | 19 enum { |
19 ROW_ID = 0, | 20 ROW_ID = 0, |
20 ROW_DELEGATE, | 21 ROW_DELEGATE, |
21 ROW_TYPE, | 22 ROW_TYPE, |
22 ROW_NAME, | 23 ROW_NAME, |
23 ROW_TITLE, | 24 ROW_TITLE, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 case ROW_BOUNDSINROOTWINDOW: | 125 case ROW_BOUNDSINROOTWINDOW: |
125 return PropertyWithBounds("Bounds in Root Window: ", | 126 return PropertyWithBounds("Bounds in Root Window: ", |
126 window_->GetBoundsInRootWindow()); | 127 window_->GetBoundsInRootWindow()); |
127 case ROW_TRANSFORM: | 128 case ROW_TRANSFORM: |
128 return base::ASCIIToUTF16("Transform:"); | 129 return base::ASCIIToUTF16("Transform:"); |
129 case ROW_PARENT: | 130 case ROW_PARENT: |
130 return PropertyWithVoidStar("Parent: ", window_->parent()); | 131 return PropertyWithVoidStar("Parent: ", window_->parent()); |
131 case ROW_ROOTWINDOW: | 132 case ROW_ROOTWINDOW: |
132 return PropertyWithVoidStar("Root Window: ", window_->GetRootWindow()); | 133 return PropertyWithVoidStar("Root Window: ", window_->GetRootWindow()); |
133 case ROW_TRANSIENTCHILDREN: | 134 case ROW_TRANSIENTCHILDREN: |
134 return PropertyWithInteger("Transient Children: ", | 135 return PropertyWithInteger( |
135 window_->transient_children().size()); | 136 "Transient Children: ", |
| 137 views::corewm::GetTransientChildren(window_).size()); |
136 case ROW_TRANSIENTPARENT: | 138 case ROW_TRANSIENTPARENT: |
137 return PropertyWithVoidStar("Transient Parent: ", | 139 return PropertyWithVoidStar("Transient Parent: ", |
138 window_->transient_parent()); | 140 views::corewm::GetTransientParent(window_)); |
139 case ROW_USERDATA: | 141 case ROW_USERDATA: |
140 return PropertyWithVoidStar("User Data: ", window_->user_data()); | 142 return PropertyWithVoidStar("User Data: ", window_->user_data()); |
141 case ROW_IGNOREEVENTS: | 143 case ROW_IGNOREEVENTS: |
142 return PropertyWithBool("Can receive events: ", | 144 return PropertyWithBool("Can receive events: ", |
143 window_->CanReceiveEvents()); | 145 window_->CanReceiveEvents()); |
144 case ROW_CANFOCUS: | 146 case ROW_CANFOCUS: |
145 return PropertyWithBool("Can Focus: ", window_->CanFocus()); | 147 return PropertyWithBool("Can Focus: ", window_->CanFocus()); |
146 case ROW_HITTESTBOUNDSOVERRIDEOUTER: | 148 case ROW_HITTESTBOUNDSOVERRIDEOUTER: |
147 return PropertyWithInsets("Hit test bounds override outer: ", | 149 return PropertyWithInsets("Hit test bounds override outer: ", |
148 window_->hit_test_bounds_override_outer_mouse()); | 150 window_->hit_test_bounds_override_outer_mouse()); |
149 case ROW_HITTESTBOUNDSOVERRIDEINNER: | 151 case ROW_HITTESTBOUNDSOVERRIDEINNER: |
150 return PropertyWithInsets("Hit test bounds override inner: ", | 152 return PropertyWithInsets("Hit test bounds override inner: ", |
151 window_->hit_test_bounds_override_inner()); | 153 window_->hit_test_bounds_override_inner()); |
152 default: | 154 default: |
153 NOTREACHED(); | 155 NOTREACHED(); |
154 break; | 156 break; |
155 } | 157 } |
156 return base::string16(); | 158 return base::string16(); |
157 } | 159 } |
158 | 160 |
159 void OakAuraWindowDisplay::SetObserver(ui::TableModelObserver* observer) { | 161 void OakAuraWindowDisplay::SetObserver(ui::TableModelObserver* observer) { |
160 observer_ = observer; | 162 observer_ = observer; |
161 } | 163 } |
162 | 164 |
163 } // namespace internal | 165 } // namespace internal |
164 } // namespace oak | 166 } // namespace oak |
OLD | NEW |