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

Side by Side Diff: ash/mus/test/wm_test_base.cc

Issue 2150933003: mash: Add touch-hud app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « ash/mus/test/wm_test_base.h ('k') | ash/touch_hud/mus/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/test/wm_test_base.h" 5 #include "ash/mus/test/wm_test_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/mus/root_window_controller.h" 10 #include "ash/mus/root_window_controller.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 ::ui::mojom::kResizeBehaviorCanMaximize | 166 ::ui::mojom::kResizeBehaviorCanMaximize |
167 ::ui::mojom::kResizeBehaviorCanMinimize); 167 ::ui::mojom::kResizeBehaviorCanMinimize);
168 168
169 ::ui::Window* window = 169 ::ui::Window* window =
170 GetRootsOrderedByDisplayId()[0]->window_manager()->NewTopLevelWindow( 170 GetRootsOrderedByDisplayId()[0]->window_manager()->NewTopLevelWindow(
171 &properties); 171 &properties);
172 window->SetVisible(true); 172 window->SetVisible(true);
173 return window; 173 return window;
174 } 174 }
175 175
176 ::ui::Window* WmTestBase::CreateFullscreenTestWindow() {
177 std::map<std::string, std::vector<uint8_t>> properties;
178 properties[::ui::mojom::WindowManager::kShowState_Property] =
179 mojo::ConvertTo<std::vector<uint8_t>>(
180 static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN));
181 ::ui::Window* window =
182 GetRootsOrderedByDisplayId()[0]->window_manager()->NewTopLevelWindow(
183 &properties);
184 window->SetVisible(true);
185 return window;
186 }
187
176 ::ui::Window* WmTestBase::CreateChildTestWindow(::ui::Window* parent, 188 ::ui::Window* WmTestBase::CreateChildTestWindow(::ui::Window* parent,
177 const gfx::Rect& bounds) { 189 const gfx::Rect& bounds) {
178 std::map<std::string, std::vector<uint8_t>> properties; 190 std::map<std::string, std::vector<uint8_t>> properties;
179 properties[::ui::mojom::WindowManager::kWindowType_Property] = 191 properties[::ui::mojom::WindowManager::kWindowType_Property] =
180 mojo::ConvertTo<std::vector<uint8_t>>(static_cast<int32_t>( 192 mojo::ConvertTo<std::vector<uint8_t>>(static_cast<int32_t>(
181 MusWindowTypeFromWmWindowType(ui::wm::WINDOW_TYPE_NORMAL))); 193 MusWindowTypeFromWmWindowType(ui::wm::WINDOW_TYPE_NORMAL)));
182 ::ui::Window* window = 194 ::ui::Window* window =
183 GetRootsOrderedByDisplayId()[0]->root()->window_tree()->NewWindow( 195 GetRootsOrderedByDisplayId()[0]->root()->window_tree()->NewWindow(
184 &properties); 196 &properties);
185 window->SetBounds(bounds); 197 window->SetBounds(bounds);
(...skipping 18 matching lines...) Expand all
204 ->window_manager() 216 ->window_manager()
205 ->GetRootWindowControllers(); 217 ->GetRootWindowControllers();
206 std::vector<RootWindowController*> ordered_roots; 218 std::vector<RootWindowController*> ordered_roots;
207 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); 219 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end());
208 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); 220 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId);
209 return ordered_roots; 221 return ordered_roots;
210 } 222 }
211 223
212 } // namespace mus 224 } // namespace mus
213 } // namespace ash 225 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/test/wm_test_base.h ('k') | ash/touch_hud/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698