Chromium Code Reviews| Index: chrome/browser/chromeos/login/lock_window.h |
| diff --git a/chrome/browser/chromeos/login/lock_window.h b/chrome/browser/chromeos/login/lock_window.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a5159e360d1e0eeff580d18a7b34f5363c246dc |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/lock_window.h |
| @@ -0,0 +1,59 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ |
| +#define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ |
| +#pragma once |
| + |
| +class DOMView; |
| + |
| +namespace views { |
| +class View; |
| +class Widget; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +// This is the interface which lock windows used for the WebUI screen locker |
| +// implement. |
| +class LockWindow { |
| + public: |
| + // This class provides an interface for the lock window to notify an observer |
| + // about its status. |
| + class Observer { |
| + public: |
| + // This method will be called when the lock window has finished all |
| + // initialization. |
| + virtual void OnLockWindowReady() = 0; |
| + }; |
| + |
| + LockWindow(); |
| + |
| + // Sets |content| as the contents view for the lock window. |
| + virtual void SetContentsView(views::View* content) = 0; |
| + |
| + // Shows the lock window, |dom_view| is the actual view displaying the lock |
| + // screen DOM for which inputs may be grabbed. |
| + virtual void Show(DOMView* dom_view) = 0; |
| + |
| + // Returns the actual widget for the lock window. |
| + virtual views::Widget* GetWidget() = 0; |
| + |
| + // Sets the observer class which is notified on lock window events. |
| + void set_observer(Observer* observer) { |
| + observer_ = observer; |
| + } |
| + |
| + // Creates an instance of the platform specific lock window. |
| + static LockWindow* Create(); |
| + |
| + protected: |
| + // The observer's OnLockWindowReady method will be called when the lock |
| + // window has finished all initialization. |
| + 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.
|
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ |