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

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

Issue 2652093002: mash: Make the power button shut the system down. (Closed)
Patch Set: add comment about CursorManager Created 3 years, 11 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/wm_shell_mus.h ('k') | ash/shell.cc » ('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/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/key_event_watcher.h" 10 #include "ash/common/key_event_watcher.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 SessionStateDelegateStub() 57 SessionStateDelegateStub()
58 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} 58 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {}
59 59
60 ~SessionStateDelegateStub() override {} 60 ~SessionStateDelegateStub() override {}
61 61
62 // SessionStateDelegate: 62 // SessionStateDelegate:
63 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } 63 int GetMaximumNumberOfLoggedInUsers() const override { return 3; }
64 int NumberOfLoggedInUsers() const override { return 1; } 64 int NumberOfLoggedInUsers() const override { return 1; }
65 bool IsActiveUserSessionStarted() const override { return true; } 65 bool IsActiveUserSessionStarted() const override { return true; }
66 bool CanLockScreen() const override { return true; } 66 bool CanLockScreen() const override {
67 // The Chrome OS session_manager process currently rejects screen-lock
68 // requests due to no user being logged in.
69 return false;
70 }
67 bool IsScreenLocked() const override { return screen_locked_; } 71 bool IsScreenLocked() const override { return screen_locked_; }
68 bool ShouldLockScreenAutomatically() const override { return false; } 72 bool ShouldLockScreenAutomatically() const override { return false; }
69 void LockScreen() override { 73 void LockScreen() override {
70 screen_locked_ = true; 74 screen_locked_ = true;
71 NOTIMPLEMENTED(); 75 NOTIMPLEMENTED();
72 } 76 }
73 void UnlockScreen() override { 77 void UnlockScreen() override {
74 NOTIMPLEMENTED(); 78 NOTIMPLEMENTED();
75 screen_locked_ = false; 79 screen_locked_ = false;
76 } 80 }
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // TODO: implement drags for mus pointer watcher, http://crbug.com/641164. 386 // TODO: implement drags for mus pointer watcher, http://crbug.com/641164.
383 // NOTIMPLEMENTED drags for mus pointer watcher. 387 // NOTIMPLEMENTED drags for mus pointer watcher.
384 pointer_watcher_event_router_->AddPointerWatcher( 388 pointer_watcher_event_router_->AddPointerWatcher(
385 watcher, events == views::PointerWatcherEventTypes::MOVES); 389 watcher, events == views::PointerWatcherEventTypes::MOVES);
386 } 390 }
387 391
388 void WmShellMus::RemovePointerWatcher(views::PointerWatcher* watcher) { 392 void WmShellMus::RemovePointerWatcher(views::PointerWatcher* watcher) {
389 pointer_watcher_event_router_->RemovePointerWatcher(watcher); 393 pointer_watcher_event_router_->RemovePointerWatcher(watcher);
390 } 394 }
391 395
392 void WmShellMus::RequestShutdown() {
393 NOTIMPLEMENTED();
394 }
395
396 bool WmShellMus::IsTouchDown() { 396 bool WmShellMus::IsTouchDown() {
397 // TODO: implement me, http://crbug.com/634967. 397 // TODO: implement me, http://crbug.com/634967.
398 // NOTIMPLEMENTED is too spammy here. 398 // NOTIMPLEMENTED is too spammy here.
399 return false; 399 return false;
400 } 400 }
401 401
402 void WmShellMus::ToggleIgnoreExternalKeyboard() { 402 void WmShellMus::ToggleIgnoreExternalKeyboard() {
403 NOTIMPLEMENTED(); 403 NOTIMPLEMENTED();
404 } 404 }
405 405
406 void WmShellMus::SetLaserPointerEnabled(bool enabled) { 406 void WmShellMus::SetLaserPointerEnabled(bool enabled) {
407 NOTIMPLEMENTED(); 407 NOTIMPLEMENTED();
408 } 408 }
409 409
410 void WmShellMus::CreatePointerWatcherAdapter() { 410 void WmShellMus::CreatePointerWatcherAdapter() {
411 // Only needed in WmShellAura, which has specific creation order. 411 // Only needed in WmShellAura, which has specific creation order.
412 } 412 }
413 413
414 void WmShellMus::CreatePrimaryHost() {} 414 void WmShellMus::CreatePrimaryHost() {}
415 415
416 void WmShellMus::InitHosts(const ShellInitParams& init_params) { 416 void WmShellMus::InitHosts(const ShellInitParams& init_params) {
417 window_manager_->CreatePrimaryRootWindowController( 417 window_manager_->CreatePrimaryRootWindowController(
418 base::WrapUnique(init_params.primary_window_tree_host)); 418 base::WrapUnique(init_params.primary_window_tree_host));
419 } 419 }
420 } // namespace mus 420 } // namespace mus
421 } // namespace ash 421 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698