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

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

Issue 2250863003: exo: Run exo in mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 4 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
« no previous file with comments | « no previous file | components/exo/BUILD.gn » ('j') | components/exo/wm_helper.cc » ('J')
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); } 103 void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
104 104
105 private: 105 private:
106 base::MessagePumpLibevent::FileDescriptorWatcher controller_; 106 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
107 exo::wayland::Server* const server_; 107 exo::wayland::Server* const server_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(WaylandWatcher); 109 DISALLOW_COPY_AND_ASSIGN(WaylandWatcher);
110 }; 110 };
111 #endif 111 #endif
112 112
113 ChromeBrowserMainExtraPartsExo::ChromeBrowserMainExtraPartsExo() 113 ChromeBrowserMainExtraPartsExo::ChromeBrowserMainExtraPartsExo() {}
114 : arc_notification_surface_manager_(new arc::ArcNotificationSurfaceManager),
115 display_(new exo::Display(arc_notification_surface_manager_.get())) {}
116 114
117 ChromeBrowserMainExtraPartsExo::~ChromeBrowserMainExtraPartsExo() {} 115 ChromeBrowserMainExtraPartsExo::~ChromeBrowserMainExtraPartsExo() {}
118 116
119 void ChromeBrowserMainExtraPartsExo::PreProfileInit() { 117 void ChromeBrowserMainExtraPartsExo::PreProfileInit() {
120 if (!chrome::ShouldOpenAshOnStartup()) 118 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
119 switches::kEnableWaylandServer))
121 return; 120 return;
122 121
123 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 122 arc_notification_surface_manager_ =
124 switches::kEnableWaylandServer)) { 123 base::MakeUnique<arc::ArcNotificationSurfaceManager>();
125 wayland_server_ = exo::wayland::Server::Create(display_.get()); 124 const bool using_mus = !chrome::ShouldOpenAshOnStartup();
126 wayland_watcher_ = 125 display_ = base::MakeUnique<exo::Display>(
127 base::WrapUnique(new WaylandWatcher(wayland_server_.get())); 126 using_mus, arc_notification_surface_manager_.get());
128 } 127 wayland_server_ = exo::wayland::Server::Create(display_.get());
128 wayland_watcher_ = base::MakeUnique<WaylandWatcher>(wayland_server_.get());
129 } 129 }
130 130
131 void ChromeBrowserMainExtraPartsExo::PostMainMessageLoopRun() { 131 void ChromeBrowserMainExtraPartsExo::PostMainMessageLoopRun() {
132 wayland_watcher_.reset(); 132 wayland_watcher_.reset();
133 wayland_server_.reset(); 133 wayland_server_.reset();
134 } 134 }
OLDNEW
« no previous file with comments | « no previous file | components/exo/BUILD.gn » ('j') | components/exo/wm_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698