OLD | NEW |
---|---|
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_media_picker_views.h" | 5 #include "chrome/browser/ui/views/desktop_media_picker_views.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 bool DesktopMediaPickerDialogView::Accept() { | 516 bool DesktopMediaPickerDialogView::Accept() { |
517 DesktopMediaSourceView* selection = list_view_->GetSelection(); | 517 DesktopMediaSourceView* selection = list_view_->GetSelection(); |
518 | 518 |
519 // Ok button should only be enabled when a source is selected. | 519 // Ok button should only be enabled when a source is selected. |
520 DCHECK(selection); | 520 DCHECK(selection); |
521 | 521 |
522 DesktopMediaID source; | 522 DesktopMediaID source; |
523 if (selection) | 523 if (selection) |
524 source = selection->source_id(); | 524 source = selection->source_id(); |
525 | 525 |
526 if (parent_) | 526 // Temporarily disable tab capture. This will be enabled later. |
Avi (use Gerrit)
2016/01/11 16:27:57
"enabled later" meaning:
1) It's in the code, and
GeorgeZ
2016/01/11 19:16:19
It is 2. Therefore I use TODO.
| |
527 if (parent_ && source.type != DesktopMediaID::TYPE_TAB) | |
527 parent_->NotifyDialogResult(source); | 528 parent_->NotifyDialogResult(source); |
528 | 529 |
529 // Return true to close the window. | 530 // Return true to close the window. |
530 return true; | 531 return true; |
531 } | 532 } |
532 | 533 |
533 void DesktopMediaPickerDialogView::DeleteDelegate() { | 534 void DesktopMediaPickerDialogView::DeleteDelegate() { |
534 // If the dialog is being closed then notify the parent about it. | 535 // If the dialog is being closed then notify the parent about it. |
535 if (parent_) | 536 if (parent_) |
536 parent_->NotifyDialogResult(DesktopMediaID()); | 537 parent_->NotifyDialogResult(DesktopMediaID()); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
603 content::BrowserThread::PostTask( | 604 content::BrowserThread::PostTask( |
604 content::BrowserThread::UI, FROM_HERE, | 605 content::BrowserThread::UI, FROM_HERE, |
605 base::Bind(callback_, source)); | 606 base::Bind(callback_, source)); |
606 callback_.Reset(); | 607 callback_.Reset(); |
607 } | 608 } |
608 | 609 |
609 // static | 610 // static |
610 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 611 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
611 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 612 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
612 } | 613 } |
OLD | NEW |