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

Side by Side Diff: chrome/browser/chrome_browser_main_extra_parts_aura.cc

Issue 8805033: Makes tests either use mock compositor or mock WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback and tweaks for win_aura Created 9 years 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 | « build/all.gyp ('k') | chrome/chrome_dll.gypi » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chrome_browser_main_extra_parts_aura.h" 5 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h"
6
7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h"
6 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 9 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
7 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h" 10 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h"
8 #include "ui/aura/root_window.h" 11 #include "ui/aura/root_window.h"
9 #include "ui/aura_shell/shell.h" 12 #include "ui/aura_shell/shell.h"
10 13
11 #if defined(OS_CHROMEOS) 14 #if defined(OS_CHROMEOS)
12 #include "chrome/browser/chromeos/system/runtime_environment.h" 15 #include "chrome/browser/chromeos/system/runtime_environment.h"
13 #endif 16 #endif
14 17
18 #if defined(USE_WEBKIT_COMPOSITOR)
19 #include "ui/gfx/compositor/compositor_setup.h"
20 #else
21 #include "ui/gfx/test/gfx_test_utils.h"
22 #endif
23
15 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() 24 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura()
16 : ChromeBrowserMainExtraParts() { 25 : ChromeBrowserMainExtraParts() {
17 } 26 }
18 27
19 void ChromeBrowserMainExtraPartsAura::PostBrowserProcessInit() { 28 void ChromeBrowserMainExtraPartsAura::PostBrowserProcessInit() {
29 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestCompositor)) {
30 #if defined(USE_WEBKIT_COMPOSITOR)
31 ui::SetupTestCompositor();
32 #else
33 ui::gfx_test_utils::SetupTestCompositor();
34 #endif
35 }
36
20 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
21 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) 38 if (chromeos::system::runtime_environment::IsRunningOnChromeOS())
22 aura::RootWindow::set_use_fullscreen_host_window(true); 39 aura::RootWindow::set_use_fullscreen_host_window(true);
23 #endif 40 #endif
24 41
25 // Shell takes ownership of ChromeShellDelegate. 42 // Shell takes ownership of ChromeShellDelegate.
26 aura_shell::Shell::CreateInstance(new ChromeShellDelegate); 43 aura_shell::Shell::CreateInstance(new ChromeShellDelegate);
27 44
28 // Make sure the singleton ScreenOrientationListener object is created. 45 // Make sure the singleton ScreenOrientationListener object is created.
29 ScreenOrientationListener::GetInstance(); 46 ScreenOrientationListener::GetInstance();
30 } 47 }
31 48
32 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 49 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
33 aura_shell::Shell::DeleteInstance(); 50 aura_shell::Shell::DeleteInstance();
34 aura::RootWindow::DeleteInstance(); 51 aura::RootWindow::DeleteInstance();
35 } 52 }
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | chrome/chrome_dll.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698