| 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/activation_delegate.h" |
| 12 #include "ui/aura/client/window_drag_drop_delegate.h" | 12 #include "ui/aura/client/drag_drop_delegate.h" |
| 13 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
| 14 #include "ui/base/events.h" | 14 #include "ui/base/events.h" |
| 15 #include "ui/views/views_export.h" | 15 #include "ui/views/views_export.h" |
| 16 #include "ui/views/widget/native_widget_private.h" | 16 #include "ui/views/widget/native_widget_private.h" |
| 17 | 17 |
| 18 namespace aura { | 18 namespace aura { |
| 19 class Window; | 19 class Window; |
| 20 } | 20 } |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Font; | 22 class Font; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace views { | 25 namespace views { |
| 26 | 26 |
| 27 class DropHelper; | 27 class DropHelper; |
| 28 class TooltipManagerAura; | 28 class TooltipManagerAura; |
| 29 | 29 |
| 30 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, | 30 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, |
| 31 public aura::WindowDelegate, | 31 public aura::WindowDelegate, |
| 32 public aura::ActivationDelegate, | 32 public aura::ActivationDelegate, |
| 33 public aura::WindowDragDropDelegate { | 33 public aura::client::DragDropDelegate { |
| 34 public: | 34 public: |
| 35 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 35 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); |
| 36 virtual ~NativeWidgetAura(); | 36 virtual ~NativeWidgetAura(); |
| 37 | 37 |
| 38 // TODO(beng): Find a better place for this, and the similar method on | 38 // TODO(beng): Find a better place for this, and the similar method on |
| 39 // NativeWidgetWin. | 39 // NativeWidgetWin. |
| 40 static gfx::Font GetWindowTitleFont(); | 40 static gfx::Font GetWindowTitleFont(); |
| 41 | 41 |
| 42 // Overridden from internal::NativeWidgetPrivate: | 42 // Overridden from internal::NativeWidgetPrivate: |
| 43 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; | 43 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 138 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 139 virtual void OnWindowDestroying() OVERRIDE; | 139 virtual void OnWindowDestroying() OVERRIDE; |
| 140 virtual void OnWindowDestroyed() OVERRIDE; | 140 virtual void OnWindowDestroyed() OVERRIDE; |
| 141 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; | 141 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; |
| 142 | 142 |
| 143 // Overridden from aura::ActivationDelegate: | 143 // Overridden from aura::ActivationDelegate: |
| 144 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; | 144 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; |
| 145 virtual void OnActivated() OVERRIDE; | 145 virtual void OnActivated() OVERRIDE; |
| 146 virtual void OnLostActive() OVERRIDE; | 146 virtual void OnLostActive() OVERRIDE; |
| 147 | 147 |
| 148 // Overridden from aura::WindowDragDropDelegate: | 148 // Overridden from aura::client::DragDropDelegate: |
| 149 virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE; | 149 virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE; |
| 150 virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE; | 150 virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE; |
| 151 virtual void OnDragExited() OVERRIDE; | 151 virtual void OnDragExited() OVERRIDE; |
| 152 virtual int OnPerformDrop(const aura::DropTargetEvent& event) OVERRIDE; | 152 virtual int OnPerformDrop(const aura::DropTargetEvent& event) OVERRIDE; |
| 153 | 153 |
| 154 protected: | 154 protected: |
| 155 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 155 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 class ActiveWindowObserver; | 158 class ActiveWindowObserver; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 183 scoped_ptr<ActiveWindowObserver> active_window_observer_; | 183 scoped_ptr<ActiveWindowObserver> active_window_observer_; |
| 184 | 184 |
| 185 scoped_ptr<DropHelper> drop_helper_; | 185 scoped_ptr<DropHelper> drop_helper_; |
| 186 | 186 |
| 187 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 187 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 } // namespace views | 190 } // namespace views |
| 191 | 191 |
| 192 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 192 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |