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 | 9 |
10 #if !defined(OS_CHROMEOS) | 10 #if !defined(OS_CHROMEOS) |
11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
12 #endif // !defined(OS_CHROMEOS) | 12 #endif // !defined(OS_CHROMEOS) |
13 | 13 |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 | 16 |
17 TestViewsDelegate::TestViewsDelegate() | 17 TestViewsDelegate::TestViewsDelegate() |
18 : context_factory_(nullptr), | 18 : context_factory_(nullptr), |
| 19 context_factory_private_(nullptr), |
19 use_desktop_native_widgets_(false), | 20 use_desktop_native_widgets_(false), |
20 use_transparent_windows_(false) { | 21 use_transparent_windows_(false) {} |
21 } | |
22 | 22 |
23 TestViewsDelegate::~TestViewsDelegate() { | 23 TestViewsDelegate::~TestViewsDelegate() { |
24 } | 24 } |
25 | 25 |
26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
27 HICON TestViewsDelegate::GetSmallWindowIcon() const { | 27 HICON TestViewsDelegate::GetSmallWindowIcon() const { |
28 return nullptr; | 28 return nullptr; |
29 } | 29 } |
30 #endif | 30 #endif |
31 | 31 |
(...skipping 12 matching lines...) Expand all Loading... |
44 } | 44 } |
45 | 45 |
46 ui::ContextFactory* TestViewsDelegate::GetContextFactory() { | 46 ui::ContextFactory* TestViewsDelegate::GetContextFactory() { |
47 if (context_factory_) | 47 if (context_factory_) |
48 return context_factory_; | 48 return context_factory_; |
49 if (aura::Env::GetInstance()) | 49 if (aura::Env::GetInstance()) |
50 return aura::Env::GetInstance()->context_factory(); | 50 return aura::Env::GetInstance()->context_factory(); |
51 return nullptr; | 51 return nullptr; |
52 } | 52 } |
53 | 53 |
| 54 ui::ContextFactoryPrivate* TestViewsDelegate::GetContextFactoryPrivate() { |
| 55 if (context_factory_private_) |
| 56 return context_factory_private_; |
| 57 if (aura::Env::GetInstance()) |
| 58 return aura::Env::GetInstance()->context_factory_private(); |
| 59 return nullptr; |
| 60 } |
| 61 |
54 } // namespace views | 62 } // namespace views |
OLD | NEW |