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 VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
6 #define VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "aura/window_delegate.h" |
9 #include "views/widget/native_widget_private.h" | 10 #include "views/widget/native_widget_private.h" |
10 | 11 |
11 namespace views { | 12 namespace views { |
12 | 13 |
13 class NativeWidgetAura : public internal::NativeWidgetPrivate { | 14 class NativeWidgetAura : public internal::NativeWidgetPrivate, |
| 15 public aura::WindowDelegate { |
14 public: | 16 public: |
15 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 17 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); |
16 virtual ~NativeWidgetAura(); | 18 virtual ~NativeWidgetAura(); |
17 | 19 |
18 // Overridden from internal::NativeWidgetPrivate: | 20 // Overridden from internal::NativeWidgetPrivate: |
19 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; | 21 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; |
20 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 22 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
21 virtual void UpdateFrameAfterFrameChange() OVERRIDE; | 23 virtual void UpdateFrameAfterFrameChange() OVERRIDE; |
22 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 24 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
23 virtual void FrameTypeChanged() OVERRIDE; | 25 virtual void FrameTypeChanged() OVERRIDE; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const ui::OSExchangeData& data, | 92 const ui::OSExchangeData& data, |
91 int operation) OVERRIDE; | 93 int operation) OVERRIDE; |
92 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 94 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
93 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 95 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
94 virtual void ClearNativeFocus() OVERRIDE; | 96 virtual void ClearNativeFocus() OVERRIDE; |
95 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | 97 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; |
96 virtual bool ConvertPointFromAncestor( | 98 virtual bool ConvertPointFromAncestor( |
97 const Widget* ancestor, gfx::Point* point) const OVERRIDE; | 99 const Widget* ancestor, gfx::Point* point) const OVERRIDE; |
98 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; | 100 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; |
99 | 101 |
| 102 // Overridden from aura::WindowDelegate: |
| 103 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 104 |
100 private: | 105 private: |
| 106 internal::NativeWidgetDelegate* delegate_; |
| 107 |
| 108 aura::Window* window_; |
| 109 |
101 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 110 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
102 }; | 111 }; |
103 | 112 |
104 } // namespace views | 113 } // namespace views |
105 | 114 |
106 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 115 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
OLD | NEW |