| 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 "services/ui/ws/test_change_tracker.h" | 5 #include "services/ui/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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 void TestChangeTracker::OnWindowFocused(Id window_id) { | 416 void TestChangeTracker::OnWindowFocused(Id window_id) { |
| 417 Change change; | 417 Change change; |
| 418 change.type = CHANGE_TYPE_FOCUSED; | 418 change.type = CHANGE_TYPE_FOCUSED; |
| 419 change.window_id = window_id; | 419 change.window_id = window_id; |
| 420 AddChange(change); | 420 AddChange(change); |
| 421 } | 421 } |
| 422 | 422 |
| 423 void TestChangeTracker::OnWindowPredefinedCursorChanged( | 423 void TestChangeTracker::OnWindowPredefinedCursorChanged( |
| 424 Id window_id, | 424 Id window_id, |
| 425 mojom::Cursor cursor_id) { | 425 mojom::CursorType cursor_id) { |
| 426 Change change; | 426 Change change; |
| 427 change.type = CHANGE_TYPE_CURSOR_CHANGED; | 427 change.type = CHANGE_TYPE_CURSOR_CHANGED; |
| 428 change.window_id = window_id; | 428 change.window_id = window_id; |
| 429 change.cursor_id = static_cast<int32_t>(cursor_id); | 429 change.cursor_id = static_cast<int32_t>(cursor_id); |
| 430 AddChange(change); | 430 AddChange(change); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void TestChangeTracker::OnChangeCompleted(uint32_t change_id, bool success) { | 433 void TestChangeTracker::OnChangeCompleted(uint32_t change_id, bool success) { |
| 434 Change change; | 434 Change change; |
| 435 change.type = CHANGE_TYPE_ON_CHANGE_COMPLETED; | 435 change.type = CHANGE_TYPE_ON_CHANGE_COMPLETED; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 484 |
| 485 std::string TestWindow::ToString2() const { | 485 std::string TestWindow::ToString2() const { |
| 486 return base::StringPrintf( | 486 return base::StringPrintf( |
| 487 "window=%s parent=%s visible=%s", WindowIdToString(window_id).c_str(), | 487 "window=%s parent=%s visible=%s", WindowIdToString(window_id).c_str(), |
| 488 WindowIdToString(parent_id).c_str(), visible ? "true" : "false"); | 488 WindowIdToString(parent_id).c_str(), visible ? "true" : "false"); |
| 489 } | 489 } |
| 490 | 490 |
| 491 } // namespace ws | 491 } // namespace ws |
| 492 | 492 |
| 493 } // namespace ui | 493 } // namespace ui |
| OLD | NEW |