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

Unified Diff: ui/aura/client/default_capture_client.h

Issue 2436023003: Adds CaptureClientObserver as a way to track changes in capture (Closed)
Patch Set: fix comments Created 4 years, 2 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/aura/client/capture_client_observer.h ('k') | ui/aura/client/default_capture_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/client/default_capture_client.h
diff --git a/ui/aura/client/default_capture_client.h b/ui/aura/client/default_capture_client.h
index d9dbd57818036abdaf77958357335170b96b71fe..40ab823b9ea25bdb1deb85bca8a2e38497fc7ff4 100644
--- a/ui/aura/client/default_capture_client.h
+++ b/ui/aura/client/default_capture_client.h
@@ -5,8 +5,8 @@
#ifndef UI_AURA_CLIENT_DEFAULT_CAPTURE_CLIENT_H_
#define UI_AURA_CLIENT_DEFAULT_CAPTURE_CLIENT_H_
-#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/observer_list.h"
#include "ui/aura/aura_export.h"
#include "ui/aura/client/capture_client.h"
@@ -15,7 +15,7 @@ namespace client {
class AURA_EXPORT DefaultCaptureClient : public client::CaptureClient {
public:
- explicit DefaultCaptureClient(Window* root_window);
+ explicit DefaultCaptureClient(Window* root_window = nullptr);
~DefaultCaptureClient() override;
protected:
@@ -24,10 +24,13 @@ class AURA_EXPORT DefaultCaptureClient : public client::CaptureClient {
void ReleaseCapture(Window* window) override;
Window* GetCaptureWindow() override;
Window* GetGlobalCaptureWindow() override;
+ void AddObserver(CaptureClientObserver* observer) override;
+ void RemoveObserver(CaptureClientObserver* observer) override;
private:
- Window* root_window_;
+ Window* root_window_; // May be null.
Window* capture_window_;
+ base::ObserverList<CaptureClientObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(DefaultCaptureClient);
};
« no previous file with comments | « ui/aura/client/capture_client_observer.h ('k') | ui/aura/client/default_capture_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698