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

Unified Diff: ui/aura/mus/window_tree_host_mus_init_params.h

Issue 2823903005: Extracts parameters to WindowTreeHostMus into structure (Closed)
Patch Set: move constructor Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.cc ('k') | ui/aura/mus/window_tree_host_mus_init_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_host_mus_init_params.h
diff --git a/ui/aura/mus/window_tree_host_mus_init_params.h b/ui/aura/mus/window_tree_host_mus_init_params.h
new file mode 100644
index 0000000000000000000000000000000000000000..0501d9b9b31041f7eacdef688a07989fce535e3e
--- /dev/null
+++ b/ui/aura/mus/window_tree_host_mus_init_params.h
@@ -0,0 +1,54 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_
+#define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_
+
+#include <stdint.h>
+
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "cc/surfaces/frame_sink_id.h"
+#include "ui/aura/aura_export.h"
+
+namespace aura {
+
+class WindowPortMus;
+class WindowTreeClient;
+
+// Used to create a WindowTreeHostMus. The typical case is to use
+// CreateInitParamsForTopLevel().
+struct AURA_EXPORT WindowTreeHostMusInitParams {
+ WindowTreeHostMusInitParams();
+ WindowTreeHostMusInitParams(WindowTreeHostMusInitParams&& other);
+ ~WindowTreeHostMusInitParams();
+
+ // The WindowTreeClient; must be specified.
+ WindowTreeClient* window_tree_client = nullptr;
+
+ // Used to create the Window; must be specified.
+ std::unique_ptr<WindowPortMus> window_port;
+
+ // Properties to send to the server as well as to set on the Window.
+ std::map<std::string, std::vector<uint8_t>> properties;
+
+ cc::FrameSinkId frame_sink_id;
+
+ // Id of the display the window should be created on.
+ int64_t display_id = 0;
+};
+
+// Creates a WindowTreeHostMusInitParams that is used when creating a top-level
+// window.
+AURA_EXPORT WindowTreeHostMusInitParams CreateInitParamsForTopLevel(
+ WindowTreeClient* window_tree_client,
+ std::map<std::string, std::vector<uint8_t>> properties =
+ std::map<std::string, std::vector<uint8_t>>());
+
+} // namespace aura
+
+#endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_INIT_PARAMS_H_
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.cc ('k') | ui/aura/mus/window_tree_host_mus_init_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698