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..c7cd931874368bf267c5ab2dd2ba0296ac64ca59 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/lock_window.h |
| @@ -0,0 +1,61 @@ |
| +// 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; |
| + |
|
oshima
2011/11/29 20:18:06
nit: remove new lines
flackr
2011/11/30 20:16:54
Done.
|
| +} |
| + |
| +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 a delegate |
| + // 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
|
| + class Observer { |
| + public: |
| + // This method will be called when the lock window has finished all |
| + // initialization. |
| + virtual void OnLockWindowReady() = 0; |
| + }; |
| + |
| + 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
|
| + |
| + // Use |content| as the contents view for the lock window. |
| + virtual void SetContentsView(views::View* content) = 0; |
|
oshima
2011/11/29 20:18:06
Sets |content| ...
flackr
2011/11/30 20:16:54
Done.
|
| + |
| + // 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.
|
| + // 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; |
| + |
| + // Set the observer class which is notified on lock window events. |
| + void set_observer(Observer* observer) { |
| + observer_ = observer; |
| + } |
| + |
| + // Create 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_; |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_WINDOW_H_ |