| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 shutdown_button_->LayoutIn(this); | 268 shutdown_button_->LayoutIn(this); |
| 269 } | 269 } |
| 270 | 270 |
| 271 // ScreenLocker::ScreenLockViewContainer implementation: | 271 // ScreenLocker::ScreenLockViewContainer implementation: |
| 272 void SetScreenLockView(views::View* screen_lock_view) { | 272 void SetScreenLockView(views::View* screen_lock_view) { |
| 273 if (screen_lock_view_) { | 273 if (screen_lock_view_) { |
| 274 RemoveChildView(screen_lock_view_); | 274 RemoveChildView(screen_lock_view_); |
| 275 } | 275 } |
| 276 screen_lock_view_ = screen_lock_view; | 276 screen_lock_view_ = screen_lock_view; |
| 277 if (screen_lock_view_) { | 277 if (screen_lock_view_) { |
| 278 AddChildView(0, screen_lock_view_); | 278 AddChildViewAt(screen_lock_view_, 0); |
| 279 } | 279 } |
| 280 Layout(); | 280 Layout(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 views::View* screen_lock_view_; | 284 views::View* screen_lock_view_; |
| 285 | 285 |
| 286 chromeos::ShutdownButton* shutdown_button_; | 286 chromeos::ShutdownButton* shutdown_button_; |
| 287 | 287 |
| 288 DISALLOW_COPY_AND_ASSIGN(GrabWidgetRootView); | 288 DISALLOW_COPY_AND_ASSIGN(GrabWidgetRootView); |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 | 1154 |
| 1155 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1155 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 1156 if (!background_view_->IsScreenSaverVisible()) { | 1156 if (!background_view_->IsScreenSaverVisible()) { |
| 1157 StartScreenSaver(); | 1157 StartScreenSaver(); |
| 1158 return true; | 1158 return true; |
| 1159 } | 1159 } |
| 1160 return false; | 1160 return false; |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 } // namespace chromeos | 1163 } // namespace chromeos |
| OLD | NEW |