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

Side by Side Diff: ash/wm/screen_pinning_controller.h

Issue 2780943002: Enables ScreenPinningController for mash/mus (Closed)
Patch Set: local 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/shell.cc ('k') | ash/wm/screen_pinning_controller_unittest.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_WM_SCREEN_PINNING_CONTROLLER_H_ 5 #ifndef ASH_WM_SCREEN_PINNING_CONTROLLER_H_
6 #define ASH_WM_SCREEN_PINNING_CONTROLLER_H_ 6 #define ASH_WM_SCREEN_PINNING_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h"
11 #include "ash/common/wm_display_observer.h" 12 #include "ash/common/wm_display_observer.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 14
14 namespace aura { 15 namespace aura {
15 class Window; 16 class Window;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 class WindowDimmer; 21 class WindowDimmer;
21 class WmWindow; 22 class WmWindow;
22 23
23 template <typename UserData> 24 template <typename UserData>
24 class WindowUserData; 25 class WindowUserData;
25 26
26 // Supports "screen pinning" for ARC++ apps. From the Android docs: 27 // Supports "screen pinning" for ARC++ apps. From the Android docs:
27 // "Lets you temporarily restrict users from leaving your task or being 28 // "Lets you temporarily restrict users from leaving your task or being
28 // interrupted by notifications. This could be used, for example, if you are 29 // interrupted by notifications. This could be used, for example, if you are
29 // developing an education app to support high stakes assessment requirements on 30 // developing an education app to support high stakes assessment requirements on
30 // Android, or a single-purpose or kiosk application." 31 // Android, or a single-purpose or kiosk application."
31 // https://developer.android.com/about/versions/android-5.0.html#ScreenPinning 32 // https://developer.android.com/about/versions/android-5.0.html#ScreenPinning
32 // See also ArcKioskAppLauncher::CheckAndPinWindow(). 33 // See also ArcKioskAppLauncher::CheckAndPinWindow().
33 class ScreenPinningController : public WmDisplayObserver { 34 class ASH_EXPORT ScreenPinningController : public WmDisplayObserver {
34 public: 35 public:
35 ScreenPinningController(); 36 ScreenPinningController();
36 ~ScreenPinningController() override; 37 ~ScreenPinningController() override;
37 38
38 // Sets a pinned window. It is not allowed to call this when there already 39 // Sets a pinned window. It is not allowed to call this when there already
39 // is a pinned window. 40 // is a pinned window.
40 void SetPinnedWindow(WmWindow* pinned_window); 41 void SetPinnedWindow(WmWindow* pinned_window);
41 42
42 // Returns true if in pinned mode, otherwise false. 43 // Returns true if in pinned mode, otherwise false.
43 bool IsPinned() const; 44 bool IsPinned() const;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 system_modal_container_window_observer_; 106 system_modal_container_window_observer_;
106 std::unique_ptr<SystemModalContainerChildWindowObserver> 107 std::unique_ptr<SystemModalContainerChildWindowObserver>
107 system_modal_container_child_window_observer_; 108 system_modal_container_child_window_observer_;
108 109
109 DISALLOW_COPY_AND_ASSIGN(ScreenPinningController); 110 DISALLOW_COPY_AND_ASSIGN(ScreenPinningController);
110 }; 111 };
111 112
112 } // namespace ash 113 } // namespace ash
113 114
114 #endif // ASH_WM_SCREEN_PINNING_CONTROLLER_H_ 115 #endif // ASH_WM_SCREEN_PINNING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/screen_pinning_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698