| 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/window.h" |
| 7 #include "ui/views/widget/native_widget_aura.h" | 8 #include "ui/views/widget/native_widget_aura.h" |
| 8 | 9 |
| 9 class NativeConstrainedWindowAura : public NativeConstrainedWindow, | 10 class NativeConstrainedWindowAura : public NativeConstrainedWindow, |
| 10 public views::NativeWidgetAura { | 11 public views::NativeWidgetAura { |
| 11 public: | 12 public: |
| 12 explicit NativeConstrainedWindowAura( | 13 explicit NativeConstrainedWindowAura( |
| 13 NativeConstrainedWindowDelegate* delegate) | 14 NativeConstrainedWindowDelegate* delegate) |
| 14 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), | 15 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), |
| 15 delegate_(delegate) { | 16 delegate_(delegate) { |
| 17 GetNativeWindow()->set_is_constrained_window(true); |
| 16 } | 18 } |
| 17 | 19 |
| 18 virtual ~NativeConstrainedWindowAura() { | 20 virtual ~NativeConstrainedWindowAura() { |
| 19 } | 21 } |
| 20 | 22 |
| 21 private: | 23 private: |
| 22 // Overridden from NativeConstrainedWindow: | 24 // Overridden from NativeConstrainedWindow: |
| 23 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { | 25 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { |
| 24 return this; | 26 return this; |
| 25 } | 27 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
| 39 // NativeConstrainedWindow, public: | 41 // NativeConstrainedWindow, public: |
| 40 | 42 |
| 41 // static | 43 // static |
| 42 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( | 44 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( |
| 43 NativeConstrainedWindowDelegate* delegate) { | 45 NativeConstrainedWindowDelegate* delegate) { |
| 44 return new NativeConstrainedWindowAura(delegate); | 46 return new NativeConstrainedWindowAura(delegate); |
| 45 } | 47 } |
| OLD | NEW |