| 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_EXAMPLES_EXAMPLES_WINDOW_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_H_ |
| 6 #define UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_H_ | 6 #define UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/views/examples/example_base.h" |
| 12 #include "ui/views/examples/views_examples_export.h" | 13 #include "ui/views/examples/views_examples_export.h" |
| 13 | 14 |
| 14 namespace views { | 15 namespace views { |
| 15 namespace examples { | 16 namespace examples { |
| 16 | 17 |
| 17 class ExampleBase; | |
| 18 | |
| 19 enum Operation { | 18 enum Operation { |
| 20 DO_NOTHING_ON_CLOSE = 0, | 19 DO_NOTHING_ON_CLOSE = 0, |
| 21 QUIT_ON_CLOSE, | 20 QUIT_ON_CLOSE, |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 // Shows a window with the views examples in it. |extra_examples| contains any | 23 // Shows a window with the views examples in it. |extra_examples| contains any |
| 25 // additional examples to add. |window_context| is used to determine where the | 24 // additional examples to add. |window_context| is used to determine where the |
| 26 // window should be created (see |Widget::InitParams::context| for details). | 25 // window should be created (see |Widget::InitParams::context| for details). |
| 27 VIEWS_EXAMPLES_EXPORT void ShowExamplesWindow( | 26 VIEWS_EXAMPLES_EXPORT void ShowExamplesWindow( |
| 28 Operation operation, | 27 Operation operation, |
| 29 gfx::NativeWindow window_context = nullptr, | 28 gfx::NativeWindow window_context = nullptr, |
| 30 std::vector<std::unique_ptr<ExampleBase>> extra_examples = | 29 std::vector<std::unique_ptr<ExampleBase>> extra_examples = |
| 31 std::vector<std::unique_ptr<ExampleBase>>()); | 30 std::vector<std::unique_ptr<ExampleBase>>()); |
| 32 | 31 |
| 33 } // namespace examples | 32 } // namespace examples |
| 34 } // namespace views | 33 } // namespace views |
| 35 | 34 |
| 36 #endif // UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_H_ | 35 #endif // UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_H_ |
| OLD | NEW |