OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "ui/aura/client/activation_delegate.h" | 10 #include "ui/aura/client/activation_delegate.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Overridden from views::InputMethodDelegate: | 126 // Overridden from views::InputMethodDelegate: |
127 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; | 127 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; |
128 | 128 |
129 // Overridden from aura::WindowDelegate: | 129 // Overridden from aura::WindowDelegate: |
130 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 130 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
131 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 131 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
132 const gfx::Rect& new_bounds) OVERRIDE; | 132 const gfx::Rect& new_bounds) OVERRIDE; |
133 virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE; | 133 virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE; |
134 virtual void OnBlur() OVERRIDE; | 134 virtual void OnBlur() OVERRIDE; |
135 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; | 135 virtual bool OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
136 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; | 136 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; |
137 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; | 137 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; |
138 virtual bool ShouldDescendIntoChildForEventHandling( | 138 virtual bool ShouldDescendIntoChildForEventHandling( |
139 aura::Window* child, | 139 aura::Window* child, |
140 const gfx::Point& location) OVERRIDE; | 140 const gfx::Point& location) OVERRIDE; |
141 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; | 141 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
142 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; | 142 virtual ui::TouchStatus OnTouchEvent(ui::TouchEventImpl* event) OVERRIDE; |
143 virtual ui::GestureStatus OnGestureEvent(aura::GestureEvent* event) OVERRIDE; | 143 virtual ui::GestureStatus OnGestureEvent( |
| 144 ui::GestureEventImpl* event) OVERRIDE; |
144 virtual bool CanFocus() OVERRIDE; | 145 virtual bool CanFocus() OVERRIDE; |
145 virtual void OnCaptureLost() OVERRIDE; | 146 virtual void OnCaptureLost() OVERRIDE; |
146 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 147 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
147 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 148 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
148 virtual void OnWindowDestroying() OVERRIDE; | 149 virtual void OnWindowDestroying() OVERRIDE; |
149 virtual void OnWindowDestroyed() OVERRIDE; | 150 virtual void OnWindowDestroyed() OVERRIDE; |
150 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; | 151 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; |
151 virtual bool HasHitTestMask() const OVERRIDE; | 152 virtual bool HasHitTestMask() const OVERRIDE; |
152 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; | 153 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; |
153 | 154 |
154 // Overridden from aura::client::ActivationDelegate: | 155 // Overridden from aura::client::ActivationDelegate: |
155 virtual bool ShouldActivate(const aura::Event* event) OVERRIDE; | 156 virtual bool ShouldActivate(const ui::Event* event) OVERRIDE; |
156 virtual void OnActivated() OVERRIDE; | 157 virtual void OnActivated() OVERRIDE; |
157 virtual void OnLostActive() OVERRIDE; | 158 virtual void OnLostActive() OVERRIDE; |
158 | 159 |
159 // Overridden from aura::client::DragDropDelegate: | 160 // Overridden from aura::client::DragDropDelegate: |
160 virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE; | 161 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
161 virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE; | 162 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
162 virtual void OnDragExited() OVERRIDE; | 163 virtual void OnDragExited() OVERRIDE; |
163 virtual int OnPerformDrop(const aura::DropTargetEvent& event) OVERRIDE; | 164 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
164 | 165 |
165 protected: | 166 protected: |
166 virtual ~NativeWidgetAura(); | 167 virtual ~NativeWidgetAura(); |
167 | 168 |
168 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 169 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
169 | 170 |
170 private: | 171 private: |
171 class ActiveWindowObserver; | 172 class ActiveWindowObserver; |
172 | 173 |
173 void SetInitialFocus(); | 174 void SetInitialFocus(); |
(...skipping 28 matching lines...) Expand all Loading... |
202 | 203 |
203 scoped_ptr<DropHelper> drop_helper_; | 204 scoped_ptr<DropHelper> drop_helper_; |
204 int last_drop_operation_; | 205 int last_drop_operation_; |
205 | 206 |
206 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 207 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
207 }; | 208 }; |
208 | 209 |
209 } // namespace views | 210 } // namespace views |
210 | 211 |
211 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 212 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
OLD | NEW |