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

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

Issue 149953003: Revert 247793 "Ensure GL initialization only happens once, and p..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "ui/aura/env.h" 12 #include "ui/aura/env.h"
13 #include "ui/base/ime/input_method_initializer.h" 13 #include "ui/base/ime/input_method_initializer.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/compositor/test/context_factories_for_test.h" 15 #include "ui/compositor/test/context_factories_for_test.h"
16 #include "ui/gfx/screen.h" 16 #include "ui/gfx/screen.h"
17 #include "ui/gl/gl_surface.h"
18 #include "ui/views/corewm/wm_state.h" 17 #include "ui/views/corewm/wm_state.h"
19 #include "ui/views/examples/example_base.h" 18 #include "ui/views/examples/example_base.h"
20 #include "ui/views/examples/examples_window.h" 19 #include "ui/views/examples/examples_window.h"
21 #include "ui/views/test/desktop_test_views_delegate.h" 20 #include "ui/views/test/desktop_test_views_delegate.h"
22 21
23 #if !defined(OS_CHROMEOS) 22 #if !defined(OS_CHROMEOS)
24 #include "ui/views/widget/desktop_aura/desktop_screen.h" 23 #include "ui/views/widget/desktop_aura/desktop_screen.h"
25 #endif 24 #endif
26 #if defined(OS_WIN) 25 #if defined(OS_WIN)
27 #include "ui/base/win/scoped_ole_initializer.h" 26 #include "ui/base/win/scoped_ole_initializer.h"
(...skipping 12 matching lines...) Expand all
40 base::i18n::InitializeICU(); 39 base::i18n::InitializeICU();
41 40
42 base::FilePath pak_dir; 41 base::FilePath pak_dir;
43 PathService::Get(base::DIR_MODULE, &pak_dir); 42 PathService::Get(base::DIR_MODULE, &pak_dir);
44 43
45 base::FilePath pak_file; 44 base::FilePath pak_file;
46 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 45 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
47 46
48 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 47 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
49 48
50 gfx::GLSurface::InitializeOneOff();
51
52 // The ContextFactory must exist before any Compositors are created. 49 // The ContextFactory must exist before any Compositors are created.
53 bool allow_test_contexts = false; 50 bool allow_test_contexts = false;
54 ui::InitializeContextFactoryForTests(allow_test_contexts); 51 ui::InitializeContextFactoryForTests(allow_test_contexts);
55 52
56 aura::Env::CreateInstance(); 53 aura::Env::CreateInstance();
57 54
58 ui::InitializeInputMethodForTesting(); 55 ui::InitializeInputMethodForTesting();
59 56
60 { 57 {
61 views::DesktopTestViewsDelegate views_delegate; 58 views::DesktopTestViewsDelegate views_delegate;
(...skipping 14 matching lines...) Expand all
76 73
77 ui::ResourceBundle::CleanupSharedInstance(); 74 ui::ResourceBundle::CleanupSharedInstance();
78 } 75 }
79 76
80 ui::ShutdownInputMethod(); 77 ui::ShutdownInputMethod();
81 78
82 aura::Env::DeleteInstance(); 79 aura::Env::DeleteInstance();
83 80
84 return 0; 81 return 0;
85 } 82 }
OLDNEW
« no previous file with comments | « trunk/src/ui/views/examples/DEPS ('k') | trunk/src/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698