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

Side by Side Diff: ui/aura/test/aura_test_helper.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: Created 4 years 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 "ui/aura/test/aura_test_helper.h" 5 #include "ui/aura/test/aura_test_helper.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "ui/aura/client/default_capture_client.h" 10 #include "ui/aura/client/default_capture_client.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (!screen) 115 if (!screen)
116 display::Screen::SetScreenInstance(test_screen_.get()); 116 display::Screen::SetScreenInstance(test_screen_.get());
117 host_.reset(test_screen_->CreateHostForPrimaryDisplay()); 117 host_.reset(test_screen_->CreateHostForPrimaryDisplay());
118 118
119 client::SetFocusClient(root_window(), focus_client_.get()); 119 client::SetFocusClient(root_window(), focus_client_.get());
120 client::SetCaptureClient(root_window(), capture_client()); 120 client::SetCaptureClient(root_window(), capture_client());
121 parenting_client_.reset(new TestWindowParentingClient(root_window())); 121 parenting_client_.reset(new TestWindowParentingClient(root_window()));
122 122
123 root_window()->Show(); 123 root_window()->Show();
124 // Ensure width != height so tests won't confuse them. 124 // Ensure width != height so tests won't confuse them.
125 host()->SetBounds(gfx::Rect(host_size)); 125 host()->SetBoundsInPixel(gfx::Rect(host_size));
126 126
127 if (mode_ == Mode::MUS_CREATE_WINDOW_TREE_CLIENT) 127 if (mode_ == Mode::MUS_CREATE_WINDOW_TREE_CLIENT)
128 window_tree()->AckAllChanges(); 128 window_tree()->AckAllChanges();
129 } 129 }
130 130
131 void AuraTestHelper::TearDown() { 131 void AuraTestHelper::TearDown() {
132 teardown_called_ = true; 132 teardown_called_ = true;
133 parenting_client_.reset(); 133 parenting_client_.reset();
134 client::SetFocusClient(root_window(), nullptr); 134 client::SetFocusClient(root_window(), nullptr);
135 client::SetCaptureClient(root_window(), nullptr); 135 client::SetCaptureClient(root_window(), nullptr);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 void AuraTestHelper::InitWindowTreeClient() { 175 void AuraTestHelper::InitWindowTreeClient() {
176 window_tree_client_setup_ = base::MakeUnique<TestWindowTreeClientSetup>(); 176 window_tree_client_setup_ = base::MakeUnique<TestWindowTreeClientSetup>();
177 window_tree_client_setup_->InitForWindowManager(window_tree_delegate_, 177 window_tree_client_setup_->InitForWindowManager(window_tree_delegate_,
178 window_manager_delegate_); 178 window_manager_delegate_);
179 window_tree_client_ = window_tree_client_setup_->window_tree_client(); 179 window_tree_client_ = window_tree_client_setup_->window_tree_client();
180 } 180 }
181 181
182 } // namespace test 182 } // namespace test
183 } // namespace aura 183 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698