Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/chromeos/login/lock_window_aura.cc

Issue 8711003: Enable WebUI ScreenLocker for aura by abstracting lock window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup unnecessary forward references. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "chrome/browser/chromeos/login/lock_window_aura.h"
6
7 #include "ui/aura/desktop.h"
8 #include "ui/aura/window.h"
9 #include "ui/aura_shell/shell.h"
10 #include "ui/aura_shell/shell_window_ids.h"
11
12 namespace chromeos {
13
14 LockWindow* LockWindow::Create() {
15 return new LockWindowAura();
16 }
17
18 ////////////////////////////////////////////////////////////////////////////////
19 // LockWindow implementation:
20 void LockWindowAura::Grab(DOMView* dom_view) {
21 // We already have grab from the lock screen container, just call the ready
22 // callback immediately.
23 if (observer_)
24 observer_->OnLockWindowReady();
25 }
26
27 views::Widget* LockWindowAura::GetWidget() {
28 return this;
29 }
30
31 ////////////////////////////////////////////////////////////////////////////////
32 // LockWindowAura private:
33 LockWindowAura::LockWindowAura() {
34 Init();
35 }
36
37 LockWindowAura::~LockWindowAura() {
38 }
39
40 void LockWindowAura::Init() {
41 views::Widget::InitParams params(
42 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
43 params.bounds = gfx::Rect(aura::Desktop::GetInstance()->GetHostSize());
44 // TODO(flackr): Use a property to specify this container rather than
45 // depending on shell implementation.
46 params.parent = aura_shell::Shell::GetInstance()->GetContainer(
47 aura_shell::internal::kShellWindowId_LockScreenContainer);
48 views::Widget::Init(params);
49 }
50
51 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698