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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 2821213002: chromeos: converts ash devtools to aura::Window (Closed)
Patch Set: fix cast Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/display/extended_mouse_warp_controller.h" 10 #include "ash/display/extended_mouse_warp_controller.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 return CreateTestWindowInShellWithDelegate(NULL, 0, bounds); 241 return CreateTestWindowInShellWithDelegate(NULL, 0, bounds);
242 } 242 }
243 243
244 aura::Window* AshTestBase::CreateTestWindowInShell(SkColor color, 244 aura::Window* AshTestBase::CreateTestWindowInShell(SkColor color,
245 int id, 245 int id,
246 const gfx::Rect& bounds) { 246 const gfx::Rect& bounds) {
247 return CreateTestWindowInShellWithDelegate( 247 return CreateTestWindowInShellWithDelegate(
248 new aura::test::ColorTestWindowDelegate(color), id, bounds); 248 new aura::test::ColorTestWindowDelegate(color), id, bounds);
249 } 249 }
250 250
251 std::unique_ptr<aura::Window> AshTestBase::CreateChildWindow(
252 aura::Window* parent,
253 const gfx::Rect& bounds,
254 int shell_window_id) {
255 std::unique_ptr<aura::Window> window =
256 base::MakeUnique<aura::Window>(nullptr, ui::wm::WINDOW_TYPE_NORMAL);
257 window->Init(ui::LAYER_NOT_DRAWN);
258 window->SetBounds(bounds);
259 window->set_id(shell_window_id);
260 parent->AddChild(window.get());
261 window->Show();
262 return window;
263 }
264
251 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegate( 265 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegate(
252 aura::WindowDelegate* delegate, 266 aura::WindowDelegate* delegate,
253 int id, 267 int id,
254 const gfx::Rect& bounds) { 268 const gfx::Rect& bounds) {
255 return CreateTestWindowInShellWithDelegateAndType( 269 return CreateTestWindowInShellWithDelegateAndType(
256 delegate, ui::wm::WINDOW_TYPE_NORMAL, id, bounds); 270 delegate, ui::wm::WINDOW_TYPE_NORMAL, id, bounds);
257 } 271 }
258 272
259 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType( 273 aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType(
260 aura::WindowDelegate* delegate, 274 aura::WindowDelegate* delegate,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId( 410 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId(
397 display_manager()->GetSecondaryDisplay().id()); 411 display_manager()->GetSecondaryDisplay().id());
398 } 412 }
399 413
400 display::Display AshTestBase::GetSecondaryDisplay() { 414 display::Display AshTestBase::GetSecondaryDisplay() {
401 return ash_test_helper_->GetSecondaryDisplay(); 415 return ash_test_helper_->GetSecondaryDisplay();
402 } 416 }
403 417
404 } // namespace test 418 } // namespace test
405 } // namespace ash 419 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698