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 "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "chrome/browser/media/desktop_media_picker_model.h" | 9 #include "chrome/browser/media/desktop_media_picker_model.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // TODO(sergeyu): Update this code when Ash-specific window capturer is | 482 // TODO(sergeyu): Update this code when Ash-specific window capturer is |
483 // implemented. Currently this code will always get native windows ID | 483 // implemented. Currently this code will always get native windows ID |
484 // which is not what we need in Ash. http://crbug.com/295102 | 484 // which is not what we need in Ash. http://crbug.com/295102 |
485 content::DesktopMediaID::Id dialog_window_id; | 485 content::DesktopMediaID::Id dialog_window_id; |
486 | 486 |
487 #if defined(OS_WIN) | 487 #if defined(OS_WIN) |
488 dialog_window_id = reinterpret_cast<content::DesktopMediaID::Id>( | 488 dialog_window_id = reinterpret_cast<content::DesktopMediaID::Id>( |
489 views::HWNDForWidget(GetWidget())); | 489 views::HWNDForWidget(GetWidget())); |
490 #elif defined(USE_AURA) | 490 #elif defined(USE_AURA) |
491 dialog_window_id = static_cast<content::DesktopMediaID::Id>( | 491 dialog_window_id = static_cast<content::DesktopMediaID::Id>( |
492 GetWidget()->GetNativeWindow()->GetDispatcher()->GetAcceleratedWidget()); | 492 GetWidget()->GetNativeWindow()->GetDispatcher()->host()-> |
| 493 GetAcceleratedWidget()); |
493 #else | 494 #else |
494 dialog_window_id = 0; | 495 dialog_window_id = 0; |
495 NOTIMPLEMENTED(); | 496 NOTIMPLEMENTED(); |
496 #endif | 497 #endif |
497 | 498 |
498 list_view_->StartUpdating(dialog_window_id); | 499 list_view_->StartUpdating(dialog_window_id); |
499 | 500 |
500 GetWidget()->Show(); | 501 GetWidget()->Show(); |
501 } | 502 } |
502 | 503 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 base::Bind(callback_, source)); | 605 base::Bind(callback_, source)); |
605 callback_.Reset(); | 606 callback_.Reset(); |
606 } | 607 } |
607 | 608 |
608 } // namespace | 609 } // namespace |
609 | 610 |
610 // static | 611 // static |
611 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 612 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
612 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 613 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
613 } | 614 } |
OLD | NEW |