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

Unified Diff: mash/wm/property_util.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 | « mash/wm/property_util.h ('k') | mash/wm/public/interfaces/user_window_controller.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/property_util.cc
diff --git a/mash/wm/property_util.cc b/mash/wm/property_util.cc
index 3fffe74e0b53069e270d0568320a28201466098b..e8355fd57e4a665406dcb3d3cc9944a7a1a06937 100644
--- a/mash/wm/property_util.cc
+++ b/mash/wm/property_util.cc
@@ -149,5 +149,18 @@ mojo::Array<uint8_t> GetWindowAppIcon(const mus::Window* window) {
return mojo::Array<uint8_t>();
}
+void SetAppID(mus::Window* window, const base::string16& app_id) {
+ window->SetSharedProperty<base::string16>(
+ mus::mojom::WindowManager::kAppID_Property, app_id);
+}
+
+base::string16 GetAppID(const mus::Window* window) {
+ if (!window->HasSharedProperty(mus::mojom::WindowManager::kAppID_Property))
+ return base::string16();
+
+ return window->GetSharedProperty<base::string16>(
+ mus::mojom::WindowManager::kAppID_Property);
+}
+
} // namespace wm
} // namespace mash
« no previous file with comments | « mash/wm/property_util.h ('k') | mash/wm/public/interfaces/user_window_controller.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698