| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
| 9 #include "ui/wm/core/wm_state.h" | |
| 10 | 9 |
| 11 #if !defined(OS_CHROMEOS) | 10 #if !defined(OS_CHROMEOS) |
| 12 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 13 #endif // !defined(OS_CHROMEOS) | 12 #endif // !defined(OS_CHROMEOS) |
| 14 | 13 |
| 15 | 14 |
| 16 namespace views { | 15 namespace views { |
| 17 | 16 |
| 18 TestViewsDelegate::TestViewsDelegate() | 17 TestViewsDelegate::TestViewsDelegate() |
| 19 : context_factory_(nullptr), | 18 : context_factory_(nullptr), |
| 20 use_desktop_native_widgets_(false), | 19 use_desktop_native_widgets_(false), |
| 21 use_transparent_windows_(false) { | 20 use_transparent_windows_(false) { |
| 22 #if defined(USE_AURA) | |
| 23 wm_state_.reset(new wm::WMState); | |
| 24 #endif | |
| 25 } | 21 } |
| 26 | 22 |
| 27 TestViewsDelegate::~TestViewsDelegate() { | 23 TestViewsDelegate::~TestViewsDelegate() { |
| 28 } | 24 } |
| 29 | 25 |
| 30 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| 31 HICON TestViewsDelegate::GetSmallWindowIcon() const { | 27 HICON TestViewsDelegate::GetSmallWindowIcon() const { |
| 32 return nullptr; | 28 return nullptr; |
| 33 } | 29 } |
| 34 #endif | 30 #endif |
| (...skipping 14 matching lines...) Expand all Loading... |
| 49 | 45 |
| 50 ui::ContextFactory* TestViewsDelegate::GetContextFactory() { | 46 ui::ContextFactory* TestViewsDelegate::GetContextFactory() { |
| 51 if (context_factory_) | 47 if (context_factory_) |
| 52 return context_factory_; | 48 return context_factory_; |
| 53 if (aura::Env::GetInstance()) | 49 if (aura::Env::GetInstance()) |
| 54 return aura::Env::GetInstance()->context_factory(); | 50 return aura::Env::GetInstance()->context_factory(); |
| 55 return nullptr; | 51 return nullptr; |
| 56 } | 52 } |
| 57 | 53 |
| 58 } // namespace views | 54 } // namespace views |
| OLD | NEW |