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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker_views.cc

Issue 8930001: Fix up status area clock code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
OLDNEW
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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 // Configuring the background url. 641 // Configuring the background url.
642 std::string url_string = 642 std::string url_string =
643 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 643 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
644 switches::kScreenSaverUrl); 644 switches::kScreenSaverUrl);
645 ScreenLockerBackgroundView* screen_lock_background_view_ = 645 ScreenLockerBackgroundView* screen_lock_background_view_ =
646 new ScreenLockerBackgroundView(lock_widget_, screen_lock_view_); 646 new ScreenLockerBackgroundView(lock_widget_, screen_lock_view_);
647 background_container_ = screen_lock_background_view_; 647 background_container_ = screen_lock_background_view_;
648 background_view_ = screen_lock_background_view_; 648 background_view_ = screen_lock_background_view_;
649 background_view_->Init(GURL(url_string)); 649 background_view_->Init(GURL(url_string));
650 650
651 // Gets user profile and sets default user 24hour flag since we don't
652 // expose user profile in ScreenLockerBackgroundView.
653 Profile* profile = ProfileManager::GetDefaultProfile();
654 if (profile) {
655 background_view_->SetDefaultUse24HourClock(
656 profile->GetPrefs()->GetBoolean(prefs::kUse24HourClock));
657 }
658
659 if (background_view_->ScreenSaverEnabled()) 651 if (background_view_->ScreenSaverEnabled())
660 StartScreenSaver(); 652 StartScreenSaver();
661 653
662 #if defined(TOOLKIT_USES_GTK) 654 #if defined(TOOLKIT_USES_GTK)
663 DCHECK(GTK_WIDGET_REALIZED(lock_window_->GetNativeView())); 655 DCHECK(GTK_WIDGET_REALIZED(lock_window_->GetNativeView()));
664 WmIpc::instance()->SetWindowType( 656 WmIpc::instance()->SetWindowType(
665 lock_window_->GetNativeView(), 657 lock_window_->GetNativeView(),
666 WM_IPC_WINDOW_CHROME_SCREEN_LOCKER, 658 WM_IPC_WINDOW_CHROME_SCREEN_LOCKER,
667 NULL); 659 NULL);
668 #endif 660 #endif
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 #if defined(TOOLKIT_USES_GTK) 893 #if defined(TOOLKIT_USES_GTK)
902 WmIpc::Message msg; 894 WmIpc::Message msg;
903 WmIpc::instance()->DecodeMessage(*event, &msg); 895 WmIpc::instance()->DecodeMessage(*event, &msg);
904 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) { 896 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK) {
905 OnWindowManagerReady(); 897 OnWindowManagerReady();
906 } 898 }
907 #endif 899 #endif
908 } 900 }
909 901
910 } // namespace chromeos 902 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698