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

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

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased no-op Created 7 years, 2 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 (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 "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" 5 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h"
6 6
7 #include "chrome/browser/chrome_browser_main.h" 7 #include "chrome/browser/chrome_browser_main.h"
8 #include "chrome/browser/ui/aura/active_desktop_monitor.h" 8 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
9 #include "chrome/browser/ui/host_desktop.h" 9 #include "chrome/browser/ui/host_desktop.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { 45 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() {
46 } 46 }
47 47
48 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() { 48 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() {
49 } 49 }
50 50
51 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { 51 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() {
52 #if !defined(OS_CHROMEOS) 52 #if !defined(OS_CHROMEOS)
53 #if defined(USE_ASH) 53 #if defined(USE_ASH)
54 aura::Env::CreateInstance();
54 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); 55 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop()));
55 #endif 56 #endif
56 #endif 57 #endif
57 58
58 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) 59 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11)
59 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. 60 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
60 views::LinuxUI::SetInstance(BuildGtk2UI()); 61 views::LinuxUI::SetInstance(BuildGtk2UI());
61 #endif 62 #endif
62 } 63 }
63 64
64 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() { 65 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() {
65 #if !defined(OS_CHROMEOS) 66 #if !defined(OS_CHROMEOS)
66 #if defined(USE_ASH) 67 #if defined(USE_ASH)
67 if (!chrome::ShouldOpenAshOnStartup()) 68 if (!chrome::ShouldOpenAshOnStartup())
68 #endif 69 #endif
69 { 70 {
70 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, 71 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
71 views::CreateDesktopScreen()); 72 views::CreateDesktopScreen());
72 } 73 }
73 #endif 74 #endif
74 } 75 }
75 76
76 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 77 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
77 active_desktop_monitor_.reset(); 78 active_desktop_monitor_.reset();
78 79
79 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown 80 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown
80 // after the metrics service is deleted. 81 // after the metrics service is deleted.
81 } 82 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_environment.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698