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..0f3138e9d6fe03140ae9e6b906b19c2b05a3cd9c |
--- /dev/null |
+++ b/ash/public/cpp/app_launch_id.h |
@@ -0,0 +1,42 @@ |
+// 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. |
+class ASH_PUBLIC_EXPORT AppLaunchId { |
James Cook
2017/03/20 20:31:13
nit: could you add to this comment something like
msw
2017/03/20 21:20:59
Done.
|
+ 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_; |
James Cook
2017/03/20 20:31:13
could these be const?
msw
2017/03/20 21:20:59
No, unfortunately that seems to break copy constru
|
+ // 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_ |