Chromium Code Reviews| Index: chrome/browser/chromeos/login/lock_window_aura.cc |
| diff --git a/chrome/browser/chromeos/login/lock_window_aura.cc b/chrome/browser/chromeos/login/lock_window_aura.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b33dfdd514427dfe52da23c26fcd177917e97caf |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/lock_window_aura.cc |
| @@ -0,0 +1,53 @@ |
| +// 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. |
| + |
| +#include "chrome/browser/chromeos/login/lock_window_aura.h" |
|
oshima
2011/11/30 23:41:07
new line after this
flackr
2011/12/01 21:40:40
Done.
|
| +#include "ui/aura/desktop.h" |
| +#include "ui/aura/window.h" |
| +#include "ui/aura_shell/shell.h" |
| +#include "ui/aura_shell/shell_window_ids.h" |
| + |
| +namespace chromeos { |
| + |
| +LockWindow* LockWindow::Create() { |
| + return new LockWindowAura(); |
| +} |
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| +// LockWindow implementation: |
| +void LockWindowAura::SetContentsView(views::View* content) { |
| + views::Widget::SetContentsView(content); |
| +} |
| + |
| +void LockWindowAura::Show(DOMView* dom_view) { |
| + views::Widget::Show(); |
| + // We already have grab from the lock screen container, just call the ready |
| + // callback immediately. |
| + if (observer_) |
| + observer_->OnLockWindowReady(); |
| +} |
| + |
| +views::Widget* LockWindowAura::GetWidget() { |
| + return this; |
| +} |
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| +// LockWindowAura private: |
| +LockWindowAura::LockWindowAura() { |
| + Init(); |
| +} |
| + |
| +LockWindowAura::~LockWindowAura() { |
| +} |
| + |
| +void LockWindowAura::Init() { |
| + views::Widget::InitParams params( |
| + views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| + params.bounds = gfx::Rect(aura::Desktop::GetInstance()->GetHostSize()); |
| + params.parent = aura_shell::Shell::GetInstance()->GetContainer( |
| + aura_shell::internal::kShellWindowId_LockScreenContainer); |
|
oshima
2011/11/30 23:41:07
You probably should use a property (or invent a wa
flackr
2011/12/01 21:40:40
Wrote TODO.
|
| + views::Widget::Init(params); |
| +} |
| + |
| +} // namespace chromeos |