OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gdkx.h> | 7 #include <gdk/gdkx.h> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <X11/extensions/XTest.h> | 10 #include <X11/extensions/XTest.h> |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 class ScreenLockerBackgroundView | 452 class ScreenLockerBackgroundView |
453 : public chromeos::BackgroundView, | 453 : public chromeos::BackgroundView, |
454 public chromeos::ScreenLocker::ScreenLockViewContainer { | 454 public chromeos::ScreenLocker::ScreenLockViewContainer { |
455 public: | 455 public: |
456 ScreenLockerBackgroundView(views::WidgetGtk* lock_widget, | 456 ScreenLockerBackgroundView(views::WidgetGtk* lock_widget, |
457 views::View* screen_lock_view) | 457 views::View* screen_lock_view) |
458 : lock_widget_(lock_widget), | 458 : lock_widget_(lock_widget), |
459 screen_lock_view_(screen_lock_view) { | 459 screen_lock_view_(screen_lock_view) { |
460 } | 460 } |
461 | 461 |
462 virtual bool IsScreenLockerMode() const { | 462 virtual ScreenMode GetScreenMode() const { |
463 return true; | 463 return kScreenLockerMode; |
464 } | 464 } |
465 | 465 |
466 virtual void Layout() { | 466 virtual void Layout() { |
467 chromeos::BackgroundView::Layout(); | 467 chromeos::BackgroundView::Layout(); |
468 gfx::Rect screen = bounds(); | 468 gfx::Rect screen = bounds(); |
469 if (screen_lock_view_) { | 469 if (screen_lock_view_) { |
470 gfx::Size size = screen_lock_view_->GetPreferredSize(); | 470 gfx::Size size = screen_lock_view_->GetPreferredSize(); |
471 gfx::Point origin((screen.width() - size.width()) / 2, | 471 gfx::Point origin((screen.width() - size.width()) / 2, |
472 (screen.height() - size.height()) / 2); | 472 (screen.height() - size.height()) / 2); |
473 gfx::Size widget_size(screen.size()); | 473 gfx::Size widget_size(screen.size()); |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 | 1117 |
1118 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1118 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
1119 if (!background_view_->IsScreenSaverVisible()) { | 1119 if (!background_view_->IsScreenSaverVisible()) { |
1120 StartScreenSaver(); | 1120 StartScreenSaver(); |
1121 return true; | 1121 return true; |
1122 } | 1122 } |
1123 return false; | 1123 return false; |
1124 } | 1124 } |
1125 | 1125 |
1126 } // namespace chromeos | 1126 } // namespace chromeos |
OLD | NEW |