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

Unified Diff: chrome/browser/ui/ash/media_client.cc

Issue 2615663002: Fix MediaClient::RequestCaptureState(). (Closed)
Patch Set: ash Created 3 years, 11 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/media_client.cc
diff --git a/chrome/browser/ui/ash/media_client.cc b/chrome/browser/ui/ash/media_client.cc
index 5234dd039a6e48448b397ca962f69ca32232b750..aadf0e951254183e8333ffacdc4385707567efc0 100644
--- a/chrome/browser/ui/ash/media_client.cc
+++ b/chrome/browser/ui/ash/media_client.cc
@@ -4,9 +4,6 @@
#include "chrome/browser/ui/ash/media_client.h"
-#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/wm_shell.h"
-#include "ash/content/shell_content_state.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
@@ -17,10 +14,12 @@
#include "chrome/browser/media/webrtc/media_stream_capture_indicator.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/ash_util.h"
+#include "chrome/browser/ui/ash/chrome_shell_content_state.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "components/user_manager/user_manager.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/service_manager_connection.h"
@@ -170,11 +169,11 @@ void MediaClient::RequestCaptureState() {
// thinks [user2, user1]. However, since parts of this system are already
// asynchronous (see OnRequestUpdate's PostTask()), we're not worrying about
// this right now.
- ash::SessionStateDelegate* session_state_delegate =
- ash::WmShell::Get()->GetSessionStateDelegate();
std::vector<MediaCaptureState> state;
for (ash::UserIndex i = 0;
- i < session_state_delegate->NumberOfLoggedInUsers(); ++i) {
+ static_cast<size_t>(i) <
James Cook 2017/01/09 21:07:19 nit: This might be easier to read if |i| was a uin
riajiang 2017/01/09 23:46:51 Done.
+ user_manager::UserManager::Get()->GetLoggedInUsers().size();
+ ++i) {
state.push_back(GetMediaCaptureStateByIndex(i));
}
@@ -195,7 +194,7 @@ void MediaClient::OnRequestUpdate(int render_process_id,
MediaCaptureState MediaClient::GetMediaCaptureStateByIndex(int user_index) {
content::BrowserContext* context =
- ash::ShellContentState::GetInstance()->GetBrowserContextByIndex(
+ ChromeShellContentState::GetInstance()->GetBrowserContextByIndex(
user_index);
return GetMediaCaptureStateOfAllWebContents(context);
}

Powered by Google App Engine
This is Rietveld 408576698