| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/public/test/web_contents_tester.h" | 9 #include "content/public/test/web_contents_tester.h" |
| 10 #include "ui/wm/core/wm_state.h" | 10 #include "ui/wm/core/wm_state.h" |
| 11 | 11 |
| 12 #if !defined(OS_CHROMEOS) | 12 #if !defined(OS_CHROMEOS) |
| 13 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 13 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 14 #include "ui/views/widget/native_widget_aura.h" | 14 #include "ui/views/widget/native_widget_aura.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 | 18 |
| 19 TestViewsDelegate::TestViewsDelegate() | 19 TestViewsDelegate::TestViewsDelegate() |
| 20 : use_transparent_windows_(false) { | 20 : use_transparent_windows_(false) { |
| 21 DCHECK(!ViewsDelegate::views_delegate); | 21 DCHECK(!ViewsDelegate::views_delegate); |
| 22 ViewsDelegate::views_delegate = this; | 22 ViewsDelegate::views_delegate = this; |
| 23 wm_state_.reset(new views::corewm::WMState); | 23 wm_state_.reset(new wm::WMState); |
| 24 } | 24 } |
| 25 | 25 |
| 26 TestViewsDelegate::~TestViewsDelegate() { | 26 TestViewsDelegate::~TestViewsDelegate() { |
| 27 ViewsDelegate::views_delegate = NULL; | 27 ViewsDelegate::views_delegate = NULL; |
| 28 } | 28 } |
| 29 | 29 |
| 30 void TestViewsDelegate::SetUseTransparentWindows(bool transparent) { | 30 void TestViewsDelegate::SetUseTransparentWindows(bool transparent) { |
| 31 use_transparent_windows_ = transparent; | 31 use_transparent_windows_ = transparent; |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 else | 71 else |
| 72 params->opacity = Widget::InitParams::OPAQUE_WINDOW; | 72 params->opacity = Widget::InitParams::OPAQUE_WINDOW; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { | 76 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { |
| 77 return base::TimeDelta(); | 77 return base::TimeDelta(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace views | 80 } // namespace views |
| OLD | NEW |