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

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

Issue 2821203002: cros: Adds ShellPort functions for simplified display mode (Closed)
Patch Set: cleanup 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
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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "ash/wm/workspace/workspace_event_handler_aura.h" 47 #include "ash/wm/workspace/workspace_event_handler_aura.h"
48 #include "ash/wm_window.h" 48 #include "ash/wm_window.h"
49 #include "base/memory/ptr_util.h" 49 #include "base/memory/ptr_util.h"
50 #include "components/user_manager/user_info_impl.h" 50 #include "components/user_manager/user_info_impl.h"
51 #include "ui/aura/env.h" 51 #include "ui/aura/env.h"
52 #include "ui/aura/mus/window_tree_client.h" 52 #include "ui/aura/mus/window_tree_client.h"
53 #include "ui/aura/mus/window_tree_host_mus.h" 53 #include "ui/aura/mus/window_tree_host_mus.h"
54 #include "ui/aura/window.h" 54 #include "ui/aura/window.h"
55 #include "ui/display/manager/managed_display_info.h" 55 #include "ui/display/manager/managed_display_info.h"
56 #include "ui/display/screen.h" 56 #include "ui/display/screen.h"
57 #include "ui/display/types/native_display_delegate.h"
57 #include "ui/views/mus/pointer_watcher_event_router.h" 58 #include "ui/views/mus/pointer_watcher_event_router.h"
58 59
59 namespace ash { 60 namespace ash {
60 namespace mus { 61 namespace mus {
61 62
62 namespace { 63 namespace {
63 64
64 // TODO(jamescook): After ShellDelegate is ported to ash/common use 65 // TODO(jamescook): After ShellDelegate is ported to ash/common use
65 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version 66 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version
66 // of SessionStateDelegate. 67 // of SessionStateDelegate.
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 417
417 void ShellPortMash::CreatePointerWatcherAdapter() { 418 void ShellPortMash::CreatePointerWatcherAdapter() {
418 // In Config::MUS PointerWatcherAdapter must be created when this function is 419 // 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. 420 // called (it is order dependent), that is not the case with Config::MASH.
420 if (GetAshConfig() == Config::MUS) { 421 if (GetAshConfig() == Config::MUS) {
421 mus_state_->pointer_watcher_adapter = 422 mus_state_->pointer_watcher_adapter =
422 base::MakeUnique<PointerWatcherAdapter>(); 423 base::MakeUnique<PointerWatcherAdapter>();
423 } 424 }
424 } 425 }
425 426
427 AshWindowTreeHost* ShellPortMash::CreateAshWindowTreeHost(
428 const AshWindowTreeHostInitParams& init_params) {
429 return nullptr;
430 }
431
426 void ShellPortMash::CreatePrimaryHost() {} 432 void ShellPortMash::CreatePrimaryHost() {}
427 433
428 void ShellPortMash::InitHosts(const ShellInitParams& init_params) { 434 void ShellPortMash::InitHosts(const ShellInitParams& init_params) {
429 window_manager_->CreatePrimaryRootWindowController( 435 window_manager_->CreatePrimaryRootWindowController(
430 base::WrapUnique(init_params.primary_window_tree_host)); 436 base::WrapUnique(init_params.primary_window_tree_host));
431 } 437 }
432 438
439 std::unique_ptr<display::NativeDisplayDelegate>
440 ShellPortMash::CreateNativeDisplayDelegate() {
441 return nullptr;
442 }
443
433 std::unique_ptr<AcceleratorController> 444 std::unique_ptr<AcceleratorController>
434 ShellPortMash::CreateAcceleratorController() { 445 ShellPortMash::CreateAcceleratorController() {
435 if (GetAshConfig() == Config::MUS) { 446 if (GetAshConfig() == Config::MUS) {
436 DCHECK(!mus_state_->accelerator_controller_delegate); 447 DCHECK(!mus_state_->accelerator_controller_delegate);
437 mus_state_->accelerator_controller_delegate = 448 mus_state_->accelerator_controller_delegate =
438 base::MakeUnique<AcceleratorControllerDelegateAura>(); 449 base::MakeUnique<AcceleratorControllerDelegateAura>();
439 return base::MakeUnique<AcceleratorController>( 450 return base::MakeUnique<AcceleratorController>(
440 mus_state_->accelerator_controller_delegate.get(), nullptr); 451 mus_state_->accelerator_controller_delegate.get(), nullptr);
441 } 452 }
442 453
(...skipping 11 matching lines...) Expand all
454 mash_state_->accelerator_controller_registrar = 465 mash_state_->accelerator_controller_registrar =
455 base ::MakeUnique<AcceleratorControllerRegistrar>( 466 base ::MakeUnique<AcceleratorControllerRegistrar>(
456 window_manager_, accelerator_namespace_id); 467 window_manager_, accelerator_namespace_id);
457 return base::MakeUnique<AcceleratorController>( 468 return base::MakeUnique<AcceleratorController>(
458 mash_state_->accelerator_controller_delegate.get(), 469 mash_state_->accelerator_controller_delegate.get(),
459 mash_state_->accelerator_controller_registrar.get()); 470 mash_state_->accelerator_controller_registrar.get());
460 } 471 }
461 472
462 } // namespace mus 473 } // namespace mus
463 } // namespace ash 474 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698