Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/views/examples/examples_main.cc

Issue 9664069: Move scoped_ole_initializer.h to ui/base/win and clean up ole initialization/uninitialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/table/table_view_unittest.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h" 13 #include "ui/base/ui_base_paths.h"
14 #include "ui/views/examples/examples_window.h" 14 #include "ui/views/examples/examples_window.h"
15 #include "ui/views/focus/accelerator_handler.h" 15 #include "ui/views/focus/accelerator_handler.h"
16 #include "ui/views/test/test_views_delegate.h" 16 #include "ui/views/test/test_views_delegate.h"
17 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
18 18
19 #if defined(OS_WIN)
20 #include "ui/base/win/scoped_ole_initializer.h"
21 #endif
22
19 int main(int argc, char** argv) { 23 int main(int argc, char** argv) {
20 #if defined(OS_WIN) 24 #if defined(OS_WIN)
21 OleInitialize(NULL); 25 ui::ScopedOleInitializer ole_initializer;
22 #elif defined(OS_LINUX) 26 #elif defined(OS_LINUX)
23 // Initializes gtk stuff. 27 // Initializes gtk stuff.
24 g_type_init(); 28 g_type_init();
25 gtk_init(&argc, &argv); 29 gtk_init(&argc, &argv);
26 #endif 30 #endif
27 CommandLine::Init(argc, argv); 31 CommandLine::Init(argc, argv);
28 32
29 logging::InitLogging(NULL, 33 logging::InitLogging(NULL,
30 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 34 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
31 logging::LOCK_LOG_FILE, 35 logging::LOCK_LOG_FILE,
(...skipping 12 matching lines...) Expand all
44 48
45 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 49 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
46 50
47 views::TestViewsDelegate delegate; 51 views::TestViewsDelegate delegate;
48 52
49 views::examples::ShowExamplesWindow(true); 53 views::examples::ShowExamplesWindow(true);
50 54
51 views::AcceleratorHandler accelerator_handler; 55 views::AcceleratorHandler accelerator_handler;
52 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); 56 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler);
53 57
54 #if defined(OS_WIN)
55 OleUninitialize();
56 #endif
57 return 0; 58 return 0;
58 } 59 }
OLDNEW
« no previous file with comments | « ui/views/controls/table/table_view_unittest.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698