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

Unified Diff: ui/views/widget/desktop_aura/x11_desktop_handler.h

Issue 2108933003: Reorder browser list on workspace switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted ui/display Created 4 years, 5 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
Index: ui/views/widget/desktop_aura/x11_desktop_handler.h
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.h b/ui/views/widget/desktop_aura/x11_desktop_handler.h
index 47a1ff1a7ffd2854d5218ac8cd7b3c579c000267..c1e7f99873425bcd2de3321cb3e061116e7d0f3b 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.h
@@ -13,12 +13,14 @@
#include <vector>
#include "base/macros.h"
+#include "base/observer_list.h"
#include "ui/aura/env_observer.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/events/platform/x11/x11_event_source.h"
#include "ui/gfx/x/x11_atom_cache.h"
#include "ui/gfx/x/x11_types.h"
#include "ui/views/views_export.h"
+#include "ui/views/widget/desktop_aura/x11_desktop_handler_observer.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;
@@ -35,6 +37,10 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
// Returns the singleton handler.
static X11DesktopHandler* get();
+ // Adds/removes X11DesktopHandlerObservers.
+ void AddObserver(X11DesktopHandlerObserver* observer);
+ void RemoveObserver(X11DesktopHandlerObserver* observer);
+
// Gets/sets the X11 server time of the most recent mouse click, touch or
// key press on a Chrome window.
int wm_user_time_ms() const { return wm_user_time_ms_; }
@@ -105,6 +111,8 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
bool wm_supports_active_window_;
+ base::ObserverList<X11DesktopHandlerObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler);
};

Powered by Google App Engine
This is Rietveld 408576698