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 #ifndef UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ | 5 #ifndef UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ |
6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ | 6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/views/views_delegate.h" | 9 #include "ui/views/views_delegate.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // DesktopNativeWidgetAura instead of whatever the default native widget would | 23 // DesktopNativeWidgetAura instead of whatever the default native widget would |
24 // be. This has no effect on ChromeOS. | 24 // be. This has no effect on ChromeOS. |
25 void set_use_desktop_native_widgets(bool desktop) { | 25 void set_use_desktop_native_widgets(bool desktop) { |
26 use_desktop_native_widgets_ = desktop; | 26 use_desktop_native_widgets_ = desktop; |
27 } | 27 } |
28 | 28 |
29 void set_use_transparent_windows(bool transparent) { | 29 void set_use_transparent_windows(bool transparent) { |
30 use_transparent_windows_ = transparent; | 30 use_transparent_windows_ = transparent; |
31 } | 31 } |
32 | 32 |
33 #if defined(USE_AURA) | |
34 void set_context_factory(ui::ContextFactory* context_factory) { | |
35 context_factory_ = context_factory; | |
36 } | |
37 #endif | |
38 | |
39 // ViewsDelegate: | 33 // ViewsDelegate: |
40 virtual void OnBeforeWidgetInit( | 34 virtual void OnBeforeWidgetInit( |
41 Widget::InitParams* params, | 35 Widget::InitParams* params, |
42 internal::NativeWidgetDelegate* delegate) OVERRIDE; | 36 internal::NativeWidgetDelegate* delegate) OVERRIDE; |
43 #if defined(USE_AURA) | |
44 virtual ui::ContextFactory* GetContextFactory() OVERRIDE; | |
45 #endif | |
46 | 37 |
47 private: | 38 private: |
48 bool use_desktop_native_widgets_; | 39 bool use_desktop_native_widgets_; |
49 | 40 |
50 bool use_transparent_windows_; | 41 bool use_transparent_windows_; |
51 | 42 |
52 #if defined(USE_AURA) | 43 #if defined(USE_AURA) |
53 scoped_ptr<wm::WMState> wm_state_; | 44 scoped_ptr<wm::WMState> wm_state_; |
54 | 45 |
55 ui::ContextFactory* context_factory_; | 46 ui::ContextFactory* context_factory_; |
56 #endif | 47 #endif |
57 | 48 |
58 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); |
59 }; | 50 }; |
60 | 51 |
61 } // namespace views | 52 } // namespace views |
62 | 53 |
63 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ | 54 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ |
OLD | NEW |