OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_change_tracker.h" | 5 #include "components/mus/ws/test_change_tracker.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 void TestChangeTracker::OnWindowParentDrawnStateChanged(Id window_id, | 343 void TestChangeTracker::OnWindowParentDrawnStateChanged(Id window_id, |
344 bool drawn) { | 344 bool drawn) { |
345 Change change; | 345 Change change; |
346 change.type = CHANGE_TYPE_NODE_DRAWN_STATE_CHANGED; | 346 change.type = CHANGE_TYPE_NODE_DRAWN_STATE_CHANGED; |
347 change.window_id = window_id; | 347 change.window_id = window_id; |
348 change.bool_value = drawn; | 348 change.bool_value = drawn; |
349 AddChange(change); | 349 AddChange(change); |
350 } | 350 } |
351 | 351 |
352 void TestChangeTracker::OnWindowInputEvent(Id window_id, | 352 void TestChangeTracker::OnWindowInputEvent(Id window_id, |
353 mojom::EventPtr event, | 353 const ui::Event& event, |
354 uint32_t event_observer_id) { | 354 uint32_t event_observer_id) { |
355 Change change; | 355 Change change; |
356 change.type = CHANGE_TYPE_INPUT_EVENT; | 356 change.type = CHANGE_TYPE_INPUT_EVENT; |
357 change.window_id = window_id; | 357 change.window_id = window_id; |
358 change.event_action = static_cast<int32_t>(event->action); | 358 change.event_action = static_cast<int32_t>(event.type()); |
359 change.event_observer_id = event_observer_id; | 359 change.event_observer_id = event_observer_id; |
360 AddChange(change); | 360 AddChange(change); |
361 } | 361 } |
362 | 362 |
363 void TestChangeTracker::OnEventObserved(mojom::EventPtr event, | 363 void TestChangeTracker::OnEventObserved(const ui::Event& event, |
364 uint32_t event_observer_id) { | 364 uint32_t event_observer_id) { |
365 Change change; | 365 Change change; |
366 change.type = CHANGE_TYPE_EVENT_OBSERVED; | 366 change.type = CHANGE_TYPE_EVENT_OBSERVED; |
367 change.event_action = static_cast<int32_t>(event->action); | 367 change.event_action = static_cast<int32_t>(event.type()); |
368 change.event_observer_id = event_observer_id; | 368 change.event_observer_id = event_observer_id; |
369 AddChange(change); | 369 AddChange(change); |
370 } | 370 } |
371 | 371 |
372 void TestChangeTracker::OnWindowSharedPropertyChanged(Id window_id, | 372 void TestChangeTracker::OnWindowSharedPropertyChanged(Id window_id, |
373 String name, | 373 String name, |
374 Array<uint8_t> data) { | 374 Array<uint8_t> data) { |
375 Change change; | 375 Change change; |
376 change.type = CHANGE_TYPE_PROPERTY_CHANGED; | 376 change.type = CHANGE_TYPE_PROPERTY_CHANGED; |
377 change.window_id = window_id; | 377 change.window_id = window_id; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 439 |
440 std::string TestWindow::ToString2() const { | 440 std::string TestWindow::ToString2() const { |
441 return base::StringPrintf( | 441 return base::StringPrintf( |
442 "window=%s parent=%s visible=%s", WindowIdToString(window_id).c_str(), | 442 "window=%s parent=%s visible=%s", WindowIdToString(window_id).c_str(), |
443 WindowIdToString(parent_id).c_str(), visible ? "true" : "false"); | 443 WindowIdToString(parent_id).c_str(), visible ? "true" : "false"); |
444 } | 444 } |
445 | 445 |
446 } // namespace ws | 446 } // namespace ws |
447 | 447 |
448 } // namespace mus | 448 } // namespace mus |
OLD | NEW |