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

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

Issue 371923002: cros: Fixes the text input focus when screen is locked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed to use WidgetDelegate::GetInitiallyFocusedView. Created 6 years, 5 months 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
« no previous file with comments | « chrome/browser/chromeos/login/ui/lock_window_aura.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/ui/lock_window_aura.h" 5 #include "chrome/browser/chromeos/login/ui/lock_window_aura.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 17 matching lines...) Expand all
28 // callback immediately. 28 // callback immediately.
29 if (observer_) 29 if (observer_)
30 observer_->OnLockWindowReady(); 30 observer_->OnLockWindowReady();
31 } 31 }
32 32
33 views::Widget* LockWindowAura::GetWidget() { 33 views::Widget* LockWindowAura::GetWidget() {
34 return this; 34 return this;
35 } 35 }
36 36
37 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
38 // views::WidgetDelegate implementation:
39 views::View* LockWindowAura::GetInitiallyFocusedView() {
40 return initially_focused_view_;
41 }
42
43 const views::Widget* LockWindowAura::GetWidget() const {
44 return this;
45 }
46
47 ////////////////////////////////////////////////////////////////////////////////
38 // LockWindowAura private: 48 // LockWindowAura private:
39 LockWindowAura::LockWindowAura() { 49 LockWindowAura::LockWindowAura() {
40 Init(); 50 Init();
41 } 51 }
42 52
43 LockWindowAura::~LockWindowAura() { 53 LockWindowAura::~LockWindowAura() {
44 } 54 }
45 55
46 void LockWindowAura::Init() { 56 void LockWindowAura::Init() {
47 views::Widget::InitParams params( 57 views::Widget::InitParams params(
48 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 58 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
59 params.delegate = this;
49 params.show_state = ui::SHOW_STATE_FULLSCREEN; 60 params.show_state = ui::SHOW_STATE_FULLSCREEN;
50 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 61 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
51 // TODO(oshima): move the lock screen harness to ash. 62 // TODO(oshima): move the lock screen harness to ash.
52 params.parent = 63 params.parent =
53 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), 64 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
54 ash::kShellWindowId_LockScreenContainer); 65 ash::kShellWindowId_LockScreenContainer);
55 views::Widget::Init(params); 66 views::Widget::Init(params);
56 wm::SetWindowVisibilityAnimationTransition( 67 wm::SetWindowVisibilityAnimationTransition(
57 GetNativeView(), wm::ANIMATE_NONE); 68 GetNativeView(), wm::ANIMATE_NONE);
58 } 69 }
59 70
60 } // namespace chromeos 71 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/lock_window_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698