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

Side by Side Diff: ash/mus/bridge/shell_port_mash.cc

Issue 2821203002: cros: Adds ShellPort functions for simplified display mode (Closed)
Patch Set: Fix x11 build Created 3 years, 8 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 | « ash/mus/bridge/shell_port_mash.h ('k') | ash/shell_port.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bridge/shell_port_mash.h" 5 #include "ash/mus/bridge/shell_port_mash.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
11 #include "ash/aura/key_event_watcher_aura.h" 11 #include "ash/aura/key_event_watcher_aura.h"
12 #include "ash/aura/pointer_watcher_adapter.h" 12 #include "ash/aura/pointer_watcher_adapter.h"
13 #include "ash/host/ash_window_tree_host.h"
13 #include "ash/key_event_watcher.h" 14 #include "ash/key_event_watcher.h"
14 #include "ash/laser/laser_pointer_controller.h" 15 #include "ash/laser/laser_pointer_controller.h"
15 #include "ash/magnifier/partial_magnification_controller.h" 16 #include "ash/magnifier/partial_magnification_controller.h"
16 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" 17 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h"
17 #include "ash/mus/accelerators/accelerator_controller_registrar.h" 18 #include "ash/mus/accelerators/accelerator_controller_registrar.h"
18 #include "ash/mus/bridge/immersive_handler_factory_mus.h" 19 #include "ash/mus/bridge/immersive_handler_factory_mus.h"
19 #include "ash/mus/bridge/workspace_event_handler_mus.h" 20 #include "ash/mus/bridge/workspace_event_handler_mus.h"
20 #include "ash/mus/drag_window_resizer.h" 21 #include "ash/mus/drag_window_resizer.h"
21 #include "ash/mus/keyboard_ui_mus.h" 22 #include "ash/mus/keyboard_ui_mus.h"
22 #include "ash/mus/screen_mus.h" 23 #include "ash/mus/screen_mus.h"
(...skipping 24 matching lines...) Expand all
47 #include "ash/wm/workspace/workspace_event_handler_aura.h" 48 #include "ash/wm/workspace/workspace_event_handler_aura.h"
48 #include "ash/wm_window.h" 49 #include "ash/wm_window.h"
49 #include "base/memory/ptr_util.h" 50 #include "base/memory/ptr_util.h"
50 #include "components/user_manager/user_info_impl.h" 51 #include "components/user_manager/user_info_impl.h"
51 #include "ui/aura/env.h" 52 #include "ui/aura/env.h"
52 #include "ui/aura/mus/window_tree_client.h" 53 #include "ui/aura/mus/window_tree_client.h"
53 #include "ui/aura/mus/window_tree_host_mus.h" 54 #include "ui/aura/mus/window_tree_host_mus.h"
54 #include "ui/aura/window.h" 55 #include "ui/aura/window.h"
55 #include "ui/display/manager/managed_display_info.h" 56 #include "ui/display/manager/managed_display_info.h"
56 #include "ui/display/screen.h" 57 #include "ui/display/screen.h"
58 #include "ui/display/types/native_display_delegate.h"
57 #include "ui/views/mus/pointer_watcher_event_router.h" 59 #include "ui/views/mus/pointer_watcher_event_router.h"
58 60
59 namespace ash { 61 namespace ash {
60 namespace mus { 62 namespace mus {
61 63
62 namespace { 64 namespace {
63 65
64 // TODO(jamescook): After ShellDelegate is ported to ash/common use 66 // TODO(jamescook): After ShellDelegate is ported to ash/common use
65 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version 67 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version
66 // of SessionStateDelegate. 68 // of SessionStateDelegate.
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 418
417 void ShellPortMash::CreatePointerWatcherAdapter() { 419 void ShellPortMash::CreatePointerWatcherAdapter() {
418 // In Config::MUS PointerWatcherAdapter must be created when this function is 420 // In Config::MUS PointerWatcherAdapter must be created when this function is
419 // called (it is order dependent), that is not the case with Config::MASH. 421 // called (it is order dependent), that is not the case with Config::MASH.
420 if (GetAshConfig() == Config::MUS) { 422 if (GetAshConfig() == Config::MUS) {
421 mus_state_->pointer_watcher_adapter = 423 mus_state_->pointer_watcher_adapter =
422 base::MakeUnique<PointerWatcherAdapter>(); 424 base::MakeUnique<PointerWatcherAdapter>();
423 } 425 }
424 } 426 }
425 427
428 std::unique_ptr<AshWindowTreeHost> ShellPortMash::CreateAshWindowTreeHost(
429 const AshWindowTreeHostInitParams& init_params) {
430 return nullptr;
431 }
432
426 void ShellPortMash::CreatePrimaryHost() {} 433 void ShellPortMash::CreatePrimaryHost() {}
427 434
428 void ShellPortMash::InitHosts(const ShellInitParams& init_params) { 435 void ShellPortMash::InitHosts(const ShellInitParams& init_params) {
429 window_manager_->CreatePrimaryRootWindowController( 436 window_manager_->CreatePrimaryRootWindowController(
430 base::WrapUnique(init_params.primary_window_tree_host)); 437 base::WrapUnique(init_params.primary_window_tree_host));
431 } 438 }
432 439
440 std::unique_ptr<display::NativeDisplayDelegate>
441 ShellPortMash::CreateNativeDisplayDelegate() {
442 return nullptr;
443 }
444
433 std::unique_ptr<AcceleratorController> 445 std::unique_ptr<AcceleratorController>
434 ShellPortMash::CreateAcceleratorController() { 446 ShellPortMash::CreateAcceleratorController() {
435 if (GetAshConfig() == Config::MUS) { 447 if (GetAshConfig() == Config::MUS) {
436 DCHECK(!mus_state_->accelerator_controller_delegate); 448 DCHECK(!mus_state_->accelerator_controller_delegate);
437 mus_state_->accelerator_controller_delegate = 449 mus_state_->accelerator_controller_delegate =
438 base::MakeUnique<AcceleratorControllerDelegateAura>(); 450 base::MakeUnique<AcceleratorControllerDelegateAura>();
439 return base::MakeUnique<AcceleratorController>( 451 return base::MakeUnique<AcceleratorController>(
440 mus_state_->accelerator_controller_delegate.get(), nullptr); 452 mus_state_->accelerator_controller_delegate.get(), nullptr);
441 } 453 }
442 454
(...skipping 11 matching lines...) Expand all
454 mash_state_->accelerator_controller_registrar = 466 mash_state_->accelerator_controller_registrar =
455 base ::MakeUnique<AcceleratorControllerRegistrar>( 467 base ::MakeUnique<AcceleratorControllerRegistrar>(
456 window_manager_, accelerator_namespace_id); 468 window_manager_, accelerator_namespace_id);
457 return base::MakeUnique<AcceleratorController>( 469 return base::MakeUnique<AcceleratorController>(
458 mash_state_->accelerator_controller_delegate.get(), 470 mash_state_->accelerator_controller_delegate.get(),
459 mash_state_->accelerator_controller_registrar.get()); 471 mash_state_->accelerator_controller_registrar.get());
460 } 472 }
461 473
462 } // namespace mus 474 } // namespace mus
463 } // namespace ash 475 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/shell_port_mash.h ('k') | ash/shell_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698