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

Unified Diff: ash/common/wm_shell.h

Issue 2108793002: mash: Convert system tray logout button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments, fix windows Created 4 years, 6 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: ash/common/wm_shell.h
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h
index 6d9498fe2e3dea5760139637be6c61a7f5e89fe4..f9e3f98d2e2d6ed6da5d88f4272db794de46074a 100644
--- a/ash/common/wm_shell.h
+++ b/ash/common/wm_shell.h
@@ -30,17 +30,22 @@ class MruWindowTracker;
class SessionStateDelegate;
class ShellObserver;
class SystemTrayDelegate;
+class SystemTrayNotifier;
class WindowResizer;
class WindowSelectorController;
class WmActivationObserver;
class WmDisplayObserver;
-class SystemTrayNotifier;
+class WmRootWindowController;
class WmWindow;
namespace wm {
class WindowState;
}
+#if defined(OS_CHROMEOS)
+class LogoutConfirmationController;
+#endif
+
// Similar to ash::Shell. Eventually the two will be merged.
class ASH_EXPORT WmShell {
public:
@@ -75,6 +80,10 @@ class ASH_EXPORT WmShell {
virtual WmWindow* GetPrimaryRootWindow() = 0;
+ // Convenience method. Returns the WmRootWindowController for the primary
+ // root window.
+ WmRootWindowController* GetPrimaryRootWindowController();
+
// Returns the root window for the specified display.
virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0;
@@ -157,6 +166,10 @@ class ASH_EXPORT WmShell {
virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0;
#if defined(OS_CHROMEOS)
+ LogoutConfirmationController* logout_confirmation_controller() {
+ return logout_confirmation_controller_.get();
+ }
+
// TODO(jamescook): Remove this when VirtualKeyboardController has been moved.
virtual void ToggleIgnoreExternalKeyboard() = 0;
#endif
@@ -165,9 +178,9 @@ class ASH_EXPORT WmShell {
WmShell();
virtual ~WmShell();
- // If |delegate| is not null, sets and initializes the delegate. If |delegate|
- // is null, shuts down and destroys the delegate.
+ // Sets and initializes the |delegate|.
void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
+ void DeleteSystemTrayDelegate();
void DeleteWindowSelectorController();
@@ -182,6 +195,10 @@ class ASH_EXPORT WmShell {
std::unique_ptr<WindowSelectorController> window_selector_controller_;
bool simulate_modal_window_open_for_testing_ = false;
+
+#if defined(OS_CHROMEOS)
+ std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
+#endif
};
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698