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_views.h" | 5 #include "chrome/browser/chromeos/login/screen_locker_views.h" |
6 | 6 |
7 #include <X11/extensions/XTest.h> | 7 #include <X11/extensions/XTest.h> |
8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
9 #include <gdk/gdkkeysyms.h> | 9 #include <gdk/gdkkeysyms.h> |
10 #include <gdk/gdkx.h> | 10 #include <gdk/gdkx.h> |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 // BackgroundView for ScreenLocker, which layouts a lock widget in | 382 // BackgroundView for ScreenLocker, which layouts a lock widget in |
383 // addition to other background components. | 383 // addition to other background components. |
384 class ScreenLockerBackgroundView | 384 class ScreenLockerBackgroundView |
385 : public chromeos::BackgroundView, | 385 : public chromeos::BackgroundView, |
386 public chromeos::ScreenLockerViews::ScreenLockViewContainer { | 386 public chromeos::ScreenLockerViews::ScreenLockViewContainer { |
387 public: | 387 public: |
388 ScreenLockerBackgroundView(views::Widget* lock_widget, | 388 ScreenLockerBackgroundView(views::Widget* lock_widget, |
389 views::View* screen_lock_view) | 389 views::View* screen_lock_view) |
390 : lock_widget_(lock_widget), | 390 : lock_widget_(lock_widget), |
391 screen_lock_view_(screen_lock_view) { | 391 screen_lock_view_(screen_lock_view) { |
392 set_screen_mode(chromeos::StatusAreaViewChromeos::SCREEN_LOCKER_MODE); | 392 chromeos::StatusAreaViewChromeos::SetScreenMode( |
| 393 chromeos::StatusAreaViewChromeos::SCREEN_LOCKER_MODE); |
| 394 } |
| 395 |
| 396 virtual ~ScreenLockerBackgroundView() { |
| 397 chromeos::StatusAreaViewChromeos::SetScreenMode( |
| 398 chromeos::StatusAreaViewChromeos::BROWSER_MODE); |
393 } | 399 } |
394 | 400 |
395 virtual void Layout() OVERRIDE { | 401 virtual void Layout() OVERRIDE { |
396 chromeos::BackgroundView::Layout(); | 402 chromeos::BackgroundView::Layout(); |
397 gfx::Rect screen = bounds(); | 403 gfx::Rect screen = bounds(); |
398 if (screen_lock_view_) { | 404 if (screen_lock_view_) { |
399 gfx::Size size = screen_lock_view_->GetPreferredSize(); | 405 gfx::Size size = screen_lock_view_->GetPreferredSize(); |
400 gfx::Point origin((screen.width() - size.width()) / 2, | 406 gfx::Point origin((screen.width() - size.width()) / 2, |
401 (screen.height() - size.height()) / 2); | 407 (screen.height() - size.height()) / 2); |
402 gfx::Size widget_size(screen.size()); | 408 gfx::Size widget_size(screen.size()); |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 #if defined(TOOLKIT_USES_GTK) | 929 #if defined(TOOLKIT_USES_GTK) |
924 WmIpc::Message msg; | 930 WmIpc::Message msg; |
925 WmIpc::instance()->DecodeMessage(*event, &msg); | 931 WmIpc::instance()->DecodeMessage(*event, &msg); |
926 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) { | 932 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) { |
927 OnWindowManagerReady(); | 933 OnWindowManagerReady(); |
928 } | 934 } |
929 #endif | 935 #endif |
930 } | 936 } |
931 | 937 |
932 } // namespace chromeos | 938 } // namespace chromeos |
OLD | NEW |