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

Side by Side Diff: chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (Closed)
Patch Set: Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/desktop_capture/desktop_media_picker_views.h" 5 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/media/webrtc/desktop_media_list.h" 8 #include "chrome/browser/media/webrtc/desktop_media_list.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 void DesktopMediaPickerViews::NotifyDialogResult(DesktopMediaID source) { 439 void DesktopMediaPickerViews::NotifyDialogResult(DesktopMediaID source) {
440 // Once this method is called the |dialog_| will close and destroy itself. 440 // Once this method is called the |dialog_| will close and destroy itself.
441 dialog_->DetachParent(); 441 dialog_->DetachParent();
442 dialog_ = nullptr; 442 dialog_ = nullptr;
443 443
444 DCHECK(!callback_.is_null()); 444 DCHECK(!callback_.is_null());
445 445
446 // Notify the |callback_| asynchronously because it may need to destroy 446 // Notify the |callback_| asynchronously because it may need to destroy
447 // DesktopMediaPicker. 447 // DesktopMediaPicker.
448 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 448 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
449 base::Bind(callback_, source)); 449 base::BindOnce(callback_, source));
450 callback_.Reset(); 450 callback_.Reset();
451 } 451 }
452 452
453 // static 453 // static
454 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 454 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
455 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 455 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
456 } 456 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698