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

Unified 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: Reviewer comments. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/lock_window_aura.h ('k') | chrome/browser/chromeos/login/lock_window_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4c783bef8c799c32d80af2bebd7ecd3c28b72242
--- /dev/null
+++ b/chrome/browser/chromeos/login/lock_window_aura.cc
@@ -0,0 +1,51 @@
+// 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"
+
+#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::Grab(DOMView* dom_view) {
+ // 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());
+ // TODO(flackr): Use a property to specify this container rather than
+ // depending on shell implementation.
+ params.parent = aura_shell::Shell::GetInstance()->GetContainer(
+ aura_shell::internal::kShellWindowId_LockScreenContainer);
+ views::Widget::Init(params);
+}
+
+} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/lock_window_aura.h ('k') | chrome/browser/chromeos/login/lock_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698