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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.h

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add animation_host.* Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ui/aura/client/activation_change_observer.h" 9 #include "ui/aura/client/activation_change_observer.h"
10 #include "ui/aura/client/activation_delegate.h" 10 #include "ui/aura/client/activation_delegate.h"
11 #include "ui/aura/client/animation_host.h"
11 #include "ui/aura/client/drag_drop_delegate.h" 12 #include "ui/aura/client/drag_drop_delegate.h"
12 #include "ui/aura/client/focus_change_observer.h" 13 #include "ui/aura/client/focus_change_observer.h"
13 #include "ui/aura/window_delegate.h" 14 #include "ui/aura/window_delegate.h"
14 #include "ui/views/ime/input_method_delegate.h" 15 #include "ui/views/ime/input_method_delegate.h"
15 #include "ui/views/widget/native_widget_private.h" 16 #include "ui/views/widget/native_widget_private.h"
16 17
17 namespace aura { 18 namespace aura {
18 class RootWindow; 19 class RootWindow;
19 namespace client { 20 namespace client {
20 class StackingClient; 21 class StackingClient;
21 } 22 }
22 } 23 }
23 24
24 namespace views { 25 namespace views {
25 26
26 namespace corewm { 27 namespace corewm {
27 class CompoundEventFilter; 28 class CompoundEventFilter;
28 class InputMethodEventFilter; 29 class InputMethodEventFilter;
29 class ShadowController; 30 class ShadowController;
30 class TooltipController; 31 class TooltipController;
32 class VisibilityController;
31 } 33 }
32 34
33 class DesktopRootWindowHost; 35 class DesktopRootWindowHost;
34 class DropHelper; 36 class DropHelper;
35 class NativeWidgetAuraWindowObserver; 37 class NativeWidgetAuraWindowObserver;
36 class TooltipManagerAura; 38 class TooltipManagerAura;
37 39
38 // TODO(erg): May also need to be a DragDropDelegate 40 // TODO(erg): May also need to be a DragDropDelegate
39 class VIEWS_EXPORT DesktopNativeWidgetAura 41 class VIEWS_EXPORT DesktopNativeWidgetAura
40 : public internal::NativeWidgetPrivate, 42 : public internal::NativeWidgetPrivate,
41 public aura::WindowDelegate, 43 public aura::WindowDelegate,
42 public aura::client::ActivationDelegate, 44 public aura::client::ActivationDelegate,
43 public aura::client::ActivationChangeObserver, 45 public aura::client::ActivationChangeObserver,
44 public aura::client::FocusChangeObserver, 46 public aura::client::FocusChangeObserver,
47 public aura::client::AnimationHost,
45 public views::internal::InputMethodDelegate, 48 public views::internal::InputMethodDelegate,
46 public aura::client::DragDropDelegate { 49 public aura::client::DragDropDelegate {
47 public: 50 public:
48 explicit DesktopNativeWidgetAura(internal::NativeWidgetDelegate* delegate); 51 explicit DesktopNativeWidgetAura(internal::NativeWidgetDelegate* delegate);
49 virtual ~DesktopNativeWidgetAura(); 52 virtual ~DesktopNativeWidgetAura();
50 53
51 // Maps from window to DesktopNativeWidgetAura. 54 // Maps from window to DesktopNativeWidgetAura.
52 static DesktopNativeWidgetAura* ForWindow(aura::Window* window); 55 static DesktopNativeWidgetAura* ForWindow(aura::Window* window);
53 56
54 // Called by our DesktopRootWindowHost after it has deleted native resources; 57 // Called by our DesktopRootWindowHost after it has deleted native resources;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 virtual void OnCaptureLost() OVERRIDE; 162 virtual void OnCaptureLost() OVERRIDE;
160 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 163 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
161 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 164 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
162 virtual void OnWindowDestroying() OVERRIDE; 165 virtual void OnWindowDestroying() OVERRIDE;
163 virtual void OnWindowDestroyed() OVERRIDE; 166 virtual void OnWindowDestroyed() OVERRIDE;
164 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; 167 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
165 virtual bool HasHitTestMask() const OVERRIDE; 168 virtual bool HasHitTestMask() const OVERRIDE;
166 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; 169 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
167 virtual scoped_refptr<ui::Texture> CopyTexture() OVERRIDE; 170 virtual scoped_refptr<ui::Texture> CopyTexture() OVERRIDE;
168 171
172 // Overridden from aura::WindowAnimationHost
173 virtual void SetHostTransitionBounds(const gfx::Rect& bounds) OVERRIDE;
174 virtual void OnWindowHidingAnimationCompleted() OVERRIDE;
175
169 // Overridden from ui::EventHandler: 176 // Overridden from ui::EventHandler:
170 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; 177 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
171 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; 178 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
172 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; 179 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
173 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; 180 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
174 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 181 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
175 182
176 // Overridden from aura::client::ActivationDelegate: 183 // Overridden from aura::client::ActivationDelegate:
177 virtual bool ShouldActivate() const OVERRIDE; 184 virtual bool ShouldActivate() const OVERRIDE;
178 185
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 corewm::CompoundEventFilter* root_window_event_filter_; 228 corewm::CompoundEventFilter* root_window_event_filter_;
222 229
223 scoped_ptr<corewm::InputMethodEventFilter> input_method_event_filter_; 230 scoped_ptr<corewm::InputMethodEventFilter> input_method_event_filter_;
224 231
225 scoped_ptr<DropHelper> drop_helper_; 232 scoped_ptr<DropHelper> drop_helper_;
226 int last_drop_operation_; 233 int last_drop_operation_;
227 234
228 scoped_ptr<corewm::TooltipController> tooltip_controller_; 235 scoped_ptr<corewm::TooltipController> tooltip_controller_;
229 scoped_ptr<TooltipManagerAura> tooltip_manager_; 236 scoped_ptr<TooltipManagerAura> tooltip_manager_;
230 237
238 scoped_ptr<views::corewm::VisibilityController> visibility_controller_;
239
231 // See comments in OnLostActive(). 240 // See comments in OnLostActive().
232 bool restore_focus_on_activate_; 241 bool restore_focus_on_activate_;
233 242
234 scoped_ptr<corewm::ShadowController> shadow_controller_; 243 scoped_ptr<corewm::ShadowController> shadow_controller_;
235 244
245 // When Close()d and animations are being applied to this window, the close
246 // of the host window needs to be deferred to when the close animation is
247 // completed. This variable indicates that a Close was converted to a Hide,
248 // so that when the Hide is completed the host window should be closed.
249 bool pending_close_;
250
236 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); 251 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
237 }; 252 };
238 253
239 } // namespace views 254 } // namespace views
240 255
241 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 256 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698