| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 void set_use_transparent_windows(bool transparent) { | 28 void set_use_transparent_windows(bool transparent) { |
| 29 use_transparent_windows_ = transparent; | 29 use_transparent_windows_ = transparent; |
| 30 } | 30 } |
| 31 | 31 |
| 32 // Allows tests to provide a ContextFactory via the ViewsDelegate interface. | 32 // Allows tests to provide a ContextFactory via the ViewsDelegate interface. |
| 33 void set_context_factory(ui::ContextFactory* context_factory) { | 33 void set_context_factory(ui::ContextFactory* context_factory) { |
| 34 context_factory_ = context_factory; | 34 context_factory_ = context_factory; |
| 35 } | 35 } |
| 36 | 36 |
| 37 void set_context_factory_private( |
| 38 ui::ContextFactoryPrivate* context_factory_private) { |
| 39 context_factory_private_ = context_factory_private; |
| 40 } |
| 41 |
| 37 // ViewsDelegate: | 42 // ViewsDelegate: |
| 38 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 39 HICON GetSmallWindowIcon() const override; | 44 HICON GetSmallWindowIcon() const override; |
| 40 #endif | 45 #endif |
| 41 void OnBeforeWidgetInit(Widget::InitParams* params, | 46 void OnBeforeWidgetInit(Widget::InitParams* params, |
| 42 internal::NativeWidgetDelegate* delegate) override; | 47 internal::NativeWidgetDelegate* delegate) override; |
| 43 ui::ContextFactory* GetContextFactory() override; | 48 ui::ContextFactory* GetContextFactory() override; |
| 49 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; |
| 44 | 50 |
| 45 private: | 51 private: |
| 46 ui::ContextFactory* context_factory_; | 52 ui::ContextFactory* context_factory_; |
| 53 ui::ContextFactoryPrivate* context_factory_private_; |
| 47 bool use_desktop_native_widgets_; | 54 bool use_desktop_native_widgets_; |
| 48 bool use_transparent_windows_; | 55 bool use_transparent_windows_; |
| 49 | 56 |
| 50 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); | 57 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); |
| 51 }; | 58 }; |
| 52 | 59 |
| 53 } // namespace views | 60 } // namespace views |
| 54 | 61 |
| 55 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ | 62 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ |
| OLD | NEW |