This source file includes following definitions.
- Create
- Grab
- GetWidget
- Init
#include "chrome/browser/chromeos/login/lock_window_aura.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/window_animations.h"
#include "base/command_line.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
namespace chromeos {
LockWindow* LockWindow::Create() {
LockWindowAura* lock_window = new LockWindowAura();
ui::GestureRecognizer::Get()->TransferEventsTo(
lock_window->GetNativeWindow(), NULL);
return lock_window;
}
void LockWindowAura::Grab() {
if (observer_)
observer_->OnLockWindowReady();
}
views::Widget* LockWindowAura::GetWidget() {
return this;
}
LockWindowAura::LockWindowAura() {
Init();
}
LockWindowAura::~LockWindowAura() {
}
void LockWindowAura::Init() {
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.show_state = ui::SHOW_STATE_FULLSCREEN;
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
params.parent =
ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
ash::kShellWindowId_LockScreenContainer);
views::Widget::Init(params);
wm::SetWindowVisibilityAnimationTransition(
GetNativeView(), wm::ANIMATE_NONE);
}
}