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

Unified Diff: components/mus/ws/window_tree_host_impl.h

Issue 1459463004: mus: Allow the WM to specify the windows that can have active children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 5 years, 1 month 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 | « components/mus/ws/window_manager_client_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_host_impl.h
diff --git a/components/mus/ws/window_tree_host_impl.h b/components/mus/ws/window_tree_host_impl.h
index 0ecd264fa4bc700d4108f1684b5dd82fbb55e84b..4204210a15955aa84aa93736306cb982625c4048 100644
--- a/components/mus/ws/window_tree_host_impl.h
+++ b/components/mus/ws/window_tree_host_impl.h
@@ -12,6 +12,7 @@
#include "components/mus/ws/display_manager.h"
#include "components/mus/ws/event_dispatcher.h"
#include "components/mus/ws/event_dispatcher_delegate.h"
+#include "components/mus/ws/focus_controller_delegate.h"
#include "components/mus/ws/focus_controller_observer.h"
#include "components/mus/ws/server_window.h"
#include "components/mus/ws/server_window_observer.h"
@@ -32,6 +33,7 @@ class WindowTreeImpl;
class WindowTreeHostImpl : public DisplayManagerDelegate,
public mojom::WindowTreeHost,
public FocusControllerObserver,
+ public FocusControllerDelegate,
public EventDispatcherDelegate,
public ServerWindowObserver {
public:
@@ -94,6 +96,8 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
void AddAccelerator(uint32_t id,
mojom::EventMatcherPtr event_matcher) override;
void RemoveAccelerator(uint32_t id) override;
+ void AddActivationParent(uint32_t window_id) override;
+ void RemoveActivationParent(uint32_t window_id) override;
private:
void OnClientClosed();
@@ -108,7 +112,12 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
void OnTopLevelSurfaceChanged(cc::SurfaceId surface_id) override;
void OnCompositorFrameDrawn() override;
+ // FocusControllerDelegate:
+ bool CanHaveActiveChildren(ServerWindow* window) const override;
+
// FocusControllerObserver:
+ void OnActivationChanged(ServerWindow* old_active_window,
+ ServerWindow* new_active_window) override;
void OnFocusChanged(FocusControllerChangeSource change_source,
ServerWindow* old_focused_window,
ServerWindow* new_focused_window) override;
@@ -133,6 +142,8 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
scoped_ptr<FocusController> focus_controller_;
mojom::WindowManagerPtr window_manager_;
+ std::set<WindowId> activation_parents_;
+
// Set of windows with surfaces that need to be destroyed once the frame
// draws.
std::set<ServerWindow*> windows_needing_frame_destruction_;
« no previous file with comments | « components/mus/ws/window_manager_client_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698