| 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_VIEWS_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ |
| 6 #define VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "views/widget/native_widget.h" | 10 #include "views/widget/native_widget.h" |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 namespace internal { | 13 namespace internal { |
| 14 class NativeWidgetView; | 14 class NativeWidgetView; |
| 15 } | 15 } |
| 16 | 16 |
| 17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
| 18 // NativeWidgetViews | 18 // NativeWidgetViews |
| 19 // | 19 // |
| 20 // A NativeWidget implementation that uses another View as its native widget. | 20 // A NativeWidget implementation that uses another View as its native widget. |
| 21 // | 21 // |
| 22 class NativeWidgetViews : public NativeWidget { | 22 class NativeWidgetViews : public NativeWidget { |
| 23 public: | 23 public: |
| 24 NativeWidgetViews(View* host, internal::NativeWidgetDelegate* delegate); | 24 NativeWidgetViews(View* host, internal::NativeWidgetDelegate* delegate); |
| 25 virtual ~NativeWidgetViews(); | 25 virtual ~NativeWidgetViews(); |
| 26 | 26 |
| 27 // TODO(beng): remove. | 27 // TODO(beng): remove. |
| 28 View* GetView(); | 28 View* GetView(); |
| 29 const View* GetView() const; |
| 29 | 30 |
| 30 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 31 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 // Overridden from NativeWidget: | 34 // Overridden from NativeWidget: |
| 34 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; | 35 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; |
| 35 virtual Widget* GetWidget() OVERRIDE; | 36 virtual Widget* GetWidget() OVERRIDE; |
| 36 virtual const Widget* GetWidget() const OVERRIDE; | 37 virtual const Widget* GetWidget() const OVERRIDE; |
| 37 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 38 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 38 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 39 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // The following factory is used for calls to close the NativeWidgetViews | 88 // The following factory is used for calls to close the NativeWidgetViews |
| 88 // instance. | 89 // instance. |
| 89 ScopedRunnableMethodFactory<NativeWidgetViews> close_widget_factory_; | 90 ScopedRunnableMethodFactory<NativeWidgetViews> close_widget_factory_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViews); | 92 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViews); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } | 95 } |
| 95 | 96 |
| 96 #endif // VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ | 97 #endif // VIEWS_WIDGET_NATIVE_WIDGET_VIEWS_H_ |
| OLD | NEW |