| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/views/constrained_window_views.h" | 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/aura_constants.h" | 7 #include "ui/aura/client/aura_constants.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/views/widget/native_widget_aura.h" | 9 #include "ui/views/widget/native_widget_aura.h" |
| 10 | 10 |
| 11 class NativeConstrainedWindowAura : public NativeConstrainedWindow, | 11 class NativeConstrainedWindowAura : public NativeConstrainedWindow, |
| 12 public views::NativeWidgetAura { | 12 public views::NativeWidgetAura { |
| 13 public: | 13 public: |
| 14 explicit NativeConstrainedWindowAura( | 14 explicit NativeConstrainedWindowAura( |
| 15 NativeConstrainedWindowDelegate* delegate) | 15 NativeConstrainedWindowDelegate* delegate) |
| 16 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), | 16 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate(), NULL), |
| 17 delegate_(delegate) { | 17 delegate_(delegate) { |
| 18 GetNativeWindow()->SetProperty(aura::client::kConstrainedWindowKey, true); | 18 GetNativeWindow()->SetProperty(aura::client::kConstrainedWindowKey, true); |
| 19 } | 19 } |
| 20 | 20 |
| 21 virtual ~NativeConstrainedWindowAura() { | 21 virtual ~NativeConstrainedWindowAura() { |
| 22 } | 22 } |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 // Overridden from NativeConstrainedWindow: | 25 // Overridden from NativeConstrainedWindow: |
| 26 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { | 26 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 //////////////////////////////////////////////////////////////////////////////// | 41 //////////////////////////////////////////////////////////////////////////////// |
| 42 // NativeConstrainedWindow, public: | 42 // NativeConstrainedWindow, public: |
| 43 | 43 |
| 44 // static | 44 // static |
| 45 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( | 45 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( |
| 46 NativeConstrainedWindowDelegate* delegate) { | 46 NativeConstrainedWindowDelegate* delegate) { |
| 47 return new NativeConstrainedWindowAura(delegate); | 47 return new NativeConstrainedWindowAura(delegate); |
| 48 } | 48 } |
| OLD | NEW |