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

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

Issue 23536057: linux_aura: Implement most of DesktopScreenX11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt at fixing chromeos compile. Created 7 years, 3 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); 54 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop()));
55 if (!chrome::ShouldOpenAshOnStartup())
56 #endif 55 #endif
57 {
58 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
59 views::CreateDesktopScreen());
60 }
61 #endif 56 #endif
62 57
63 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) 58 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11)
64 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. 59 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
65 views::LinuxUI::SetInstance(BuildGtk2UI()); 60 views::LinuxUI::SetInstance(BuildGtk2UI());
66 #endif 61 #endif
67 } 62 }
68 63
64 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() {
65 #if !defined(OS_CHROMEOS)
66 #if defined(USE_ASH)
67 if (!chrome::ShouldOpenAshOnStartup())
68 #endif
69 {
70 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
71 views::CreateDesktopScreen());
72 }
73 #endif
74 }
75
69 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 76 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
70 active_desktop_monitor_.reset(); 77 active_desktop_monitor_.reset();
71 78
72 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown 79 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown
73 // after the metrics service is deleted. 80 // after the metrics service is deleted.
74 } 81 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h ('k') | chromeos/display/output_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698