| 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/test/test_windows.h" | 5 #include "ui/aura/test/test_windows.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/compositor/layer.h" | 10 #include "ui/compositor/layer.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, | 40 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, |
| 41 ui::wm::WindowType type, | 41 ui::wm::WindowType type, |
| 42 int id, | 42 int id, |
| 43 const gfx::Rect& bounds, | 43 const gfx::Rect& bounds, |
| 44 Window* parent) { | 44 Window* parent) { |
| 45 Window* window = new Window(delegate); | 45 Window* window = new Window(delegate); |
| 46 window->set_id(id); | 46 window->set_id(id); |
| 47 window->SetType(type); | 47 window->SetType(type); |
| 48 window->Init(ui::LAYER_TEXTURED); | 48 window->Init(aura::WINDOW_LAYER_TEXTURED); |
| 49 window->SetBounds(bounds); | 49 window->SetBounds(bounds); |
| 50 window->Show(); | 50 window->Show(); |
| 51 if (parent) | 51 if (parent) |
| 52 parent->AddChild(window); | 52 parent->AddChild(window); |
| 53 window->SetProperty(aura::client::kCanMaximizeKey, true); | 53 window->SetProperty(aura::client::kCanMaximizeKey, true); |
| 54 return window; | 54 return window; |
| 55 } | 55 } |
| 56 | 56 |
| 57 template <typename T> | 57 template <typename T> |
| 58 bool ObjectIsAbove(T* upper, T* lower) { | 58 bool ObjectIsAbove(T* upper, T* lower) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 i != parent->children().end(); ++i) { | 80 i != parent->children().end(); ++i) { |
| 81 if (!result.empty()) | 81 if (!result.empty()) |
| 82 result += " "; | 82 result += " "; |
| 83 result += base::IntToString((*i)->id()); | 83 result += base::IntToString((*i)->id()); |
| 84 } | 84 } |
| 85 return result; | 85 return result; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace test | 88 } // namespace test |
| 89 } // namespace aura | 89 } // namespace aura |
| OLD | NEW |