Index: ui/oak/oak_aura_window_display.cc |
diff --git a/ui/oak/oak_aura_window_display.cc b/ui/oak/oak_aura_window_display.cc |
deleted file mode 100644 |
index 0bfe88ffef61ca6dd01ebc7acdb441a5673e5343..0000000000000000000000000000000000000000 |
--- a/ui/oak/oak_aura_window_display.cc |
+++ /dev/null |
@@ -1,162 +0,0 @@ |
-// Copyright (c) 2012 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. |
- |
-#include "ui/oak/oak_aura_window_display.h" |
- |
-#include "base/logging.h" |
-#include "base/strings/string_util.h" |
-#include "base/strings/stringprintf.h" |
-#include "base/strings/utf_string_conversions.h" |
-#include "ui/aura/window.h" |
-#include "ui/base/models/table_model_observer.h" |
-#include "ui/oak/oak_pretty_print.h" |
-#include "ui/views/corewm/window_util.h" |
- |
-namespace oak { |
-namespace internal { |
-namespace { |
-enum { |
-ROW_ID = 0, |
-ROW_DELEGATE, |
-ROW_TYPE, |
-ROW_NAME, |
-ROW_TITLE, |
-ROW_TRANSPARENT, |
-ROW_LAYER, |
-ROW_VISIBLE, |
-ROW_BOUNDS, |
-ROW_BOUNDSINROOTWINDOW, |
-ROW_TRANSFORM, |
-ROW_PARENT, |
-ROW_ROOTWINDOW, |
-ROW_TRANSIENTCHILDREN, |
-ROW_TRANSIENTPARENT, |
-ROW_USERDATA, |
-ROW_IGNOREEVENTS, |
-ROW_CANFOCUS, |
-ROW_HITTESTBOUNDSOVERRIDEINNER, |
-ROW_COUNT |
-}; |
- |
-// aura::Window-specific pretty printing. |
-base::string16 PropertyWithWindowType(int type) { |
- std::string property = "Type: "; |
- switch (type) { |
- case ui::wm::WINDOW_TYPE_UNKNOWN: |
- property.append("WINDOW_TYPE_UNKNOWN"); |
- break; |
- case ui::wm::WINDOW_TYPE_NORMAL: |
- property.append("WINDOW_TYPE_NORMAL"); |
- break; |
- case ui::wm::WINDOW_TYPE_POPUP: |
- property.append("WINDOW_TYPE_POPUP"); |
- break; |
- case ui::wm::WINDOW_TYPE_CONTROL: |
- property.append("WINDOW_TYPE_CONTROL"); |
- break; |
- case ui::wm::WINDOW_TYPE_PANEL: |
- property.append("WINDOW_TYPE_PANEL"); |
- break; |
- case ui::wm::WINDOW_TYPE_MENU: |
- property.append("WINDOW_TYPE_MENU"); |
- break; |
- case ui::wm::WINDOW_TYPE_TOOLTIP: |
- property.append("WINDOW_TYPE_TOOLTIP"); |
- break; |
- default: |
- NOTREACHED(); |
- break; |
- } |
- return base::ASCIIToUTF16(property); |
-} |
- |
-} // namespace |
- |
-//////////////////////////////////////////////////////////////////////////////// |
-// OakAuraWindowDisplay, public: |
- |
-OakAuraWindowDisplay::OakAuraWindowDisplay() : observer_(NULL), window_(NULL) { |
-} |
- |
-OakAuraWindowDisplay::~OakAuraWindowDisplay() { |
-} |
- |
-//////////////////////////////////////////////////////////////////////////////// |
-// OakAuraWindowDisplay, OakDetailsModel overrides: |
- |
-void OakAuraWindowDisplay::SetValue(aura::Window* window) { |
- window_ = window; |
- observer_->OnModelChanged(); |
-} |
- |
-//////////////////////////////////////////////////////////////////////////////// |
-// OakAuraWindowDisplay, ui::TableModel implementation: |
- |
-int OakAuraWindowDisplay::RowCount() { |
- return ROW_COUNT; |
-} |
- |
-base::string16 OakAuraWindowDisplay::GetText(int row, int column_id) { |
- if (!window_) |
- return base::string16(); |
- |
- base::string16 text; |
- switch (row) { |
- case ROW_ID: |
- return PropertyWithInteger("Id: ", window_->id()); |
- case ROW_DELEGATE: |
- return PropertyWithVoidStar("Delegate: ", window_->delegate()); |
- case ROW_TYPE: |
- return PropertyWithWindowType(window_->type()); |
- case ROW_NAME: |
- return base::ASCIIToUTF16("Name: " + window_->name()); |
- case ROW_TITLE: |
- return base::ASCIIToUTF16("Title: ") + window_->title(); |
- case ROW_TRANSPARENT: |
- return PropertyWithBool("Transparent: ", window_->transparent()); |
- case ROW_LAYER: |
- return PropertyWithVoidStar("Layer: ", window_->layer()); |
- case ROW_VISIBLE: |
- return PropertyWithBool("Visible: ", window_->IsVisible()); |
- case ROW_BOUNDS: |
- return PropertyWithBounds("Bounds: ", window_->bounds()); |
- case ROW_BOUNDSINROOTWINDOW: |
- return PropertyWithBounds("Bounds in Root Window: ", |
- window_->GetBoundsInRootWindow()); |
- case ROW_TRANSFORM: |
- return base::ASCIIToUTF16("Transform:"); |
- case ROW_PARENT: |
- return PropertyWithVoidStar("Parent: ", window_->parent()); |
- case ROW_ROOTWINDOW: |
- return PropertyWithVoidStar("Root Window: ", window_->GetRootWindow()); |
- case ROW_TRANSIENTCHILDREN: |
- return PropertyWithInteger( |
- "Transient Children: ", |
- views::corewm::GetTransientChildren(window_).size()); |
- case ROW_TRANSIENTPARENT: |
- return PropertyWithVoidStar("Transient Parent: ", |
- views::corewm::GetTransientParent(window_)); |
- case ROW_USERDATA: |
- return PropertyWithVoidStar("User Data: ", window_->user_data()); |
- case ROW_IGNOREEVENTS: |
- return PropertyWithBool("Can receive events: ", |
- window_->CanReceiveEvents()); |
- case ROW_CANFOCUS: |
- return PropertyWithBool("Can Focus: ", window_->CanFocus()); |
- case ROW_HITTESTBOUNDSOVERRIDEINNER: |
- return PropertyWithInsets("Hit test bounds override inner: ", |
- window_->hit_test_bounds_override_inner()); |
- default: |
- NOTREACHED(); |
- break; |
- } |
- return base::string16(); |
-} |
- |
-void OakAuraWindowDisplay::SetObserver(ui::TableModelObserver* observer) { |
- observer_ = observer; |
-} |
- |
-} // namespace internal |
-} // namespace oak |