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

Unified Diff: ui/aura/test/mus/test_window_tree.h

Issue 2511883006: Mojo C++ bindings: switch services/ui/public/interfaces mojom target to use STL types. (Closed)
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | ui/aura/test/mus/test_window_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/mus/test_window_tree.h
diff --git a/ui/aura/test/mus/test_window_tree.h b/ui/aura/test/mus/test_window_tree.h
index 6b0995dcc97538696ffa27e6d3cd9c0d7cc08817..279c9acfe990dd452dd6983d614e941272123239 100644
--- a/ui/aura/test/mus/test_window_tree.h
+++ b/ui/aura/test/mus/test_window_tree.h
@@ -51,9 +51,10 @@ class TestWindowTree : public ui::mojom::WindowTree {
bool WasEventAcked(uint32_t event_id) const;
- mojo::Array<uint8_t> GetLastPropertyValue();
+ base::Optional<std::vector<uint8_t>> GetLastPropertyValue();
- mojo::Map<mojo::String, mojo::Array<uint8_t>> GetLastNewWindowProperties();
+ base::Optional<std::unordered_map<std::string, std::vector<uint8_t>>>
+ GetLastNewWindowProperties();
// True if at least one function has been called that takes a change id.
bool has_change() const { return !changes_.empty(); }
@@ -91,31 +92,35 @@ class TestWindowTree : public ui::mojom::WindowTree {
WindowTreeChangeType type = WindowTreeChangeType::OTHER);
// ui::mojom::WindowTree:
- void NewWindow(
- uint32_t change_id,
- uint32_t window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override;
+ void NewWindow(uint32_t change_id,
+ uint32_t window_id,
+ const base::Optional<
+ std::unordered_map<std::string, std::vector<uint8_t>>>&
+ properties) override;
void NewTopLevelWindow(
uint32_t change_id,
uint32_t window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override;
+ const std::unordered_map<std::string, std::vector<uint8_t>>& properties)
+ override;
void DeleteWindow(uint32_t change_id, uint32_t window_id) override;
void SetWindowBounds(uint32_t change_id,
uint32_t window_id,
const gfx::Rect& bounds) override;
void SetClientArea(uint32_t window_id,
const gfx::Insets& insets,
- mojo::Array<gfx::Rect> additional_client_areas) override;
+ const base::Optional<std::vector<gfx::Rect>>&
+ additional_client_areas) override;
void SetHitTestMask(uint32_t window_id,
const base::Optional<gfx::Rect>& mask) override;
void SetCanAcceptDrops(uint32_t window_id, bool accepts_drags) override;
void SetWindowVisibility(uint32_t change_id,
uint32_t window_id,
bool visible) override;
- void SetWindowProperty(uint32_t change_id,
- uint32_t window_id,
- const mojo::String& name,
- mojo::Array<uint8_t> value) override;
+ void SetWindowProperty(
+ uint32_t change_id,
+ uint32_t window_id,
+ const std::string& name,
+ const base::Optional<std::vector<uint8_t>>& value) override;
void SetWindowOpacity(uint32_t change_id,
uint32_t window_id,
float opacity) override;
@@ -164,10 +169,11 @@ class TestWindowTree : public ui::mojom::WindowTree {
override;
void GetCursorLocationMemory(
const GetCursorLocationMemoryCallback& callback) override;
- void PerformDragDrop(uint32_t change_id,
- uint32_t source_window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data,
- uint32_t drag_operation) override;
+ void PerformDragDrop(
+ uint32_t change_id,
+ uint32_t source_window_id,
+ const std::unordered_map<std::string, std::vector<uint8_t>>& drag_data,
+ uint32_t drag_operation) override;
void CancelDragDrop(uint32_t window_id) override;
void PerformWindowMove(uint32_t change_id,
uint32_t window_id,
@@ -178,13 +184,14 @@ class TestWindowTree : public ui::mojom::WindowTree {
std::set<uint32_t> acked_events_;
uint32_t window_id_ = 0u;
- mojo::Array<uint8_t> last_property_value_;
+ base::Optional<std::vector<uint8_t>> last_property_value_;
std::vector<Change> changes_;
ui::mojom::WindowTreeClient* client_;
- mojo::Map<mojo::String, mojo::Array<uint8_t>> last_new_window_properties_;
+ base::Optional<std::unordered_map<std::string, std::vector<uint8_t>>>
+ last_new_window_properties_;
TransientData transient_data_;
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | ui/aura/test/mus/test_window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698