| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/examples/examples_main.h" | 5 #include "views/examples/examples_main.h" |
| 6 | 6 |
| 7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/i18n/icu_util.h" | 11 #include "base/i18n/icu_util.h" |
| 12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
| 13 #include "views/controls/label.h" | 13 #include "views/controls/label.h" |
| 14 #include "views/controls/button/text_button.h" | 14 #include "views/controls/button/text_button.h" |
| 15 #include "views/examples/button_example.h" | 15 #include "views/examples/button_example.h" |
| 16 #include "views/examples/combobox_example.h" | 16 #include "views/examples/combobox_example.h" |
| 17 #include "views/examples/message_box_example.h" | 17 #include "views/examples/message_box_example.h" |
| 18 #include "views/examples/menu_example.h" | 18 #include "views/examples/menu_example.h" |
| 19 #include "views/examples/radio_button_example.h" | 19 #include "views/examples/radio_button_example.h" |
| 20 #include "views/examples/scroll_view_example.h" | 20 #include "views/examples/scroll_view_example.h" |
| 21 #include "views/examples/single_split_view_example.h" | 21 #include "views/examples/single_split_view_example.h" |
| 22 // Slider is not yet ported to Windows. | 22 // Slider is not yet ported to Windows. |
| 23 #if defined(OS_LINUX) | 23 #if defined(OS_LINUX) |
| 24 #include "views/controls/textfield/native_textfield_view.h" |
| 24 #include "views/examples/slider_example.h" | 25 #include "views/examples/slider_example.h" |
| 25 #endif | 26 #endif |
| 26 #include "views/examples/tabbed_pane_example.h" | 27 #include "views/examples/tabbed_pane_example.h" |
| 27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 28 // TableView is not yet ported to Linux. | 29 // TableView is not yet ported to Linux. |
| 29 #include "views/examples/table_example.h" | 30 #include "views/examples/table_example.h" |
| 30 #endif | 31 #endif |
| 31 #include "views/examples/table2_example.h" | 32 #include "views/examples/table2_example.h" |
| 32 #include "views/examples/textfield_example.h" | 33 #include "views/examples/textfield_example.h" |
| 33 #include "views/examples/throbber_example.h" | 34 #include "views/examples/throbber_example.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
| 161 OleInitialize(NULL); | 162 OleInitialize(NULL); |
| 162 #elif defined(OS_LINUX) | 163 #elif defined(OS_LINUX) |
| 163 // Initializes gtk stuff. | 164 // Initializes gtk stuff. |
| 164 g_thread_init(NULL); | 165 g_thread_init(NULL); |
| 165 g_type_init(); | 166 g_type_init(); |
| 166 gtk_init(&argc, &argv); | 167 gtk_init(&argc, &argv); |
| 167 #endif | 168 #endif |
| 168 | 169 |
| 169 CommandLine::Init(argc, argv); | 170 CommandLine::Init(argc, argv); |
| 171 |
| 172 #if defined(OS_LINUX) |
| 173 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-textfield-view")) |
| 174 views::NativeTextfieldView::SetEnableTextfieldView(true); |
| 175 #endif |
| 176 |
| 170 examples::ExamplesMain main; | 177 examples::ExamplesMain main; |
| 171 main.Run(); | 178 main.Run(); |
| 172 | 179 |
| 173 #if defined(OS_WIN) | 180 #if defined(OS_WIN) |
| 174 OleUninitialize(); | 181 OleUninitialize(); |
| 175 #endif | 182 #endif |
| 176 return 0; | 183 return 0; |
| 177 } | 184 } |
| OLD | NEW |