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

Unified Diff: ui/views/mus/platform_window_mus.h

Issue 1891233006: mus: Fix handled status in UI event ack, add MessageLoop::NestingObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eventresult
Patch Set: Created 4 years, 8 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/mus/platform_window_mus.h
diff --git a/ui/views/mus/platform_window_mus.h b/ui/views/mus/platform_window_mus.h
index 9364239879998bc6493194450c2b303e73a33d68..d0e59d9f9a64344370e12f5d6c324a3f99c5fd39 100644
--- a/ui/views/mus/platform_window_mus.h
+++ b/ui/views/mus/platform_window_mus.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/message_loop/message_loop.h"
#include "components/mus/public/cpp/input_event_handler.h"
#include "components/mus/public/cpp/window_observer.h"
#include "ui/platform_window/platform_window.h"
@@ -34,7 +35,8 @@ namespace views {
class VIEWS_MUS_EXPORT PlatformWindowMus
: public NON_EXPORTED_BASE(ui::PlatformWindow),
public mus::WindowObserver,
- public NON_EXPORTED_BASE(mus::InputEventHandler) {
+ public NON_EXPORTED_BASE(mus::InputEventHandler),
+ public base::MessageLoop::NestingObserver {
public:
PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
shell::Connector* connector,
@@ -89,11 +91,17 @@ class VIEWS_MUS_EXPORT PlatformWindowMus
std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
ack_callback) override;
+ // base::MessageLoop::NestingObserver:
+ void OnBeginNestedMessageLoop() override;
+
ui::PlatformWindowDelegate* delegate_;
mus::Window* mus_window_;
mus::mojom::ShowState show_state_;
mus::mojom::Cursor last_cursor_;
+ std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>
+ event_ack_callback_;
+
// True if OnWindowDestroyed() has been received.
bool mus_window_destroyed_;

Powered by Google App Engine
This is Rietveld 408576698