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

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

Issue 2562363002: exo: Add comment explaining why wayland server creation can fail. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_exo.h" 5 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 #if defined(USE_GLIB) 9 #if defined(USE_GLIB)
10 #include <glib.h> 10 #include <glib.h>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 arc_notification_surface_manager_ = 124 arc_notification_surface_manager_ =
125 base::MakeUnique<arc::ArcNotificationSurfaceManager>(); 125 base::MakeUnique<arc::ArcNotificationSurfaceManager>();
126 if (chrome::IsRunningInMash()) 126 if (chrome::IsRunningInMash())
127 wm_helper_ = base::MakeUnique<exo::WMHelperMus>(); 127 wm_helper_ = base::MakeUnique<exo::WMHelperMus>();
128 else 128 else
129 wm_helper_ = base::MakeUnique<exo::WMHelperAsh>(); 129 wm_helper_ = base::MakeUnique<exo::WMHelperAsh>();
130 exo::WMHelper::SetInstance(wm_helper_.get()); 130 exo::WMHelper::SetInstance(wm_helper_.get());
131 display_ = 131 display_ =
132 base::MakeUnique<exo::Display>(arc_notification_surface_manager_.get()); 132 base::MakeUnique<exo::Display>(arc_notification_surface_manager_.get());
133 wayland_server_ = exo::wayland::Server::Create(display_.get()); 133 wayland_server_ = exo::wayland::Server::Create(display_.get());
134 // Wayland server creation can fail if XDG_RUNTIME_DIR is not set correctly.
134 if (wayland_server_) 135 if (wayland_server_)
135 wayland_watcher_ = base::MakeUnique<WaylandWatcher>(wayland_server_.get()); 136 wayland_watcher_ = base::MakeUnique<WaylandWatcher>(wayland_server_.get());
136 } 137 }
137 138
138 void ChromeBrowserMainExtraPartsExo::PostMainMessageLoopRun() { 139 void ChromeBrowserMainExtraPartsExo::PostMainMessageLoopRun() {
139 wayland_watcher_.reset(); 140 wayland_watcher_.reset();
140 wayland_server_.reset(); 141 wayland_server_.reset();
141 if (wm_helper_) { 142 if (wm_helper_) {
142 exo::WMHelper::SetInstance(nullptr); 143 exo::WMHelper::SetInstance(nullptr);
143 wm_helper_.reset(); 144 wm_helper_.reset();
144 } 145 }
145 } 146 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698