OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
| 11 class View; |
11 class Widget; | 12 class Widget; |
12 } | 13 } |
13 | 14 |
14 namespace chromeos { | 15 namespace chromeos { |
15 | 16 |
16 // This is the interface which lock windows used for the WebUI screen locker | 17 // This is the interface which lock windows used for the WebUI screen locker |
17 // implement. | 18 // implement. |
18 class LockWindow { | 19 class LockWindow { |
19 public: | 20 public: |
20 // This class provides an interface for the lock window to notify an observer | 21 // This class provides an interface for the lock window to notify an observer |
(...skipping 12 matching lines...) Expand all Loading... |
33 virtual void Grab() = 0; | 34 virtual void Grab() = 0; |
34 | 35 |
35 // Returns the actual widget for the lock window. | 36 // Returns the actual widget for the lock window. |
36 virtual views::Widget* GetWidget() = 0; | 37 virtual views::Widget* GetWidget() = 0; |
37 | 38 |
38 // Sets the observer class which is notified on lock window events. | 39 // Sets the observer class which is notified on lock window events. |
39 void set_observer(Observer* observer) { | 40 void set_observer(Observer* observer) { |
40 observer_ = observer; | 41 observer_ = observer; |
41 } | 42 } |
42 | 43 |
| 44 // Sets the view which should be initially focused. |
| 45 void set_initially_focused_view(views::View* view) { |
| 46 initially_focused_view_ = view; |
| 47 } |
| 48 |
43 // Creates an instance of the platform specific lock window. | 49 // Creates an instance of the platform specific lock window. |
44 static LockWindow* Create(); | 50 static LockWindow* Create(); |
45 | 51 |
46 protected: | 52 protected: |
47 // The observer's OnLockWindowReady method will be called when the lock | 53 // The observer's OnLockWindowReady method will be called when the lock |
48 // window has finished all initialization. | 54 // window has finished all initialization. |
49 Observer* observer_; | 55 Observer* observer_; |
50 | 56 |
| 57 // The view which should be initially focused. |
| 58 views::View* initially_focused_view_; |
| 59 |
| 60 private: |
51 DISALLOW_COPY_AND_ASSIGN(LockWindow); | 61 DISALLOW_COPY_AND_ASSIGN(LockWindow); |
52 }; | 62 }; |
53 | 63 |
54 } // namespace chromeos | 64 } // namespace chromeos |
55 | 65 |
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ | 66 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOCK_WINDOW_H_ |
OLD | NEW |