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

Unified Diff: ui/views/widget/desktop_aura/window_event_filter.h

Issue 2948553002: Decouple X11WindowEventFilter into WindowEventFilter parent class. (Closed)
Patch Set: rebased, added erg to owners Created 3 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: ui/views/widget/desktop_aura/window_event_filter.h
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.h b/ui/views/widget/desktop_aura/window_event_filter.h
similarity index 53%
copy from ui/views/widget/desktop_aura/x11_window_event_filter.h
copy to ui/views/widget/desktop_aura/window_event_filter.h
index 49aa5672c988d6bf05c4777316d1ee824ef7fb43..22c301302d35126fde858c45adaa9387be1b5e47 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.h
+++ b/ui/views/widget/desktop_aura/window_event_filter.h
@@ -1,43 +1,31 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
sadrul 2017/06/28 04:41:58 No (c)
msisov 2017/06/28 20:55:04 Done.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WINDOW_EVENT_FILTER_H_
-#define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WINDOW_EVENT_FILTER_H_
-
-#include <X11/Xlib.h>
+#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_WINDOW_EVENT_FILTER_H_
+#define UI_VIEWS_WIDGET_DESKTOP_AURA_WINDOW_EVENT_FILTER_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "ui/events/event_handler.h"
-#include "ui/gfx/x/x11_types.h"
#include "ui/views/views_export.h"
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Point;
-}
-
namespace views {
class DesktopWindowTreeHost;
-// An EventFilter that sets properties on X11 windows.
-class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
+// An EventFilter that sets properties on native windows.
sadrul 2017/06/28 04:41:58 Add a comment that downstream projects use this (m
msisov 2017/06/28 20:55:04 Done.
+class VIEWS_EXPORT WindowEventFilter : public ui::EventHandler {
public:
- explicit X11WindowEventFilter(DesktopWindowTreeHost* window_tree_host);
- ~X11WindowEventFilter() override;
+ explicit WindowEventFilter(DesktopWindowTreeHost* window_tree_host);
+ ~WindowEventFilter() override;
// Overridden from ui::EventHandler:
void OnMouseEvent(ui::MouseEvent* event) override;
private:
// Called when the user clicked the caption area.
- void OnClickedCaption(ui::MouseEvent* event,
- int previous_click_component);
+ void OnClickedCaption(ui::MouseEvent* event, int previous_click_component);
// Called when the user clicked the maximize button.
void OnClickedMaximizeButton(ui::MouseEvent* event);
@@ -46,15 +34,10 @@ class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
// Dispatches a _NET_WM_MOVERESIZE message to the window manager to tell it
// to act as if a border or titlebar drag occurred.
sadrul 2017/06/28 04:41:58 This documentation should be updated to reflect wh
msisov 2017/06/28 20:55:04 Done.
- bool DispatchHostWindowDragMovement(int hittest,
- const gfx::Point& screen_location);
-
- // The display and the native X window hosting the root window.
- XDisplay* xdisplay_;
- ::Window xwindow_;
+ virtual void MaybeDispatchHostWindowDragMovement(int hittest,
+ ui::MouseEvent* event);
- // The native root window.
- ::Window x_root_window_;
+ virtual void LowerWindow();
sadrul 2017/06/28 04:41:58 Document what this is expected to do.
msisov 2017/06/28 20:55:04 Done.
DesktopWindowTreeHost* window_tree_host_;
@@ -65,9 +48,9 @@ class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
// components.
int click_component_;
- DISALLOW_COPY_AND_ASSIGN(X11WindowEventFilter);
+ DISALLOW_COPY_AND_ASSIGN(WindowEventFilter);
};
} // namespace views
-#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WINDOW_EVENT_FILTER_H_
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_WINDOW_EVENT_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698