OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 6 |
| 7 #include "views/widget/native_widget_aura.h" |
| 8 |
| 9 class NativeConstrainedWindowAura : public NativeConstrainedWindow, |
| 10 public views::NativeWidgetAura { |
| 11 public: |
| 12 explicit NativeConstrainedWindowAura(NativeConstrainedWindowDelegate* delegate
) |
| 13 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), |
| 14 delegate_(delegate) { |
| 15 } |
| 16 |
| 17 virtual ~NativeConstrainedWindowAura() { |
| 18 } |
| 19 |
| 20 private: |
| 21 // Overridden from NativeConstrainedWindow: |
| 22 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { |
| 23 return this; |
| 24 } |
| 25 |
| 26 // Overridden from views::NativeWidgetAura: |
| 27 |
| 28 NativeConstrainedWindowDelegate* delegate_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(NativeConstrainedWindowAura); |
| 31 }; |
| 32 |
| 33 //////////////////////////////////////////////////////////////////////////////// |
| 34 // NativeConstrainedWindow, public: |
| 35 |
| 36 // static |
| 37 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( |
| 38 NativeConstrainedWindowDelegate* delegate) { |
| 39 return new NativeConstrainedWindowAura(delegate); |
| 40 } |
OLD | NEW |