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

Side by Side Diff: ash/mus/sysui_application.cc

Issue 1760743002: Add simple mash context menu support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; use test items; cleanup. Created 4 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/mus/sysui_application.h" 5 #include "ash/mus/sysui_application.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/host/ash_window_tree_host_init_params.h" 8 #include "ash/host/ash_window_tree_host_init_params.h"
9 #include "ash/host/ash_window_tree_host_platform.h" 9 #include "ash/host/ash_window_tree_host_platform.h"
10 #include "ash/mus/keyboard_ui_mus.h" 10 #include "ash/mus/keyboard_ui_mus.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash 186 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash
187 // installs and uses the ScreenAsh. This can be removed once ash learns to 187 // installs and uses the ScreenAsh. This can be removed once ash learns to
188 // talk to mus for managing displays. 188 // talk to mus for managing displays.
189 gfx::Screen::SetScreenInstance(nullptr); 189 gfx::Screen::SetScreenInstance(nullptr);
190 190
191 // Install some hook so that the WindowTreeHostMus created for widgets can 191 // Install some hook so that the WindowTreeHostMus created for widgets can
192 // be hooked up correctly. 192 // be hooked up correctly.
193 native_widget_factory_.reset(new NativeWidgetFactory()); 193 native_widget_factory_.reset(new NativeWidgetFactory());
194 194
195 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); 195 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus));
196 ash_delegate_ = new ShellDelegateMus; 196 ash_delegate_ = new ShellDelegateMus(connector);
197 197
198 InitializeComponents(); 198 InitializeComponents();
199 199
200 ash::ShellInitParams init_params; 200 ash::ShellInitParams init_params;
201 init_params.delegate = ash_delegate_; 201 init_params.delegate = ash_delegate_;
202 init_params.context_factory = new StubContextFactory; 202 init_params.context_factory = new StubContextFactory;
203 init_params.blocking_pool = worker_pool_.get(); 203 init_params.blocking_pool = worker_pool_.get();
204 init_params.in_mus = true; 204 init_params.in_mus = true;
205 init_params.keyboard_factory = 205 init_params.keyboard_factory =
206 base::Bind(&KeyboardUIMus::Create, connector); 206 base::Bind(&KeyboardUIMus::Create, connector);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { 288 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) {
289 return true; 289 return true;
290 } 290 }
291 291
292 void SysUIApplication::ShellConnectionLost() { 292 void SysUIApplication::ShellConnectionLost() {
293 base::MessageLoop::current()->QuitWhenIdle(); 293 base::MessageLoop::current()->QuitWhenIdle();
294 } 294 }
295 295
296 } // namespace sysui 296 } // namespace sysui
297 } // namespace ash 297 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698