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

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

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 6 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/content/shell_content_state.h" 7 #include "ash/content/shell_content_state.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray_notifier.h" 9 #include "ash/system/tray/system_tray_notifier.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/location.h"
11 #include "base/single_thread_task_runner.h"
12 #include "base/threading/thread_task_runner_handle.h"
11 #include "chrome/browser/chromeos/extensions/media_player_api.h" 13 #include "chrome/browser/chromeos/extensions/media_player_api.h"
12 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 14 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
13 #include "chrome/browser/media/media_stream_capture_indicator.h" 15 #include "chrome/browser/media/media_stream_capture_indicator.h"
14 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_list.h" 18 #include "chrome/browser/ui/browser_list.h"
17 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" 20 #include "chrome/browser/ui/tabs/tab_strip_model.h"
19 #include "content/public/browser/render_view_host.h" 21 #include "content/public/browser/render_view_host.h"
20 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 content::BrowserContext* context = 149 content::BrowserContext* context =
148 ash::ShellContentState::GetInstance()->GetBrowserContextByIndex(index); 150 ash::ShellContentState::GetInstance()->GetBrowserContextByIndex(index);
149 return GetMediaCaptureStateOfAllWebContents(context); 151 return GetMediaCaptureStateOfAllWebContents(context);
150 } 152 }
151 153
152 void MediaDelegateChromeOS::OnRequestUpdate( 154 void MediaDelegateChromeOS::OnRequestUpdate(
153 int render_process_id, 155 int render_process_id,
154 int render_frame_id, 156 int render_frame_id,
155 content::MediaStreamType stream_type, 157 content::MediaStreamType stream_type,
156 const content::MediaRequestState state) { 158 const content::MediaRequestState state) {
157 base::MessageLoopForUI::current()->PostTask( 159 base::ThreadTaskRunnerHandle::Get()->PostTask(
158 FROM_HERE, 160 FROM_HERE, base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange,
159 base::Bind(&MediaDelegateChromeOS::NotifyMediaCaptureChange, 161 weak_ptr_factory_.GetWeakPtr()));
160 weak_ptr_factory_.GetWeakPtr()));
161 } 162 }
162 163
163 void MediaDelegateChromeOS::NotifyMediaCaptureChange() { 164 void MediaDelegateChromeOS::NotifyMediaCaptureChange() {
164 ash::Shell::GetInstance() 165 ash::Shell::GetInstance()
165 ->system_tray_notifier() 166 ->system_tray_notifier()
166 ->NotifyMediaCaptureChanged(); 167 ->NotifyMediaCaptureChanged();
167 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698