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

Unified Diff: chrome/browser/ui/ash/launcher/app_tab_helper.h

Issue 1921403002: Pin apps from prefs on the mash shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only include arc for cros. 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
Index: chrome/browser/ui/ash/launcher/app_tab_helper.h
diff --git a/chrome/browser/ui/ash/launcher/app_tab_helper.h b/chrome/browser/ui/ash/launcher/app_tab_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c8015998ac2829309d87e4ca27292f66cc4b40d
--- /dev/null
+++ b/chrome/browser/ui/ash/launcher/app_tab_helper.h
@@ -0,0 +1,34 @@
+// Copyright 2016 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 CHROME_BROWSER_UI_ASH_LAUNCHER_APP_TAB_HELPER_H_
+#define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_TAB_HELPER_H_
+
+#include <string>
+
+class Profile;
+
+namespace content {
+class WebContents;
+}
+
+// Mockable interface to get app ids from tabs.
+class AppTabHelper {
sky 2016/04/27 21:01:33 I would avoid using the suffix TabHelper. TabHelpe
msw 2016/04/29 22:30:49 This was simply moving the existing class, but I'v
+ public:
+ virtual ~AppTabHelper() {}
+
+ // Returns the app id of the specified tab, or an empty string if there is
+ // no app. All known profiles will be queried for this.
+ virtual std::string GetAppID(content::WebContents* tab) = 0;
+
+ // Returns true if |id| is valid for the currently active profile.
+ // Used during restore to ignore no longer valid extensions.
+ // Note that already running applications are ignored by the restore process.
+ virtual bool IsValidIDForCurrentUser(const std::string& id) = 0;
+
+ // Sets the currently active profile for the usage of |GetAppID|.
+ virtual void SetCurrentUser(Profile* profile) = 0;
+};
+
+#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_TAB_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698