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

Side by Side Diff: components/mus/ws/test_utils.cc

Issue 1818333002: Reland: mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased after fixing the crash Created 4 years, 7 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 | « components/mus/ws/test_utils.h ('k') | components/mus/ws/window_manager_state.h » ('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 "components/mus/ws/test_utils.h" 5 #include "components/mus/ws/test_utils.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/output/copy_output_request.h" 8 #include "cc/output/copy_output_request.h"
9 #include "components/mus/surfaces/surfaces_state.h" 9 #include "components/mus/surfaces/surfaces_state.h"
10 #include "components/mus/ws/display_binding.h" 10 #include "components/mus/ws/display_binding.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 tree_->SetEventObserver(std::move(matcher), event_observer_id); 117 tree_->SetEventObserver(std::move(matcher), event_observer_id);
118 } 118 }
119 119
120 // DisplayTestApi ------------------------------------------------------------ 120 // DisplayTestApi ------------------------------------------------------------
121 121
122 DisplayTestApi::DisplayTestApi(Display* display) : display_(display) {} 122 DisplayTestApi::DisplayTestApi(Display* display) : display_(display) {}
123 DisplayTestApi::~DisplayTestApi() {} 123 DisplayTestApi::~DisplayTestApi() {}
124 124
125 // EventDispatcherTestApi ---------------------------------------------------- 125 // EventDispatcherTestApi ----------------------------------------------------
126 126
127 bool EventDispatcherTestApi::IsWindowPointerTarget(
128 const ServerWindow* window) const {
129 for (const auto& pair : ed_->pointer_targets_) {
130 if (pair.second.window == window)
131 return true;
132 }
133 return false;
134 }
135
127 int EventDispatcherTestApi::NumberPointerTargetsForWindow( 136 int EventDispatcherTestApi::NumberPointerTargetsForWindow(
128 ServerWindow* window) { 137 ServerWindow* window) {
129 int count = 0; 138 int count = 0;
130 for (const auto& pair : ed_->pointer_targets_) 139 for (const auto& pair : ed_->pointer_targets_)
131 if (pair.second.window == window) 140 if (pair.second.window == window)
132 count++; 141 count++;
133 return count; 142 return count;
134 } 143 }
135 144
136 // TestDisplayBinding --------------------------------------------------------- 145 // TestDisplayBinding ---------------------------------------------------------
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return nullptr; 479 return nullptr;
471 if (!tree->AddWindow(parent_client_id, client_window_id)) 480 if (!tree->AddWindow(parent_client_id, client_window_id))
472 return nullptr; 481 return nullptr;
473 *client_id = client_window_id; 482 *client_id = client_window_id;
474 return tree->GetWindowByClientId(client_window_id); 483 return tree->GetWindowByClientId(client_window_id);
475 } 484 }
476 485
477 } // namespace test 486 } // namespace test
478 } // namespace ws 487 } // namespace ws
479 } // namespace mus 488 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/test_utils.h ('k') | components/mus/ws/window_manager_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698