| 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 "ui/views/test/test_views_delegate.h" | 5 #include "ui/views/test/test_views_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/base/clipboard/clipboard.h" | 8 #include "ui/base/clipboard/clipboard.h" |
| 9 | 9 |
| 10 #if defined(USE_AURA) | |
| 11 #include "ui/views/widget/desktop_native_widget_helper_aura.h" | |
| 12 #endif | |
| 13 | |
| 14 namespace views { | 10 namespace views { |
| 15 | 11 |
| 16 TestViewsDelegate::TestViewsDelegate() | 12 TestViewsDelegate::TestViewsDelegate() |
| 17 : use_transparent_windows_(false) { | 13 : use_transparent_windows_(false) { |
| 18 DCHECK(!ViewsDelegate::views_delegate); | 14 DCHECK(!ViewsDelegate::views_delegate); |
| 19 ViewsDelegate::views_delegate = this; | 15 ViewsDelegate::views_delegate = this; |
| 20 } | 16 } |
| 21 | 17 |
| 22 TestViewsDelegate::~TestViewsDelegate() { | 18 TestViewsDelegate::~TestViewsDelegate() { |
| 23 ViewsDelegate::views_delegate = NULL; | 19 ViewsDelegate::views_delegate = NULL; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 54 } | 50 } |
| 55 | 51 |
| 56 bool TestViewsDelegate::UseTransparentWindows() const { | 52 bool TestViewsDelegate::UseTransparentWindows() const { |
| 57 return use_transparent_windows_; | 53 return use_transparent_windows_; |
| 58 } | 54 } |
| 59 | 55 |
| 60 int TestViewsDelegate::GetDispositionForEvent(int event_flags) { | 56 int TestViewsDelegate::GetDispositionForEvent(int event_flags) { |
| 61 return 0; | 57 return 0; |
| 62 } | 58 } |
| 63 | 59 |
| 64 #if defined(USE_AURA) | |
| 65 views::NativeWidgetHelperAura* TestViewsDelegate::CreateNativeWidgetHelper( | |
| 66 views::NativeWidgetAura* native_widget) { | |
| 67 return new views::DesktopNativeWidgetHelperAura(native_widget); | |
| 68 } | |
| 69 #endif | |
| 70 | |
| 71 } // namespace views | 60 } // namespace views |
| OLD | NEW |