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 | |
13 class View; | |
14 class Widget; | |
15 | |
oshima
2011/11/29 20:18:06
nit: remove new lines
flackr
2011/11/30 20:16:54
Done.
| |
16 } | |
17 | |
18 namespace chromeos { | |
19 | |
20 // This is the interface which lock windows used for the WebUI screen locker | |
21 // implement. | |
22 class LockWindow { | |
23 public: | |
24 // This class provides an interface for the lock window to notify a delegate | |
25 // about its status. | |
oshima
2011/11/29 20:18:06
I think observer is more appropriate here than "a
flackr
2011/11/30 20:16:54
Done. I missed this instance of the word delegate
| |
26 class Observer { | |
27 public: | |
28 // This method will be called when the lock window has finished all | |
29 // initialization. | |
30 virtual void OnLockWindowReady() = 0; | |
31 }; | |
32 | |
33 LockWindow() : observer_(NULL) {} | |
oshima
2011/11/29 20:18:06
virtual. please move impl to .cc
flackr
2011/11/30 20:16:54
Virtual constructor? Implementation moved.
oshima
2011/11/30 23:41:07
Sorry, I was going to say you need virtual detor a
| |
34 | |
35 // Use |content| as the contents view for the lock window. | |
36 virtual void SetContentsView(views::View* content) = 0; | |
oshima
2011/11/29 20:18:06
Sets |content| ...
flackr
2011/11/30 20:16:54
Done.
| |
37 | |
38 // Show the lock window, |dom_view| is the actual view displaying the lock | |
oshima
2011/11/29 20:18:06
Shows/Sets/Creates (this is chromium style)
flackr
2011/11/30 20:16:54
Done.
| |
39 // screen DOM for which inputs may be grabbed. | |
40 virtual void Show(DOMView* dom_view) = 0; | |
41 | |
42 // Returns the actual widget for the lock window. | |
43 virtual views::Widget* GetWidget() = 0; | |
44 | |
45 // Set the observer class which is notified on lock window events. | |
46 void set_observer(Observer* observer) { | |
47 observer_ = observer; | |
48 } | |
49 | |
50 // Create an instance of the platform specific lock window. | |
51 static LockWindow* Create(); | |
52 | |
53 protected: | |
54 // The observer's OnLockWindowReady method will be called when the lock | |
55 // window has finished all initialization. | |
56 Observer* observer_; | |
57 }; | |
58 | |
59 } // namespace chromeos | |
60 | |
61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ | |
OLD | NEW |