OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ | |
7 #pragma once | |
8 | |
9 class DOMView; | |
10 | |
11 namespace views { | |
12 class View; | |
13 class Widget; | |
14 } | |
15 | |
16 namespace chromeos { | |
17 | |
18 // This is the interface which lock windows used for the WebUI screen locker | |
19 // implement. | |
20 class LockWindow { | |
21 public: | |
22 // This class provides an interface for the lock window to notify an observer | |
23 // about its status. | |
24 class Observer { | |
25 public: | |
26 // This method will be called when the lock window has finished all | |
27 // initialization. | |
28 virtual void OnLockWindowReady() = 0; | |
29 }; | |
30 | |
31 LockWindow(); | |
32 | |
33 // Sets |content| as the contents view for the lock window. | |
34 virtual void SetContentsView(views::View* content) = 0; | |
35 | |
36 // Shows the lock window, |dom_view| is the actual view displaying the lock | |
37 // screen DOM for which inputs may be grabbed. | |
38 virtual void Show(DOMView* dom_view) = 0; | |
39 | |
40 // Returns the actual widget for the lock window. | |
41 virtual views::Widget* GetWidget() = 0; | |
42 | |
43 // Sets the observer class which is notified on lock window events. | |
44 void set_observer(Observer* observer) { | |
45 observer_ = observer; | |
46 } | |
47 | |
48 // Creates an instance of the platform specific lock window. | |
49 static LockWindow* Create(); | |
50 | |
51 protected: | |
52 // The observer's OnLockWindowReady method will be called when the lock | |
53 // window has finished all initialization. | |
54 Observer* observer_; | |
oshima
2011/11/30 23:41:07
DISALLOW_COPY_AND_ASSIGN
flackr
2011/12/01 21:40:40
All of the interface/virtual classes I looked at d
oshima
2011/12/01 22:45:35
This is not interface class because it has instanc
flackr
2011/12/01 23:16:34
Thanks, sorry for the confusion! Done.
| |
55 }; | |
56 | |
57 } // namespace chromeos | |
58 | |
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ | |
OLD | NEW |