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

Side by Side Diff: chrome/browser/ui/ash/media_delegate_chromeos.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/media_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/media_delegate_chromeos.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_notifier.h" 8 #include "ash/system/tray/system_tray_notifier.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/chromeos/extensions/media_player_api.h" 10 #include "chrome/browser/chromeos/extensions/media_player_api.h"
(...skipping 19 matching lines...) Expand all
30 if (indicator->IsCapturingVideo(web_contents)) 30 if (indicator->IsCapturingVideo(web_contents))
31 *media_state_out |= ash::MEDIA_CAPTURE_VIDEO; 31 *media_state_out |= ash::MEDIA_CAPTURE_VIDEO;
32 if (indicator->IsCapturingAudio(web_contents)) 32 if (indicator->IsCapturingAudio(web_contents))
33 *media_state_out |= ash::MEDIA_CAPTURE_AUDIO; 33 *media_state_out |= ash::MEDIA_CAPTURE_AUDIO;
34 } 34 }
35 35
36 void GetBrowserMediaCaptureState( 36 void GetBrowserMediaCaptureState(
37 const MediaStreamCaptureIndicator* indicator, 37 const MediaStreamCaptureIndicator* indicator,
38 const content::BrowserContext* context, 38 const content::BrowserContext* context,
39 int* media_state_out) { 39 int* media_state_out) {
40
41 const BrowserList* desktop_list = 40 const BrowserList* desktop_list =
42 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); 41 BrowserList::GetInstance(ui::HOST_DESKTOP_TYPE_ASH);
43 42
44 for (BrowserList::BrowserVector::const_iterator iter = desktop_list->begin(); 43 for (BrowserList::BrowserVector::const_iterator iter = desktop_list->begin();
45 iter != desktop_list->end(); 44 iter != desktop_list->end();
46 ++iter) { 45 ++iter) {
47 TabStripModel* tab_strip_model = (*iter)->tab_strip_model(); 46 TabStripModel* tab_strip_model = (*iter)->tab_strip_model();
48 for (int i = 0; i < tab_strip_model->count(); ++i) { 47 for (int i = 0; i < tab_strip_model->count(); ++i) {
49 content::WebContents* web_contents = tab_strip_model->GetWebContentsAt(i); 48 content::WebContents* web_contents = tab_strip_model->GetWebContentsAt(i);
50 if (web_contents->GetBrowserContext() != context) 49 if (web_contents->GetBrowserContext() != context)
51 continue; 50 continue;
52 GetMediaCaptureState(indicator, web_contents, media_state_out); 51 GetMediaCaptureState(indicator, web_contents, media_state_out);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 FROM_HERE, 156 FROM_HERE,
158 base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange, 157 base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange,
159 weak_ptr_factory_.GetWeakPtr())); 158 weak_ptr_factory_.GetWeakPtr()));
160 } 159 }
161 160
162 void MediaDelegateChromeOS::NotifyMediaCaptureChange() { 161 void MediaDelegateChromeOS::NotifyMediaCaptureChange() {
163 ash::Shell::GetInstance() 162 ash::Shell::GetInstance()
164 ->system_tray_notifier() 163 ->system_tray_notifier()
165 ->NotifyMediaCaptureChanged(); 164 ->NotifyMediaCaptureChanged();
166 } 165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698