Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ui/aura/client/activation_delegate.h" | |
| 11 #include "ui/aura/client/window_drag_drop_delegate.h" | 12 #include "ui/aura/client/window_drag_drop_delegate.h" |
| 12 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
| 14 #include "ui/aura/window_observer.h" | |
|
sky
2011/12/09 23:11:23
I think you can move this to to the .cc.
| |
| 13 #include "ui/base/events.h" | 15 #include "ui/base/events.h" |
| 14 #include "ui/views/views_export.h" | 16 #include "ui/views/views_export.h" |
| 15 #include "ui/views/widget/native_widget_private.h" | 17 #include "ui/views/widget/native_widget_private.h" |
| 16 | 18 |
| 17 namespace aura { | 19 namespace aura { |
| 18 class Window; | 20 class Window; |
| 19 } | 21 } |
| 20 namespace gfx { | 22 namespace gfx { |
| 21 class Font; | 23 class Font; |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace views { | 26 namespace views { |
| 25 | 27 |
| 26 class DropHelper; | 28 class DropHelper; |
| 27 class TooltipManagerAura; | 29 class TooltipManagerAura; |
| 28 | 30 |
| 29 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, | 31 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, |
| 30 public aura::WindowDelegate, | 32 public aura::WindowDelegate, |
| 33 public aura::ActivationDelegate, | |
| 31 public aura::WindowDragDropDelegate { | 34 public aura::WindowDragDropDelegate { |
| 32 public: | 35 public: |
| 33 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 36 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); |
| 34 virtual ~NativeWidgetAura(); | 37 virtual ~NativeWidgetAura(); |
| 35 | 38 |
| 36 // TODO(beng): Find a better place for this, and the similar method on | 39 // TODO(beng): Find a better place for this, and the similar method on |
| 37 // NativeWidgetWin. | 40 // NativeWidgetWin. |
| 38 static gfx::Font GetWindowTitleFont(); | 41 static gfx::Font GetWindowTitleFont(); |
| 39 | 42 |
| 40 // Overridden from internal::NativeWidgetPrivate: | 43 // Overridden from internal::NativeWidgetPrivate: |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 128 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 126 const gfx::Rect& new_bounds) OVERRIDE; | 129 const gfx::Rect& new_bounds) OVERRIDE; |
| 127 virtual void OnFocus() OVERRIDE; | 130 virtual void OnFocus() OVERRIDE; |
| 128 virtual void OnBlur() OVERRIDE; | 131 virtual void OnBlur() OVERRIDE; |
| 129 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; | 132 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; |
| 130 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; | 133 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; |
| 131 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; | 134 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; |
| 132 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; | 135 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; |
| 133 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; | 136 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; |
| 134 virtual bool CanFocus() OVERRIDE; | 137 virtual bool CanFocus() OVERRIDE; |
| 135 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; | |
| 136 virtual void OnActivated() OVERRIDE; | |
| 137 virtual void OnLostActive() OVERRIDE; | |
| 138 virtual void OnCaptureLost() OVERRIDE; | 138 virtual void OnCaptureLost() OVERRIDE; |
| 139 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 139 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 140 virtual void OnWindowDestroying() OVERRIDE; | 140 virtual void OnWindowDestroying() OVERRIDE; |
| 141 virtual void OnWindowDestroyed() OVERRIDE; | 141 virtual void OnWindowDestroyed() OVERRIDE; |
| 142 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; | 142 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; |
| 143 | 143 |
| 144 // Overridden from aura::ActivationDelegate: | |
| 145 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; | |
| 146 virtual void OnActivated() OVERRIDE; | |
| 147 virtual void OnLostActive() OVERRIDE; | |
| 148 | |
| 144 // Overridden from aura::WindowDragDropDelegate: | 149 // Overridden from aura::WindowDragDropDelegate: |
| 145 virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE; | 150 virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE; |
| 146 virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE; | 151 virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE; |
| 147 virtual void OnDragExited() OVERRIDE; | 152 virtual void OnDragExited() OVERRIDE; |
| 148 virtual int OnPerformDrop(const aura::DropTargetEvent& event) OVERRIDE; | 153 virtual int OnPerformDrop(const aura::DropTargetEvent& event) OVERRIDE; |
| 149 | 154 |
| 150 protected: | 155 protected: |
| 151 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 156 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 152 | 157 |
| 153 private: | 158 private: |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 174 scoped_ptr<RootWindowObserverImpl> root_window_observer_; | 179 scoped_ptr<RootWindowObserverImpl> root_window_observer_; |
| 175 | 180 |
| 176 scoped_ptr<DropHelper> drop_helper_; | 181 scoped_ptr<DropHelper> drop_helper_; |
| 177 | 182 |
| 178 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 183 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 179 }; | 184 }; |
| 180 | 185 |
| 181 } // namespace views | 186 } // namespace views |
| 182 | 187 |
| 183 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 188 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |