OLD | NEW |
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 "apps/app_window.h" | 7 #include "apps/app_window.h" |
8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/tray/system_tray_notifier.h" | 10 #include "ash/system/tray/system_tray_notifier.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 ->NotifyPrevTrack(); | 150 ->NotifyPrevTrack(); |
151 } | 151 } |
152 | 152 |
153 ash::MediaCaptureState MediaDelegateChromeOS::GetMediaCaptureState( | 153 ash::MediaCaptureState MediaDelegateChromeOS::GetMediaCaptureState( |
154 content::BrowserContext* context) { | 154 content::BrowserContext* context) { |
155 return GetMediaCaptureStateOfAllWebContents(context); | 155 return GetMediaCaptureStateOfAllWebContents(context); |
156 } | 156 } |
157 | 157 |
158 void MediaDelegateChromeOS::OnRequestUpdate( | 158 void MediaDelegateChromeOS::OnRequestUpdate( |
159 int render_process_id, | 159 int render_process_id, |
160 int render_view_id, | 160 int render_frame_id, |
161 const content::MediaStreamDevice& device, | 161 content::MediaStreamType stream_type, |
162 const content::MediaRequestState state) { | 162 const content::MediaRequestState state) { |
163 base::MessageLoopForUI::current()->PostTask( | 163 base::MessageLoopForUI::current()->PostTask( |
164 FROM_HERE, | 164 FROM_HERE, |
165 base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange, | 165 base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange, |
166 weak_ptr_factory_.GetWeakPtr())); | 166 weak_ptr_factory_.GetWeakPtr())); |
167 } | 167 } |
168 | 168 |
169 void MediaDelegateChromeOS::NotifyMediaCaptureChange() { | 169 void MediaDelegateChromeOS::NotifyMediaCaptureChange() { |
170 ash::Shell::GetInstance() | 170 ash::Shell::GetInstance() |
171 ->system_tray_notifier() | 171 ->system_tray_notifier() |
172 ->NotifyMediaCaptureChanged(); | 172 ->NotifyMediaCaptureChanged(); |
173 } | 173 } |
OLD | NEW |