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

Side by Side Diff: ash/common/wm_shell.h

Issue 2573703003: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: msw comments Created 3 years, 12 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/common/wm_root_window_controller.cc ('k') | ash/common/wm_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 #ifndef ASH_COMMON_WM_SHELL_H_ 5 #ifndef ASH_COMMON_WM_SHELL_H_
6 #define ASH_COMMON_WM_SHELL_H_ 6 #define ASH_COMMON_WM_SHELL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/common/metrics/gesture_action_type.h" 14 #include "ash/common/metrics/gesture_action_type.h"
15 #include "ash/common/metrics/user_metrics_action.h" 15 #include "ash/common/metrics/user_metrics_action.h"
16 #include "ash/common/session/session_state_observer.h"
16 #include "ash/common/wm/lock_state_observer.h" 17 #include "ash/common/wm/lock_state_observer.h"
17 #include "base/observer_list.h" 18 #include "base/observer_list.h"
18 #include "components/ui_devtools/devtools_server.h" 19 #include "components/ui_devtools/devtools_server.h"
19 #include "ui/base/ui_base_types.h" 20 #include "ui/base/ui_base_types.h"
20 #include "ui/compositor/layer_type.h" 21 #include "ui/compositor/layer_type.h"
21 #include "ui/wm/public/window_types.h" 22 #include "ui/wm/public/window_types.h"
22 23
23 namespace app_list { 24 namespace app_list {
24 class AppList; 25 class AppList;
25 } 26 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 class MaximizeModeEventHandler; 94 class MaximizeModeEventHandler;
94 class WindowState; 95 class WindowState;
95 } 96 }
96 97
97 #if defined(OS_CHROMEOS) 98 #if defined(OS_CHROMEOS)
98 class LogoutConfirmationController; 99 class LogoutConfirmationController;
99 class VpnList; 100 class VpnList;
100 #endif 101 #endif
101 102
102 // Similar to ash::Shell. Eventually the two will be merged. 103 // Similar to ash::Shell. Eventually the two will be merged.
103 class ASH_EXPORT WmShell { 104 class ASH_EXPORT WmShell : public SessionStateObserver {
104 public: 105 public:
105 // This is necessary for a handful of places that is difficult to plumb 106 // This is necessary for a handful of places that is difficult to plumb
106 // through context. 107 // through context.
107 static void Set(WmShell* instance); 108 static void Set(WmShell* instance);
108 static WmShell* Get(); 109 static WmShell* Get();
109 static bool HasInstance() { return instance_ != nullptr; } 110 static bool HasInstance() { return instance_ != nullptr; }
110 111
111 void Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool); 112 void Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool);
112 virtual void Shutdown(); 113 virtual void Shutdown();
113 114
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 CreateScopedDisableInternalMouseAndKeyboard() = 0; 337 CreateScopedDisableInternalMouseAndKeyboard() = 0;
337 338
338 virtual std::unique_ptr<ImmersiveFullscreenController> 339 virtual std::unique_ptr<ImmersiveFullscreenController>
339 CreateImmersiveFullscreenController() = 0; 340 CreateImmersiveFullscreenController() = 0;
340 341
341 virtual std::unique_ptr<KeyEventWatcher> CreateKeyEventWatcher() = 0; 342 virtual std::unique_ptr<KeyEventWatcher> CreateKeyEventWatcher() = 0;
342 343
343 // Initializes the appropriate shelves. Does nothing for any existing shelves. 344 // Initializes the appropriate shelves. Does nothing for any existing shelves.
344 void CreateShelf(); 345 void CreateShelf();
345 346
346 // Show shelf view if it was created hidden (before session has started).
347 void ShowShelf();
348
349 void CreateShelfDelegate(); 347 void CreateShelfDelegate();
350 348
351 // Called after maximize mode has started, windows might still animate though. 349 // Called after maximize mode has started, windows might still animate though.
352 void OnMaximizeModeStarted(); 350 void OnMaximizeModeStarted();
353 351
354 // Called after maximize mode has ended, windows might still be returning to 352 // Called after maximize mode has ended, windows might still be returning to
355 // their original position. 353 // their original position.
356 void OnMaximizeModeEnded(); 354 void OnMaximizeModeEnded();
357 355
358 // Called when the overview mode is about to be started (before the windows 356 // Called when the overview mode is about to be started (before the windows
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 437
440 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. 438 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved.
441 virtual void ToggleIgnoreExternalKeyboard() = 0; 439 virtual void ToggleIgnoreExternalKeyboard() = 0;
442 440
443 // Enable or disable the laser pointer. 441 // Enable or disable the laser pointer.
444 virtual void SetLaserPointerEnabled(bool enabled) = 0; 442 virtual void SetLaserPointerEnabled(bool enabled) = 0;
445 #endif 443 #endif
446 444
447 protected: 445 protected:
448 explicit WmShell(std::unique_ptr<ShellDelegate> shell_delegate); 446 explicit WmShell(std::unique_ptr<ShellDelegate> shell_delegate);
449 virtual ~WmShell(); 447 ~WmShell() override;
450 448
451 base::ObserverList<ShellObserver>* shell_observers() { 449 base::ObserverList<ShellObserver>* shell_observers() {
452 return &shell_observers_; 450 return &shell_observers_;
453 } 451 }
454 452
455 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); 453 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui);
456 454
457 // Helpers to set (and initialize) or destroy various delegates. 455 // Helpers to set (and initialize) or destroy various delegates.
458 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. 456 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported.
459 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); 457 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
460 void DeleteSystemTrayDelegate(); 458 void DeleteSystemTrayDelegate();
461 459
462 void DeleteWindowCycleController(); 460 void DeleteWindowCycleController();
463 461
464 void DeleteWindowSelectorController(); 462 void DeleteWindowSelectorController();
465 463
466 void CreateMaximizeModeController(); 464 void CreateMaximizeModeController();
467 void DeleteMaximizeModeController(); 465 void DeleteMaximizeModeController();
468 466
469 void CreateMruWindowTracker(); 467 void CreateMruWindowTracker();
470 void DeleteMruWindowTracker(); 468 void DeleteMruWindowTracker();
471 469
472 void DeleteToastManager(); 470 void DeleteToastManager();
473 471
474 void SetAcceleratorController( 472 void SetAcceleratorController(
475 std::unique_ptr<AcceleratorController> accelerator_controller); 473 std::unique_ptr<AcceleratorController> accelerator_controller);
476 474
475 // SessionStateObserver:
476 void SessionStateChanged(session_manager::SessionState state) override;
477
477 private: 478 private:
478 friend class AcceleratorControllerTest; 479 friend class AcceleratorControllerTest;
479 friend class ScopedRootWindowForNewWindows; 480 friend class ScopedRootWindowForNewWindows;
480 friend class Shell; 481 friend class Shell;
481 friend class WmShellTestApi; 482 friend class WmShellTestApi;
482 483
483 static WmShell* instance_; 484 static WmShell* instance_;
484 485
485 base::ObserverList<ShellObserver> shell_observers_; 486 base::ObserverList<ShellObserver> shell_observers_;
486 std::unique_ptr<ShellDelegate> delegate_; 487 std::unique_ptr<ShellDelegate> delegate_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 529
529 #if defined(OS_CHROMEOS) 530 #if defined(OS_CHROMEOS)
530 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 531 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
531 std::unique_ptr<VpnList> vpn_list_; 532 std::unique_ptr<VpnList> vpn_list_;
532 #endif 533 #endif
533 }; 534 };
534 535
535 } // namespace ash 536 } // namespace ash
536 537
537 #endif // ASH_COMMON_WM_SHELL_H_ 538 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW
« no previous file with comments | « ash/common/wm_root_window_controller.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698