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

Unified Diff: ui/aura/window_tree_host_x11.h

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/aura/window_tree_host_x11.h
diff --git a/ui/aura/window_tree_host_x11.h b/ui/aura/window_tree_host_x11.h
index a54b3903fb00c9ddc329c06070c144a81d7bd50b..8cbea2f83409f3379d4d1f11ae2e7e5dc8bc09a4 100644
--- a/ui/aura/window_tree_host_x11.h
+++ b/ui/aura/window_tree_host_x11.h
@@ -15,11 +15,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "ui/aura/aura_export.h"
-#include "ui/aura/env_observer.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event_source.h"
-#include "ui/gfx/insets.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/x/x11_atom_cache.h"
@@ -35,8 +33,7 @@ class TouchEventCalibrate;
class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
public base::MessagePumpDispatcher,
- public ui::EventSource,
- public EnvObserver {
+ public ui::EventSource {
public:
explicit WindowTreeHostX11(const gfx::Rect& bounds);
virtual ~WindowTreeHostX11();
@@ -48,30 +45,36 @@ class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
virtual void Hide() OVERRIDE;
- virtual void ToggleFullScreen() OVERRIDE;
virtual gfx::Rect GetBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual gfx::Insets GetInsets() const OVERRIDE;
- virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
virtual void SetCapture() OVERRIDE;
virtual void ReleaseCapture() OVERRIDE;
virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
- virtual bool ConfineCursorToRootWindow() OVERRIDE;
- virtual void UnConfineCursor() OVERRIDE;
virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE;
virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
- // EnvObserver overrides.
- virtual void OnWindowInitialized(Window* window) OVERRIDE;
- virtual void OnHostInitialized(WindowTreeHost* host) OVERRIDE;
-
// ui::EventSource overrides.
virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+ protected:
+ virtual void OnConfigureNotify() {}
+
+ // Translates the native mouse location into screen coordinates and and
+ // dispatches the event via WindowEventDispatcher.
+ virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event);
+
+ ::Window x_root_window() { return x_root_window_; }
+
+ XDisplay* xdisplay() { return xdisplay_; }
+
+ const gfx::Rect bounds() const { return bounds_; }
+
+ ui::X11AtomCache* atom_cache() { return &atom_cache_; }
+
private:
// Dispatches XI2 events. Note that some events targetted for the X root
// window are dispatched to the aura root window (e.g. touch events after
@@ -87,16 +90,12 @@ class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
// |current_cursor_|.
void SetCursorInternal(gfx::NativeCursor cursor);
- // Translates the native mouse location into screen coordinates and and
- // dispatches the event via WindowEventDispatcher.
- void TranslateAndDispatchMouseEvent(ui::MouseEvent* event);
-
// Update is_internal_display_ based on delegate_ state
- void UpdateIsInternalDisplay();
+ // void UpdateIsInternalDisplay();
// Set the CrOS touchpad "tap paused" property. It is used to temporarily
// turn off the Tap-to-click feature when the mouse pointer is invisible.
- void SetCrOSTapPaused(bool state);
+ // void SetCrOSTapPaused(bool state);
// The display and the native X window hosting the root window.
XDisplay* xdisplay_;
@@ -115,14 +114,14 @@ class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
gfx::Rect bounds_;
// The insets that specifies the effective area within the |window_|.
- gfx::Insets insets_;
+ // gfx::Insets insets_;
// True if the root host resides on the internal display
- bool is_internal_display_;
+ //bool is_internal_display_;
- scoped_ptr<XID[]> pointer_barriers_;
+ //scoped_ptr<XID[]> pointer_barriers_;
- scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_;
+ // scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_;
ui::X11AtomCache atom_cache_;

Powered by Google App Engine
This is Rietveld 408576698