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

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: removed endl 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..b9c9060fd561bace44f9ebb82c7ba1537d862888 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,13 @@ 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 the current workspace ID.
+ std::string GetWorkspace();
+
// 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_; }
@@ -81,6 +90,9 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
// managed by Chrome.
void OnWindowCreatedOrDestroyed(int event_type, XID window);
+ // Makes a round trip to the X server to get the current workspace.
+ bool UpdateWorkspace();
+
// The display and the native X window hosting the root window.
XDisplay* xdisplay_;
@@ -105,6 +117,10 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
bool wm_supports_active_window_;
+ base::ObserverList<X11DesktopHandlerObserver> observers_;
+
+ std::string workspace_;
+
DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler);
};
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/desktop_aura/x11_desktop_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698