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/view_manager/test_change_tracker.h" | 5 #include "services/view_manager/test_change_tracker.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "mojo/converters/array_string/array_string_type_converters.h" | 9 #include "mojo/converters/array_string/array_string_type_converters.h" |
10 #include "mojo/services/view_manager/public/cpp/util.h" | 10 #include "mojo/services/view_manager/cpp/util.h" |
11 | 11 |
12 using mojo::Array; | 12 using mojo::Array; |
13 using mojo::Id; | 13 using mojo::Id; |
14 using mojo::ViewDataPtr; | 14 using mojo::ViewDataPtr; |
15 using mojo::String; | 15 using mojo::String; |
16 | 16 |
17 namespace view_manager { | 17 namespace view_manager { |
18 | 18 |
19 std::string ViewIdToString(Id id) { | 19 std::string ViewIdToString(Id id) { |
20 return (id == 0) ? "null" : base::StringPrintf("%d,%d", mojo::HiWord(id), | 20 return (id == 0) ? "null" : base::StringPrintf("%d,%d", mojo::HiWord(id), |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 std::string TestView::ToString2() const { | 306 std::string TestView::ToString2() const { |
307 return base::StringPrintf("view=%s parent=%s visible=%s drawn=%s", | 307 return base::StringPrintf("view=%s parent=%s visible=%s drawn=%s", |
308 ViewIdToString(view_id).c_str(), | 308 ViewIdToString(view_id).c_str(), |
309 ViewIdToString(parent_id).c_str(), | 309 ViewIdToString(parent_id).c_str(), |
310 visible ? "true" : "false", | 310 visible ? "true" : "false", |
311 drawn ? "true" : "false"); | 311 drawn ? "true" : "false"); |
312 } | 312 } |
313 | 313 |
314 } // namespace view_manager | 314 } // namespace view_manager |
OLD | NEW |