| 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/media/desktop_media_picker.h" | 5 #include "chrome/browser/media/desktop_media_picker.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/media/desktop_media_list.h" | 8 #include "chrome/browser/media/desktop_media_list.h" |
| 9 #include "chrome/browser/media/desktop_media_list_observer.h" | 9 #include "chrome/browser/media/desktop_media_list_observer.h" |
| 10 #include "chrome/browser/ui/ash/ash_util.h" | 10 #include "chrome/browser/ui/ash/ash_util.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 #if defined(USE_AURA) | 515 #if defined(USE_AURA) |
| 516 | 516 |
| 517 #if defined(USE_ASH) | 517 #if defined(USE_ASH) |
| 518 if (chrome::IsNativeWindowInAsh(GetWidget()->GetNativeWindow())) { | 518 if (chrome::IsNativeWindowInAsh(GetWidget()->GetNativeWindow())) { |
| 519 dialog_window_id = content::DesktopMediaID::RegisterAuraWindow( | 519 dialog_window_id = content::DesktopMediaID::RegisterAuraWindow( |
| 520 GetWidget()->GetNativeWindow()).id; | 520 GetWidget()->GetNativeWindow()).id; |
| 521 } else | 521 } else |
| 522 #endif | 522 #endif |
| 523 { | 523 { |
| 524 dialog_window_id = AcceleratedWidgetToDesktopMediaId( | 524 dialog_window_id = AcceleratedWidgetToDesktopMediaId( |
| 525 GetWidget()->GetNativeWindow()->GetDispatcher()->host()-> | 525 GetWidget()->GetNativeWindow()->GetHost()-> |
| 526 GetAcceleratedWidget()); | 526 GetAcceleratedWidget()); |
| 527 } | 527 } |
| 528 | 528 |
| 529 #else // defined(USE_AURA) | 529 #else // defined(USE_AURA) |
| 530 dialog_window_id = 0; | 530 dialog_window_id = 0; |
| 531 NOTIMPLEMENTED(); | 531 NOTIMPLEMENTED(); |
| 532 #endif // !defined(USE_AURA) | 532 #endif // !defined(USE_AURA) |
| 533 | 533 |
| 534 list_view_->StartUpdating(dialog_window_id); | 534 list_view_->StartUpdating(dialog_window_id); |
| 535 | 535 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 base::Bind(callback_, source)); | 646 base::Bind(callback_, source)); |
| 647 callback_.Reset(); | 647 callback_.Reset(); |
| 648 } | 648 } |
| 649 | 649 |
| 650 } // namespace | 650 } // namespace |
| 651 | 651 |
| 652 // static | 652 // static |
| 653 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 653 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
| 654 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 654 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
| 655 } | 655 } |
| OLD | NEW |