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 #include "base/basictypes.h" |
| 10 |
| 11 class DOMView; |
| 12 |
| 13 namespace views { |
| 14 class Widget; |
| 15 } |
| 16 |
| 17 namespace chromeos { |
| 18 |
| 19 // This is the interface which lock windows used for the WebUI screen locker |
| 20 // implement. |
| 21 class LockWindow { |
| 22 public: |
| 23 // This class provides an interface for the lock window to notify an observer |
| 24 // about its status. |
| 25 class Observer { |
| 26 public: |
| 27 // This method will be called when the lock window has finished all |
| 28 // initialization. |
| 29 virtual void OnLockWindowReady() = 0; |
| 30 }; |
| 31 |
| 32 LockWindow(); |
| 33 |
| 34 // Attempt to grab inputs on |dom_view|, the actual view displaying the lock |
| 35 // screen DOM. |
| 36 virtual void Grab(DOMView* dom_view) = 0; |
| 37 |
| 38 // Returns the actual widget for the lock window. |
| 39 virtual views::Widget* GetWidget() = 0; |
| 40 |
| 41 // Sets the observer class which is notified on lock window events. |
| 42 void set_observer(Observer* observer) { |
| 43 observer_ = observer; |
| 44 } |
| 45 |
| 46 // Creates an instance of the platform specific lock window. |
| 47 static LockWindow* Create(); |
| 48 |
| 49 protected: |
| 50 // The observer's OnLockWindowReady method will be called when the lock |
| 51 // window has finished all initialization. |
| 52 Observer* observer_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(LockWindow); |
| 55 }; |
| 56 |
| 57 } // namespace chromeos |
| 58 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ |
OLD | NEW |