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

Unified Diff: services/ui/ws/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 | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.h
diff --git a/services/ui/ws/window_tree.h b/services/ui/ws/window_tree.h
index fbb0781b5700b23043cfa60c0ed623cfe0569d1c..1d304b8adb5d7c3f38131b2668d34dca73d5ec19 100644
--- a/services/ui/ws/window_tree.h
+++ b/services/ui/ws/window_tree.h
@@ -338,7 +338,7 @@ class WindowTree : public mojom::WindowTree,
// Converts Window(s) to WindowData(s) for transport. This assumes all the
// windows are valid for the client. The parent of windows the client is not
// allowed to see are set to NULL (in the returned WindowData(s)).
- mojo::Array<mojom::WindowDataPtr> WindowsToWindowDatas(
+ std::vector<mojom::WindowDataPtr> WindowsToWindowDatas(
const std::vector<const ServerWindow*>& windows);
mojom::WindowDataPtr WindowToWindowData(const ServerWindow* window);
@@ -376,12 +376,14 @@ class WindowTree : public mojom::WindowTree,
// WindowTree:
void NewWindow(uint32_t change_id,
Id transport_window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>>
+ const base::Optional<
+ std::unordered_map<std::string, std::vector<uint8_t>>>&
transport_properties) override;
- void NewTopLevelWindow(uint32_t change_id,
- Id transport_window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>>
- transport_properties) override;
+ void NewTopLevelWindow(
+ uint32_t change_id,
+ Id transport_window_id,
+ const std::unordered_map<std::string, std::vector<uint8_t>>&
+ transport_properties) override;
void DeleteWindow(uint32_t change_id, Id transport_window_id) override;
void AddWindow(uint32_t change_id, Id parent_id, Id child_id) override;
void RemoveWindowFromParent(uint32_t change_id, Id window_id) override;
@@ -397,7 +399,7 @@ class WindowTree : public mojom::WindowTree,
mojom::OrderDirection direction) override;
void GetWindowTree(
Id window_id,
- const base::Callback<void(mojo::Array<mojom::WindowDataPtr>)>& callback)
+ const base::Callback<void(std::vector<mojom::WindowDataPtr>)>& callback)
override;
void SetCapture(uint32_t change_id, Id window_id) override;
void ReleaseCapture(uint32_t change_id, Id window_id) override;
@@ -409,10 +411,11 @@ class WindowTree : public mojom::WindowTree,
void SetWindowVisibility(uint32_t change_id,
Id window_id,
bool visible) override;
- void SetWindowProperty(uint32_t change_id,
- Id transport_window_id,
- const mojo::String& name,
- mojo::Array<uint8_t> value) override;
+ void SetWindowProperty(
+ uint32_t change_id,
+ Id transport_window_id,
+ const std::string& name,
+ const base::Optional<std::vector<uint8_t>>& value) override;
void SetWindowOpacity(uint32_t change_id,
Id window_id,
float opacity) override;
@@ -439,10 +442,10 @@ class WindowTree : public mojom::WindowTree,
mojo::TextInputStatePtr state) override;
void OnWindowInputEventAck(uint32_t event_id,
mojom::EventResult result) override;
- void SetClientArea(
- Id transport_window_id,
- const gfx::Insets& insets,
- mojo::Array<gfx::Rect> transport_additional_client_areas) override;
+ void SetClientArea(Id transport_window_id,
+ const gfx::Insets& insets,
+ const base::Optional<std::vector<gfx::Rect>>&
+ transport_additional_client_areas) override;
void SetCanAcceptDrops(Id window_id, bool accepts_drops) override;
void SetHitTestMask(Id transport_window_id,
const base::Optional<gfx::Rect>& mask) override;
@@ -451,10 +454,11 @@ class WindowTree : public mojom::WindowTree,
override;
void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback)
override;
- void PerformDragDrop(uint32_t change_id,
- Id source_window_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data,
- uint32_t drag_operation) override;
+ void PerformDragDrop(
+ uint32_t change_id,
+ Id source_window_id,
+ const std::unordered_map<std::string, std::vector<uint8_t>>& drag_data,
+ uint32_t drag_operation) override;
void CancelDragDrop(Id window_id) override;
void PerformWindowMove(uint32_t change_id,
Id window_id,
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698