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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 // Configuring the background url. | 643 // Configuring the background url. |
644 std::string url_string = | 644 std::string url_string = |
645 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 645 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
646 switches::kScreenSaverUrl); | 646 switches::kScreenSaverUrl); |
647 ScreenLockerBackgroundView* screen_lock_background_view_ = | 647 ScreenLockerBackgroundView* screen_lock_background_view_ = |
648 new ScreenLockerBackgroundView(lock_widget_, screen_lock_view_); | 648 new ScreenLockerBackgroundView(lock_widget_, screen_lock_view_); |
649 background_container_ = screen_lock_background_view_; | 649 background_container_ = screen_lock_background_view_; |
650 background_view_ = screen_lock_background_view_; | 650 background_view_ = screen_lock_background_view_; |
651 background_view_->Init(GURL(url_string)); | 651 background_view_->Init(GURL(url_string)); |
652 | 652 |
653 // Gets user profile and sets default user 24hour flag since we don't | |
654 // expose user profile in ScreenLockerBackgroundView. | |
655 Profile* profile = ProfileManager::GetDefaultProfile(); | |
656 if (profile) { | |
657 background_view_->SetDefaultUse24HourClock( | |
658 profile->GetPrefs()->GetBoolean(prefs::kUse24HourClock)); | |
659 } | |
660 | |
661 if (background_view_->ScreenSaverEnabled()) | 653 if (background_view_->ScreenSaverEnabled()) |
662 StartScreenSaver(); | 654 StartScreenSaver(); |
663 | 655 |
664 #if defined(TOOLKIT_USES_GTK) | 656 #if defined(TOOLKIT_USES_GTK) |
665 DCHECK(GTK_WIDGET_REALIZED(lock_window_->GetNativeView())); | 657 DCHECK(GTK_WIDGET_REALIZED(lock_window_->GetNativeView())); |
666 WmIpc::instance()->SetWindowType( | 658 WmIpc::instance()->SetWindowType( |
667 lock_window_->GetNativeView(), | 659 lock_window_->GetNativeView(), |
668 WM_IPC_WINDOW_CHROME_SCREEN_LOCKER, | 660 WM_IPC_WINDOW_CHROME_SCREEN_LOCKER, |
669 NULL); | 661 NULL); |
670 #endif | 662 #endif |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 #if defined(TOOLKIT_USES_GTK) | 895 #if defined(TOOLKIT_USES_GTK) |
904 WmIpc::Message msg; | 896 WmIpc::Message msg; |
905 WmIpc::instance()->DecodeMessage(*event, &msg); | 897 WmIpc::instance()->DecodeMessage(*event, &msg); |
906 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) { | 898 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) { |
907 OnWindowManagerReady(); | 899 OnWindowManagerReady(); |
908 } | 900 } |
909 #endif | 901 #endif |
910 } | 902 } |
911 | 903 |
912 } // namespace chromeos | 904 } // namespace chromeos |
OLD | NEW |