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

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: Tweaks 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 | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/common/chrome_switches.h » ('J')
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"
6 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 8 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
7 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h" 9 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h"
10 #include "chrome/common/chrome_switches.h"
8 #include "ui/aura/desktop.h" 11 #include "ui/aura/desktop.h"
9 #include "ui/aura_shell/shell.h" 12 #include "ui/aura_shell/shell.h"
13 #include "ui/gfx/compositor/compositor_setup.h"
10 14
11 #if defined(OS_CHROMEOS) 15 #if defined(OS_CHROMEOS)
12 #include "chrome/browser/chromeos/system/runtime_environment.h" 16 #include "chrome/browser/chromeos/system/runtime_environment.h"
13 #endif 17 #endif
14 18
15 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() 19 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura()
16 : ChromeBrowserMainExtraParts() { 20 : ChromeBrowserMainExtraParts() {
17 } 21 }
18 22
19 void ChromeBrowserMainExtraPartsAura::PostBrowserProcessInit() { 23 void ChromeBrowserMainExtraPartsAura::PostBrowserProcessInit() {
24 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestCompositor))
25 ui::SetupTestCompositor();
26
20 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
21 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) 28 if (chromeos::system::runtime_environment::IsRunningOnChromeOS())
22 aura::Desktop::set_use_fullscreen_host_window(true); 29 aura::Desktop::set_use_fullscreen_host_window(true);
23 #endif 30 #endif
24 31
25 // Shell takes ownership of ChromeShellDelegate. 32 // Shell takes ownership of ChromeShellDelegate.
26 aura_shell::Shell::CreateInstance(new ChromeShellDelegate); 33 aura_shell::Shell::CreateInstance(new ChromeShellDelegate);
27 34
28 // Make sure the singleton ScreenOrientationListener object is created. 35 // Make sure the singleton ScreenOrientationListener object is created.
29 ScreenOrientationListener::GetInstance(); 36 ScreenOrientationListener::GetInstance();
30 } 37 }
31 38
32 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 39 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
33 aura_shell::Shell::DeleteInstance(); 40 aura_shell::Shell::DeleteInstance();
34 aura::Desktop::DeleteInstance(); 41 aura::Desktop::DeleteInstance();
35 } 42 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/common/chrome_switches.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698