| 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 16 matching lines...) Expand all Loading... |
| 27 Window* parent) { | 27 Window* parent) { |
| 28 return CreateTestWindowWithDelegate(new ColorTestWindowDelegate(color), | 28 return CreateTestWindowWithDelegate(new ColorTestWindowDelegate(color), |
| 29 id, bounds, parent); | 29 id, bounds, parent); |
| 30 } | 30 } |
| 31 | 31 |
| 32 Window* CreateTestWindowWithDelegate(WindowDelegate* delegate, | 32 Window* CreateTestWindowWithDelegate(WindowDelegate* delegate, |
| 33 int id, | 33 int id, |
| 34 const gfx::Rect& bounds, | 34 const gfx::Rect& bounds, |
| 35 Window* parent) { | 35 Window* parent) { |
| 36 return CreateTestWindowWithDelegateAndType( | 36 return CreateTestWindowWithDelegateAndType( |
| 37 delegate, | 37 delegate, ui::wm::WINDOW_TYPE_NORMAL, id, bounds, parent); |
| 38 aura::client::WINDOW_TYPE_NORMAL, | |
| 39 id, | |
| 40 bounds, | |
| 41 parent); | |
| 42 } | 38 } |
| 43 | 39 |
| 44 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, | 40 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, |
| 45 client::WindowType type, | 41 ui::wm::WindowType type, |
| 46 int id, | 42 int id, |
| 47 const gfx::Rect& bounds, | 43 const gfx::Rect& bounds, |
| 48 Window* parent) { | 44 Window* parent) { |
| 49 Window* window = new Window(delegate); | 45 Window* window = new Window(delegate); |
| 50 window->set_id(id); | 46 window->set_id(id); |
| 51 window->SetType(type); | 47 window->SetType(type); |
| 52 window->Init(ui::LAYER_TEXTURED); | 48 window->Init(ui::LAYER_TEXTURED); |
| 53 window->SetBounds(bounds); | 49 window->SetBounds(bounds); |
| 54 window->Show(); | 50 window->Show(); |
| 55 if (parent) | 51 if (parent) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 84 i != parent->children().end(); ++i) { | 80 i != parent->children().end(); ++i) { |
| 85 if (!result.empty()) | 81 if (!result.empty()) |
| 86 result += " "; | 82 result += " "; |
| 87 result += base::IntToString((*i)->id()); | 83 result += base::IntToString((*i)->id()); |
| 88 } | 84 } |
| 89 return result; | 85 return result; |
| 90 } | 86 } |
| 91 | 87 |
| 92 } // namespace test | 88 } // namespace test |
| 93 } // namespace aura | 89 } // namespace aura |
| OLD | NEW |