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

Unified Diff: components/mus/ws/window_manager_state.cc

Issue 2094933003: mus: Add UserActivityMonitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/mus/ws/window_manager_state.cc
diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc
index 8139b49a6d7fe4a01e87f7f18c4d1d2a129b52b4..16a5a499df264574cdc042e4b38478e669b83ef4 100644
--- a/components/mus/ws/window_manager_state.cc
+++ b/components/mus/ws/window_manager_state.cc
@@ -10,6 +10,7 @@
#include "components/mus/ws/display_manager.h"
#include "components/mus/ws/platform_display.h"
#include "components/mus/ws/server_window.h"
+#include "components/mus/ws/user_activity_monitor.h"
#include "components/mus/ws/user_display_manager.h"
#include "components/mus/ws/user_id_tracker.h"
#include "components/mus/ws/window_manager_display_root.h"
@@ -94,7 +95,10 @@ WindowManagerState::QueuedEvent::QueuedEvent() {}
WindowManagerState::QueuedEvent::~QueuedEvent() {}
WindowManagerState::WindowManagerState(WindowTree* window_tree)
- : window_tree_(window_tree), event_dispatcher_(this), weak_factory_(this) {
+ : window_tree_(window_tree),
+ user_activity_monitor_(new UserActivityMonitor(nullptr)),
+ event_dispatcher_(this),
+ weak_factory_(this) {
frame_decoration_values_ = mojom::FrameDecorationValues::New();
frame_decoration_values_->max_title_bar_button_width = 0u;
@@ -179,6 +183,7 @@ void WindowManagerState::Deactivate() {
}
void WindowManagerState::ProcessEvent(const ui::Event& event) {
+ user_activity_monitor_->OnUserActivity();
// If this is still waiting for an ack from a previously sent event, then
// queue up the event to be dispatched once the ack is received.
if (event_ack_timer_.IsRunning()) {

Powered by Google App Engine
This is Rietveld 408576698