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

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 1899323002: Add mash shelf application id support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address simpler comments. Created 4 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/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index d08b5268f05fbea445a3b0add78fd6b8e10d5aa3..cfa0a2b2322f11e0a66845b681384155f7232661 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -8,6 +8,9 @@
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
+#include "components/mus/public/cpp/property_type_converters.h"
+#include "components/mus/public/cpp/window.h"
+#include "components/mus/public/cpp/window_property.h"
#include "components/mus/public/cpp/window_tree_connection.h"
#include "components/mus/public/interfaces/window_tree.mojom.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
@@ -31,9 +34,10 @@ base::LazyInstance<WindowManagerConnectionPtr>::Leaky lazy_tls_ptr =
} // namespace
// static
-void WindowManagerConnection::Create(shell::Connector* connector) {
+void WindowManagerConnection::Create(shell::Connector* connector,
+ const shell::Identity& identity) {
DCHECK(!lazy_tls_ptr.Pointer()->Get());
- lazy_tls_ptr.Pointer()->Set(new WindowManagerConnection(connector));
+ lazy_tls_ptr.Pointer()->Set(new WindowManagerConnection(connector, identity));
}
// static
@@ -65,12 +69,18 @@ NativeWidget* WindowManagerConnection::CreateNativeWidgetMus(
internal::NativeWidgetDelegate* delegate) {
std::map<std::string, std::vector<uint8_t>> properties = props;
NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties);
+ properties[mus::mojom::WindowManager::kAppID_Property] =
+ mojo::ConvertTo<std::vector<uint8_t>>(identity_.name());
return new NativeWidgetMus(delegate, connector_, NewWindow(properties),
mus::mojom::SurfaceType::DEFAULT);
}
-WindowManagerConnection::WindowManagerConnection(shell::Connector* connector)
- : connector_(connector), window_tree_connection_(nullptr) {
+WindowManagerConnection::WindowManagerConnection(
+ shell::Connector* connector,
+ const shell::Identity& identity)
+ : connector_(connector),
+ identity_(identity),
+ window_tree_connection_(nullptr) {
window_tree_connection_.reset(
mus::WindowTreeConnection::Create(this, connector_));
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698