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/webrtc/desktop_media_list_ash.h" | 5 #include "chrome/browser/media/webrtc/desktop_media_list_ash.h" |
6 | 6 |
7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 | 99 |
100 CaptureThumbnail(screen_source.id, root_windows[i]); | 100 CaptureThumbnail(screen_source.id, root_windows[i]); |
101 } | 101 } |
102 | 102 |
103 if (source_types_ & WINDOWS) { | 103 if (source_types_ & WINDOWS) { |
104 EnumerateWindowsForRoot( | 104 EnumerateWindowsForRoot( |
105 sources, root_windows[i], ash::kShellWindowId_DefaultContainer); | 105 sources, root_windows[i], ash::kShellWindowId_DefaultContainer); |
106 EnumerateWindowsForRoot( | 106 EnumerateWindowsForRoot( |
107 sources, root_windows[i], ash::kShellWindowId_AlwaysOnTopContainer); | 107 sources, root_windows[i], ash::kShellWindowId_AlwaysOnTopContainer); |
108 EnumerateWindowsForRoot( | |
109 sources, root_windows[i], ash::kShellWindowId_DockedContainer); | |
110 } | 108 } |
111 } | 109 } |
112 } | 110 } |
113 | 111 |
114 void DesktopMediaListAsh::CaptureThumbnail(content::DesktopMediaID id, | 112 void DesktopMediaListAsh::CaptureThumbnail(content::DesktopMediaID id, |
115 aura::Window* window) { | 113 aura::Window* window) { |
116 gfx::Rect window_rect(window->bounds().width(), window->bounds().height()); | 114 gfx::Rect window_rect(window->bounds().width(), window->bounds().height()); |
117 gfx::Rect scaled_rect = media::ComputeLetterboxRegion( | 115 gfx::Rect scaled_rect = media::ComputeLetterboxRegion( |
118 gfx::Rect(thumbnail_size_), window_rect.size()); | 116 gfx::Rect(thumbnail_size_), window_rect.size()); |
119 | 117 |
(...skipping 14 matching lines...) Expand all Loading... |
134 | 132 |
135 --pending_window_capture_requests_; | 133 --pending_window_capture_requests_; |
136 DCHECK_GE(pending_window_capture_requests_, 0); | 134 DCHECK_GE(pending_window_capture_requests_, 0); |
137 | 135 |
138 if (!pending_window_capture_requests_) { | 136 if (!pending_window_capture_requests_) { |
139 // Once we've finished capturing all windows post a task for the next list | 137 // Once we've finished capturing all windows post a task for the next list |
140 // update. | 138 // update. |
141 ScheduleNextRefresh(); | 139 ScheduleNextRefresh(); |
142 } | 140 } |
143 } | 141 } |
OLD | NEW |