| 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/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/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 | 14 |
| 15 namespace oak { | 15 namespace oak { |
| 16 namespace internal { | 16 namespace internal { |
| 17 namespace { | 17 namespace { |
| 18 enum { | 18 enum { |
| 19 ROW_ID = 0, | 19 ROW_ID = 0, |
| 20 ROW_DELEGATE, | 20 ROW_DELEGATE, |
| 21 ROW_TYPE, | 21 ROW_TYPE, |
| 22 ROW_NAME, | 22 ROW_NAME, |
| 23 ROW_TITLE, | 23 ROW_TITLE, |
| 24 ROW_TRANSPARENT, | 24 ROW_TRANSPARENT, |
| 25 ROW_LAYER, | 25 ROW_LAYER, |
| 26 ROW_VISIBLE, | 26 ROW_VISIBLE, |
| 27 ROW_BOUNDS, | 27 ROW_BOUNDS, |
| 28 ROW_SCREENBOUNDS, | 28 ROW_BOUNDSINROOTWINDOW, |
| 29 ROW_TRANSFORM, | 29 ROW_TRANSFORM, |
| 30 ROW_PARENT, | 30 ROW_PARENT, |
| 31 ROW_ROOTWINDOW, | 31 ROW_ROOTWINDOW, |
| 32 ROW_TRANSIENTCHILDREN, | 32 ROW_TRANSIENTCHILDREN, |
| 33 ROW_TRANSIENTPARENT, | 33 ROW_TRANSIENTPARENT, |
| 34 ROW_USERDATA, | 34 ROW_USERDATA, |
| 35 ROW_IGNOREEVENTS, | 35 ROW_IGNOREEVENTS, |
| 36 ROW_CANFOCUS, | 36 ROW_CANFOCUS, |
| 37 ROW_HITTESTBOUNDSOVERRIDEOUTER, | 37 ROW_HITTESTBOUNDSOVERRIDEOUTER, |
| 38 ROW_HITTESTBOUNDSOVERRIDEINNER, | 38 ROW_HITTESTBOUNDSOVERRIDEINNER, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 case ROW_TITLE: | 114 case ROW_TITLE: |
| 115 return ASCIIToUTF16("Title: ") + window_->title(); | 115 return ASCIIToUTF16("Title: ") + window_->title(); |
| 116 case ROW_TRANSPARENT: | 116 case ROW_TRANSPARENT: |
| 117 return PropertyWithBool("Transparent: ", window_->transparent()); | 117 return PropertyWithBool("Transparent: ", window_->transparent()); |
| 118 case ROW_LAYER: | 118 case ROW_LAYER: |
| 119 return PropertyWithVoidStar("Layer: ", window_->layer()); | 119 return PropertyWithVoidStar("Layer: ", window_->layer()); |
| 120 case ROW_VISIBLE: | 120 case ROW_VISIBLE: |
| 121 return PropertyWithBool("Visible: ", window_->IsVisible()); | 121 return PropertyWithBool("Visible: ", window_->IsVisible()); |
| 122 case ROW_BOUNDS: | 122 case ROW_BOUNDS: |
| 123 return PropertyWithBounds("Bounds: ", window_->bounds()); | 123 return PropertyWithBounds("Bounds: ", window_->bounds()); |
| 124 case ROW_SCREENBOUNDS: | 124 case ROW_BOUNDSINROOTWINDOW: |
| 125 return PropertyWithBounds("Screen Bounds: ", window_->GetScreenBounds()); | 125 return PropertyWithBounds("Bounds in Root Window: ", |
| 126 window_->GetBoundsInRootWindow()); |
| 126 case ROW_TRANSFORM: | 127 case ROW_TRANSFORM: |
| 127 return ASCIIToUTF16("Transform:"); | 128 return ASCIIToUTF16("Transform:"); |
| 128 case ROW_PARENT: | 129 case ROW_PARENT: |
| 129 return PropertyWithVoidStar("Parent: ", window_->parent()); | 130 return PropertyWithVoidStar("Parent: ", window_->parent()); |
| 130 case ROW_ROOTWINDOW: | 131 case ROW_ROOTWINDOW: |
| 131 return PropertyWithVoidStar("Root Window: ", window_->GetRootWindow()); | 132 return PropertyWithVoidStar("Root Window: ", window_->GetRootWindow()); |
| 132 case ROW_TRANSIENTCHILDREN: | 133 case ROW_TRANSIENTCHILDREN: |
| 133 return PropertyWithInteger("Transient Children: ", | 134 return PropertyWithInteger("Transient Children: ", |
| 134 window_->transient_children().size()); | 135 window_->transient_children().size()); |
| 135 case ROW_TRANSIENTPARENT: | 136 case ROW_TRANSIENTPARENT: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 154 } | 155 } |
| 155 return EmptyString16(); | 156 return EmptyString16(); |
| 156 } | 157 } |
| 157 | 158 |
| 158 void OakAuraWindowDisplay::SetObserver(ui::TableModelObserver* observer) { | 159 void OakAuraWindowDisplay::SetObserver(ui::TableModelObserver* observer) { |
| 159 observer_ = observer; | 160 observer_ = observer; |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace internal | 163 } // namespace internal |
| 163 } // namespace oak | 164 } // namespace oak |
| OLD | NEW |