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

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

Issue 10443091: Make BrowserMainParts have an empty implementation to make embedding easier. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/toolkit_extra_parts.h" 8 #include "chrome/browser/toolkit_extra_parts.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 10
11 #if !defined(USE_ASH) 11 #if !defined(USE_ASH)
12 #include "ui/aura/desktop/desktop_screen.h" 12 #include "ui/aura/desktop/desktop_screen.h"
13 #include "ui/aura/desktop/desktop_stacking_client.h" 13 #include "ui/aura/desktop/desktop_stacking_client.h"
14 #include "ui/aura/env.h" 14 #include "ui/aura/env.h"
15 #include "ui/aura/single_monitor_manager.h" 15 #include "ui/aura/single_monitor_manager.h"
16 #include "ui/gfx/screen.h" 16 #include "ui/gfx/screen.h"
17 #include "ui/views/widget/native_widget_aura.h" 17 #include "ui/views/widget/native_widget_aura.h"
18 #endif // !USE_ASH 18 #endif // !USE_ASH
19 19
20 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() 20 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() {
21 : ChromeBrowserMainExtraParts() {
22 } 21 }
23 22
24 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { 23 void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
25 #if !defined(USE_ASH) 24 #if !defined(USE_ASH)
26 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); 25 gfx::Screen::SetInstance(aura::CreateDesktopScreen());
27 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); 26 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
28 stacking_client_.reset(new aura::DesktopStackingClient); 27 stacking_client_.reset(new aura::DesktopStackingClient);
29 #endif // !USE_ASH 28 #endif // !USE_ASH
30 } 29 }
31 30
32 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 31 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
33 #if !defined(USE_ASH) 32 #if !defined(USE_ASH)
34 stacking_client_.reset(); 33 stacking_client_.reset();
35 #endif 34 #endif
36 35
37 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown 36 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown
38 // after the metrics service is deleted. 37 // after the metrics service is deleted.
39 } 38 }
40 39
41 namespace browser { 40 namespace browser {
42 41
43 void AddAuraToolkitExtraParts(ChromeBrowserMainParts* main_parts) { 42 void AddAuraToolkitExtraParts(ChromeBrowserMainParts* main_parts) {
44 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); 43 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura());
45 } 44 }
46 45
47 } // namespace browser 46 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts.cc ('k') | chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698