Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: ui/views/widget/desktop_aura/desktop_capture_client.cc

Issue 2652033003: Change ImmersiveContextMus to use DesktopCaptureClient. (Closed)
Patch Set: doc and auto Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_capture_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_capture_client.cc
diff --git a/ui/views/widget/desktop_aura/desktop_capture_client.cc b/ui/views/widget/desktop_aura/desktop_capture_client.cc
index 5ce64e9d025154dfaedc259308675d4446709e43..a86141b650a821fb32e8befd803fc28777702f34 100644
--- a/ui/views/widget/desktop_aura/desktop_capture_client.cc
+++ b/ui/views/widget/desktop_aura/desktop_capture_client.cc
@@ -15,6 +15,15 @@ namespace views {
DesktopCaptureClient::CaptureClients*
DesktopCaptureClient::capture_clients_ = NULL;
+// static
+aura::Window* DesktopCaptureClient::GetCaptureWindowGlobal() {
+ for (auto i = capture_clients_->begin(); i != capture_clients_->end(); ++i) {
sadrul 2017/01/25 16:40:22 I was hoping something like this would work: fo
+ if ((*i)->capture_window_)
+ return (*i)->capture_window_;
+ }
+ return NULL;
sadrul 2017/01/25 16:40:22 nullptr
+}
+
DesktopCaptureClient::DesktopCaptureClient(aura::Window* root)
: root_(root),
capture_window_(NULL) {
@@ -90,12 +99,7 @@ aura::Window* DesktopCaptureClient::GetCaptureWindow() {
}
aura::Window* DesktopCaptureClient::GetGlobalCaptureWindow() {
- for (CaptureClients::iterator i = capture_clients_->begin();
- i != capture_clients_->end(); ++i) {
- if ((*i)->capture_window_)
- return (*i)->capture_window_;
- }
- return NULL;
+ return GetCaptureWindowGlobal();
}
void DesktopCaptureClient::AddObserver(
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_capture_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698