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

Unified Diff: services/ui/public/cpp/window_tree_client.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/public/cpp/window.cc ('k') | services/ui/public/cpp/window_tree_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/window_tree_client.h
diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h
index 59aea21717c72c515cd98b9992e52e3daf5b1a79..cb986b220adc556597076ee65acd58b145008239 100644
--- a/services/ui/public/cpp/window_tree_client.h
+++ b/services/ui/public/cpp/window_tree_client.h
@@ -115,7 +115,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void SetOpacity(Window* window, float opacity);
void SetProperty(Window* window,
const std::string& name,
- mojo::Array<uint8_t> data);
+ const base::Optional<std::vector<uint8_t>>& data);
void SetWindowTextInputState(Id window_id, mojo::TextInputStatePtr state);
void SetImeVisibility(Id window_id,
bool visible,
@@ -247,7 +247,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
static Id server_id(const Window* window) { return window->server_id(); }
- void BuildWindowTree(const mojo::Array<mojom::WindowDataPtr>& windows,
+ void BuildWindowTree(const std::vector<mojom::WindowDataPtr>& windows,
Window* initial_parent);
Window* NewWindowImpl(NewWindowType type,
@@ -298,7 +298,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void OnClientAreaChanged(
uint32_t window_id,
const gfx::Insets& new_client_area,
- mojo::Array<gfx::Rect> new_additional_client_areas) override;
+ const std::vector<gfx::Rect>& new_additional_client_areas) override;
void OnTransientWindowAdded(uint32_t window_id,
uint32_t transient_window_id) override;
void OnTransientWindowRemoved(uint32_t window_id,
@@ -307,7 +307,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
Id window_id,
Id old_parent_id,
Id new_parent_id,
- mojo::Array<mojom::WindowDataPtr> windows) override;
+ std::vector<mojom::WindowDataPtr> windows) override;
void OnWindowReordered(Id window_id,
Id relative_window_id,
mojom::OrderDirection direction) override;
@@ -317,9 +317,10 @@ class WindowTreeClient : public mojom::WindowTreeClient,
float old_opacity,
float new_opacity) override;
void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override;
- void OnWindowSharedPropertyChanged(Id window_id,
- const mojo::String& name,
- mojo::Array<uint8_t> new_data) override;
+ void OnWindowSharedPropertyChanged(
+ Id window_id,
+ const std::string& name,
+ const base::Optional<std::vector<uint8_t>>& new_data) override;
void OnWindowInputEvent(uint32_t event_id,
Id window_id,
std::unique_ptr<ui::Event> event,
@@ -334,7 +335,8 @@ class WindowTreeClient : public mojom::WindowTreeClient,
const gfx::Size& frame_size,
float device_scale_factor) override;
void OnDragDropStart(
- mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override;
+ const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data)
+ override;
void OnDragEnter(Id window_id,
uint32_t event_flags,
const gfx::Point& position,
@@ -370,14 +372,16 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void WmSetBounds(uint32_t change_id,
Id window_id,
const gfx::Rect& transit_bounds) override;
- void WmSetProperty(uint32_t change_id,
- Id window_id,
- const mojo::String& name,
- mojo::Array<uint8_t> transit_data) override;
- void WmCreateTopLevelWindow(uint32_t change_id,
- ClientSpecificId requesting_client_id,
- mojo::Map<mojo::String, mojo::Array<uint8_t>>
- transport_properties) override;
+ void WmSetProperty(
+ uint32_t change_id,
+ Id window_id,
+ const std::string& name,
+ const base::Optional<std::vector<uint8_t>>& transit_data) override;
+ void WmCreateTopLevelWindow(
+ uint32_t change_id,
+ ClientSpecificId requesting_client_id,
+ const std::unordered_map<std::string, std::vector<uint8_t>>&
+ transport_properties) override;
void WmClientJankinessChanged(ClientSpecificId client_id,
bool janky) override;
void WmPerformMoveLoop(uint32_t change_id,
@@ -466,7 +470,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
// completed.
base::Callback<void(bool)> on_current_move_finished_;
- // The current change id for the window manager.
+ // The current change id for the window manager.gg
uint32_t current_wm_move_loop_change_ = 0u;
Id current_wm_move_loop_window_id_ = 0u;
@@ -476,7 +480,8 @@ class WindowTreeClient : public mojom::WindowTreeClient,
// The mus server sends the mime drag data once per connection; we cache this
// and are responsible for sending it to all of our windows.
- mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_drag_data_;
+
+ std::map<std::string, std::vector<uint8_t>> mime_drag_data_;
// A set of window ids for windows that we received an OnDragEnter() message
// for. We maintain this set so we know who to send OnDragFinish() messages
« no previous file with comments | « services/ui/public/cpp/window.cc ('k') | services/ui/public/cpp/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698