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

Side by Side Diff: services/ui/ws/window_server_test_impl.cc

Issue 2505133003: Mojo C++ bindings: switch part of the services/ui/public/interfaces mojom target to use STL types. (Closed)
Patch Set: Merge branch 'master' into c139_wrappers_ui Created 4 years, 1 month 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 | « services/ui/ws/window_server_test_impl.h ('k') | ui/views/mus/screen_mus.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 "services/ui/ws/window_server_test_impl.h" 5 #include "services/ui/ws/window_server_test_impl.h"
6 6
7 #include "services/ui/public/interfaces/window_tree.mojom.h" 7 #include "services/ui/public/interfaces/window_tree.mojom.h"
8 #include "services/ui/ws/server_window.h" 8 #include "services/ui/ws/server_window.h"
9 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h" 9 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
10 #include "services/ui/ws/window_server.h" 10 #include "services/ui/ws/window_server.h"
(...skipping 26 matching lines...) Expand all
37 WindowTree* tree = window_server_->GetTreeWithClientName(name); 37 WindowTree* tree = window_server_->GetTreeWithClientName(name);
38 if (!tree) 38 if (!tree)
39 return; 39 return;
40 if (tree->HasRoot(window) && WindowHasValidFrame(window)) { 40 if (tree->HasRoot(window) && WindowHasValidFrame(window)) {
41 cb.Run(true); 41 cb.Run(true);
42 window_server_->SetPaintCallback(base::Callback<void(ServerWindow*)>()); 42 window_server_->SetPaintCallback(base::Callback<void(ServerWindow*)>());
43 } 43 }
44 } 44 }
45 45
46 void WindowServerTestImpl::EnsureClientHasDrawnWindow( 46 void WindowServerTestImpl::EnsureClientHasDrawnWindow(
47 const mojo::String& client_name, 47 const std::string& client_name,
48 const EnsureClientHasDrawnWindowCallback& callback) { 48 const EnsureClientHasDrawnWindowCallback& callback) {
49 std::string name = client_name.To<std::string>(); 49 WindowTree* tree = window_server_->GetTreeWithClientName(client_name);
50 WindowTree* tree = window_server_->GetTreeWithClientName(name);
51 if (tree) { 50 if (tree) {
52 for (const ServerWindow* window : tree->roots()) { 51 for (const ServerWindow* window : tree->roots()) {
53 if (WindowHasValidFrame(window)) { 52 if (WindowHasValidFrame(window)) {
54 callback.Run(true); 53 callback.Run(true);
55 return; 54 return;
56 } 55 }
57 } 56 }
58 } 57 }
59 58
60 window_server_->SetPaintCallback( 59 window_server_->SetPaintCallback(
61 base::Bind(&WindowServerTestImpl::OnWindowPaint, base::Unretained(this), 60 base::Bind(&WindowServerTestImpl::OnWindowPaint, base::Unretained(this),
62 name, std::move(callback))); 61 client_name, std::move(callback)));
63 } 62 }
64 63
65 } // namespace ws 64 } // namespace ws
66 } // namespace ui 65 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server_test_impl.h ('k') | ui/views/mus/screen_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698