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

Unified Diff: ash/public/cpp/app_launch_id.h

Issue 2765563002: Move and rename Chrome's AppLauncherId to ash::AppLaunchId. (Closed)
Patch Set: Add example commment. Created 3 years, 9 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 | « ash/public/cpp/BUILD.gn ('k') | ash/public/cpp/app_launch_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/cpp/app_launch_id.h
diff --git a/ash/public/cpp/app_launch_id.h b/ash/public/cpp/app_launch_id.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b080ec5534db6ea075463734286eea6eaca061c
--- /dev/null
+++ b/ash/public/cpp/app_launch_id.h
@@ -0,0 +1,44 @@
+// 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 ASH_PUBLIC_CPP_APP_LAUNCH_ID_H_
+#define ASH_PUBLIC_CPP_APP_LAUNCH_ID_H_
+
+#include <string>
+
+#include "ash/public/cpp/ash_public_export.h"
+
+namespace ash {
+
+// A unique shelf item id composed of an |app_id| and a |launch_id|.
+// |app_id| is the non-empty application id associated with a set of windows.
+// |launch_id| is passed on app launch, to support multiple shelf items per app.
+// As an example, a remote desktop client may want each remote application to
+// have its own icon.
+class ASH_PUBLIC_EXPORT AppLaunchId {
+ public:
+ AppLaunchId(const std::string& app_id, const std::string& launch_id);
+ // Creates an AppLaunchId with an empty |launch_id|.
+ explicit AppLaunchId(const std::string& app_id);
+ // Empty constructor for pre-allocating.
+ AppLaunchId();
+ ~AppLaunchId();
+
+ AppLaunchId(const AppLaunchId& app_launch_id) = default;
+ AppLaunchId(AppLaunchId&& app_launch_id) = default;
+ AppLaunchId& operator=(const AppLaunchId& other) = default;
+
+ const std::string& app_id() const { return app_id_; }
+ const std::string& launch_id() const { return launch_id_; }
+
+ private:
+ // The application id associated with a set of windows.
+ std::string app_id_;
+ // An id passed on app launch, to support multiple shelf items per app.
+ std::string launch_id_;
+};
+
+} // namespace ash
+
+#endif // ASH_PUBLIC_CPP_APP_LAUNCH_ID_H_
« no previous file with comments | « ash/public/cpp/BUILD.gn ('k') | ash/public/cpp/app_launch_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698