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

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

Issue 1939133002: StructTraits to map mus::mojom::Event to unique_ptr<ui::Event> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: todo comments + reorganize files Created 4 years, 6 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
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 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_
6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void WmSetProperty(uint32_t change_id, 238 void WmSetProperty(uint32_t change_id,
239 uint32_t window_id, 239 uint32_t window_id,
240 const mojo::String& name, 240 const mojo::String& name,
241 mojo::Array<uint8_t> value) override {} 241 mojo::Array<uint8_t> value) override {}
242 void WmCreateTopLevelWindow( 242 void WmCreateTopLevelWindow(
243 uint32_t change_id, 243 uint32_t change_id,
244 ClientSpecificId requesting_client_id, 244 ClientSpecificId requesting_client_id,
245 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; 245 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override;
246 void WmClientJankinessChanged(ClientSpecificId client_id, 246 void WmClientJankinessChanged(ClientSpecificId client_id,
247 bool janky) override; 247 bool janky) override;
248 void OnAccelerator(uint32_t id, mojom::EventPtr event) override; 248 void OnAccelerator(uint32_t id,
249 const std::unique_ptr<ui::Event>& event) override;
249 250
250 bool got_create_top_level_window_; 251 bool got_create_top_level_window_;
251 uint32_t change_id_; 252 uint32_t change_id_;
252 253
253 bool on_accelerator_called_; 254 bool on_accelerator_called_;
254 uint32_t on_accelerator_id_; 255 uint32_t on_accelerator_id_;
255 256
256 DISALLOW_COPY_AND_ASSIGN(TestWindowManager); 257 DISALLOW_COPY_AND_ASSIGN(TestWindowManager);
257 }; 258 };
258 259
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void OnWindowVisibilityChanged(uint32_t window, bool visible) override; 311 void OnWindowVisibilityChanged(uint32_t window, bool visible) override;
311 void OnWindowOpacityChanged(uint32_t window, 312 void OnWindowOpacityChanged(uint32_t window,
312 float old_opacity, 313 float old_opacity,
313 float new_opacity) override; 314 float new_opacity) override;
314 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; 315 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override;
315 void OnWindowSharedPropertyChanged(uint32_t window, 316 void OnWindowSharedPropertyChanged(uint32_t window,
316 const mojo::String& name, 317 const mojo::String& name,
317 mojo::Array<uint8_t> new_data) override; 318 mojo::Array<uint8_t> new_data) override;
318 void OnWindowInputEvent(uint32_t event_id, 319 void OnWindowInputEvent(uint32_t event_id,
319 uint32_t window, 320 uint32_t window,
320 mojom::EventPtr event, 321 const std::unique_ptr<ui::Event>& event,
321 uint32_t event_observer_id) override; 322 uint32_t event_observer_id) override;
322 void OnEventObserved(mojom::EventPtr event, 323 void OnEventObserved(const std::unique_ptr<ui::Event>& event,
323 uint32_t event_observer_id) override; 324 uint32_t event_observer_id) override;
324 void OnWindowFocused(uint32_t focused_window_id) override; 325 void OnWindowFocused(uint32_t focused_window_id) override;
325 void OnWindowPredefinedCursorChanged(uint32_t window_id, 326 void OnWindowPredefinedCursorChanged(uint32_t window_id,
326 mojom::Cursor cursor_id) override; 327 mojom::Cursor cursor_id) override;
327 void OnChangeCompleted(uint32_t change_id, bool success) override; 328 void OnChangeCompleted(uint32_t change_id, bool success) override;
328 void RequestClose(uint32_t window_id) override; 329 void RequestClose(uint32_t window_id) override;
329 void GetWindowManager( 330 void GetWindowManager(
330 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; 331 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override;
331 332
332 TestChangeTracker tracker_; 333 TestChangeTracker tracker_;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 502
502 // Creates a new visible window as a child of the single root of |tree|. 503 // Creates a new visible window as a child of the single root of |tree|.
503 // |client_id| set to the ClientWindowId of the new window. 504 // |client_id| set to the ClientWindowId of the new window.
504 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 505 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
505 506
506 } // namespace test 507 } // namespace test
507 } // namespace ws 508 } // namespace ws
508 } // namespace mus 509 } // namespace mus
509 510
510 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ 511 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698