Refine more about desktop capturer API.

* Simplify the coffeescript code.
* Add more options in desktopCapturer.startUpdating.
This commit is contained in:
Haojian Wu 2015-10-05 11:32:12 +08:00
parent 1e69ef79de
commit 36c0ad7fda
8 changed files with 104 additions and 84 deletions

View file

@ -14,6 +14,7 @@ class DesktopMediaListObserver {
virtual void OnSourceMoved(int old_index, int new_index) = 0;
virtual void OnSourceNameChanged(int index) = 0;
virtual void OnSourceThumbnailChanged(int index) = 0;
virtual void OnRefreshFinished() = 0;
protected:
virtual ~DesktopMediaListObserver() {}

View file

@ -358,6 +358,7 @@ void NativeDesktopMediaList::OnSourceThumbnail(
}
void NativeDesktopMediaList::OnRefreshFinished() {
observer_->OnRefreshFinished();
BrowserThread::PostDelayedTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&NativeDesktopMediaList::Refresh,