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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager.h

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 1 month 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/multi_user/multi_user_window_manager.h
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.h
index 2496ea52d60dd270879365505d0af3505064e5ac..9cb7310ecc890ba73c3f0564ca49e9b387a4fda0 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.h
@@ -9,6 +9,7 @@
#include <set>
#include <string>
+class AccountId;
class Browser;
namespace content {
@@ -96,12 +97,12 @@ class MultiUserWindowManager {
// A user switch will automatically change the visibility - and - if the
// current user is not the owner it will immediately hidden. If the window
// had already be registered this function will run into a DCHECK violation.
- virtual void SetWindowOwner(
- aura::Window* window, const std::string& user_id) = 0;
+ virtual void SetWindowOwner(aura::Window* window,
+ const AccountId& account_id) = 0;
// See who owns this window. The return value is the user id or an empty
// string if not assigned yet.
sky 2015/11/11 20:15:34 nit: not string anymore.
Alexander Alekseev 2015/11/11 23:32:06 Done.
- virtual const std::string& GetWindowOwner(aura::Window* window) const = 0;
+ virtual const AccountId& GetWindowOwner(aura::Window* window) const = 0;
// Allows to show an owned window for another users. If the window is not
// owned, this call will return immediately. (The FileManager for example
@@ -109,24 +110,24 @@ class MultiUserWindowManager {
// Note that a window can only be shown on one desktop at a time. Note that
// when the window gets minimized, it will automatically fall back to the
// owner's desktop.
- virtual void ShowWindowForUser(
- aura::Window* window, const std::string& user_id) = 0;
+ virtual void ShowWindowForUser(aura::Window* window,
+ const AccountId& account_id) = 0;
// Returns true when windows are shared among users.
virtual bool AreWindowsSharedAmongUsers() const = 0;
- // Get the owners for the visible windows and set them to |user_ids|.
+ // Get the owners for the visible windows and set them to |account_ids|.
virtual void GetOwnersOfVisibleWindows(
- std::set<std::string>* user_ids) const = 0;
+ std::set<AccountId>* account_ids) const = 0;
// A query call for a given window to see if it is on the given user's
// desktop.
virtual bool IsWindowOnDesktopOfUser(aura::Window* window,
- const std::string& user_id) const = 0;
+ const AccountId& account_id) const = 0;
// Get the user on which the window is currently shown. If an empty string is
// passed back the window will be presented for every user.
- virtual const std::string& GetUserPresentingWindow(
+ virtual const AccountId& GetUserPresentingWindow(
aura::Window* window) const = 0;
// Adds user to monitor starting and running V1/V2 application windows.

Powered by Google App Engine
This is Rietveld 408576698