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/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 #include "ui/events/keycodes/keyboard_codes.h" | 14 #include "ui/events/keycodes/keyboard_codes.h" |
15 #include "ui/gfx/canvas.h" | 15 #include "ui/gfx/canvas.h" |
16 #include "ui/native_theme/native_theme.h" | 16 #include "ui/native_theme/native_theme.h" |
17 #include "ui/views/background.h" | 17 #include "ui/views/background.h" |
18 #include "ui/views/controls/image_view.h" | 18 #include "ui/views/controls/image_view.h" |
19 #include "ui/views/controls/label.h" | 19 #include "ui/views/controls/label.h" |
20 #include "ui/views/controls/scroll_view.h" | 20 #include "ui/views/controls/scroll_view.h" |
21 #include "ui/views/corewm/shadow_types.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 |
28 #if defined(USE_AURA) | 28 #if defined(USE_AURA) |
29 #include "ui/aura/root_window.h" | 29 #include "ui/aura/window_event_dispatcher.h" |
30 #endif | 30 #endif |
31 | 31 |
32 using content::DesktopMediaID; | 32 using content::DesktopMediaID; |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 const int kThumbnailWidth = 160; | 36 const int kThumbnailWidth = 160; |
37 const int kThumbnailHeight = 100; | 37 const int kThumbnailHeight = 100; |
38 const int kThumbnailMargin = 10; | 38 const int kThumbnailMargin = 10; |
39 const int kLabelHeight = 40; | 39 const int kLabelHeight = 40; |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 base::Bind(callback_, source)); | 638 base::Bind(callback_, source)); |
639 callback_.Reset(); | 639 callback_.Reset(); |
640 } | 640 } |
641 | 641 |
642 } // namespace | 642 } // namespace |
643 | 643 |
644 // static | 644 // static |
645 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 645 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
646 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 646 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
647 } | 647 } |
OLD | NEW |