| 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" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 #include "ui/aura/window_event_dispatcher.h" |
| 13 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 14 #include "ui/events/keycodes/keyboard_codes.h" | 15 #include "ui/events/keycodes/keyboard_codes.h" |
| 15 #include "ui/gfx/canvas.h" | 16 #include "ui/gfx/canvas.h" |
| 16 #include "ui/native_theme/native_theme.h" | 17 #include "ui/native_theme/native_theme.h" |
| 17 #include "ui/views/background.h" | 18 #include "ui/views/background.h" |
| 18 #include "ui/views/controls/image_view.h" | 19 #include "ui/views/controls/image_view.h" |
| 19 #include "ui/views/controls/label.h" | 20 #include "ui/views/controls/label.h" |
| 20 #include "ui/views/controls/scroll_view.h" | 21 #include "ui/views/controls/scroll_view.h" |
| 21 #include "ui/views/corewm/shadow_types.h" | |
| 22 #include "ui/views/layout/box_layout.h" | 22 #include "ui/views/layout/box_layout.h" |
| 23 #include "ui/views/layout/layout_constants.h" | 23 #include "ui/views/layout/layout_constants.h" |
| 24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
| 25 #include "ui/views/window/dialog_client_view.h" | 25 #include "ui/views/window/dialog_client_view.h" |
| 26 #include "ui/views/window/dialog_delegate.h" | 26 #include "ui/views/window/dialog_delegate.h" |
| 27 | 27 #include "ui/wm/core/shadow_types.h" |
| 28 #if defined(USE_AURA) | |
| 29 #include "ui/aura/window_event_dispatcher.h" | |
| 30 #endif | |
| 31 | 28 |
| 32 using content::DesktopMediaID; | 29 using content::DesktopMediaID; |
| 33 | 30 |
| 34 namespace { | 31 namespace { |
| 35 | 32 |
| 36 const int kThumbnailWidth = 160; | 33 const int kThumbnailWidth = 160; |
| 37 const int kThumbnailHeight = 100; | 34 const int kThumbnailHeight = 100; |
| 38 const int kThumbnailMargin = 10; | 35 const int kThumbnailMargin = 10; |
| 39 const int kLabelHeight = 40; | 36 const int kLabelHeight = 40; |
| 40 const int kListItemWidth = kThumbnailMargin * 2 + kThumbnailWidth; | 37 const int kListItemWidth = kThumbnailMargin * 2 + kThumbnailWidth; |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 base::Bind(callback_, source)); | 652 base::Bind(callback_, source)); |
| 656 callback_.Reset(); | 653 callback_.Reset(); |
| 657 } | 654 } |
| 658 | 655 |
| 659 } // namespace | 656 } // namespace |
| 660 | 657 |
| 661 // static | 658 // static |
| 662 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 659 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
| 663 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 660 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
| 664 } | 661 } |
| OLD | NEW |