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

Unified Diff: ui/aura/root_window.h

Issue 10825050: Introduce RootWindowHostDelegate. The RootWindowHost performs most of its communication with RootWi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.h
===================================================================
--- ui/aura/root_window.h (revision 148788)
+++ ui/aura/root_window.h (working copy)
@@ -14,6 +14,7 @@
#include "base/message_loop.h"
#include "ui/aura/aura_export.h"
#include "ui/aura/client/capture_delegate.h"
+#include "ui/aura/root_window_host_delegate.h"
#include "ui/aura/window.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/events.h"
@@ -78,7 +79,8 @@
public Window,
public ui::GestureEventHelper,
public ui::LayerAnimationObserver,
- public aura::client::CaptureDelegate {
+ public aura::client::CaptureDelegate,
+ public aura::RootWindowHostDelegate {
public:
explicit RootWindow(const gfx::Rect& initial_bounds);
virtual ~RootWindow();
@@ -107,6 +109,8 @@
// Shows the root window host.
void ShowRootWindow();
+ RootWindowHostDelegate* AsRootWindowHostDelegate();
+
// Sets the size of the root window.
void SetHostSize(const gfx::Size& size_in_pixel);
gfx::Size GetHostSize() const;
@@ -138,26 +142,11 @@
// Draw the whole screen.
void ScheduleFullDraw();
- // Handles a mouse event. Returns true if handled.
- bool DispatchMouseEvent(MouseEvent* event);
-
- // Handles a key event. Returns true if handled.
- bool DispatchKeyEvent(KeyEvent* event);
-
- // Handles a scroll event. Returns true if handled.
- bool DispatchScrollEvent(ScrollEvent* event);
-
- // Handles a touch event. Returns true if handled.
- bool DispatchTouchEvent(TouchEvent* event);
-
// Handles a gesture event. Returns true if handled. Unlike the other
// event-dispatching function (e.g. for touch/mouse/keyboard events), gesture
// events are dispatched from GestureRecognizer instead of RootWindowHost.
bool DispatchGestureEvent(GestureEvent* event);
- // Called when the host changes size.
- void OnHostResized(const gfx::Size& size_in_pixel);
-
// Invoked when |window| is being destroyed.
void OnWindowDestroying(Window* window);
@@ -320,6 +309,17 @@
virtual void OnLayerAnimationAborted(
ui::LayerAnimationSequence* animation) OVERRIDE;
+ // Overridden from aura::RootWindowHostDelegate:
+ virtual bool OnHostKeyEvent(KeyEvent* event) OVERRIDE;
+ virtual bool OnHostMouseEvent(MouseEvent* event) OVERRIDE;
+ virtual bool OnHostScrollEvent(ScrollEvent* event) OVERRIDE;
+ virtual bool OnHostTouchEvent(TouchEvent* event) OVERRIDE;
+ virtual void OnHostLostCapture() OVERRIDE;
+ virtual void OnHostPaint() OVERRIDE;
+ virtual void OnHostResized(const gfx::Size& size) OVERRIDE;
+ virtual float GetDeviceScaleFactor() OVERRIDE;
+ virtual RootWindow* AsRootWindow() OVERRIDE;
+
// We hold and aggregate mouse drags as a way of throttling resizes when
// HoldMouseMoves() is called. The following methods are used to dispatch held
// and newly incoming mouse events, typically when an event other than a mouse
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698