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

Unified Diff: ui/oak/oak_aura_window_display.cc

Issue 173183002: Remove oak windows and its flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove one more oak.gyp reference Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/oak/oak_aura_window_display.h ('k') | ui/oak/oak_details_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/oak/oak_aura_window_display.h ('k') | ui/oak/oak_details_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698