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 <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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 void ScreenLocker::Init() { | 727 void ScreenLocker::Init() { |
728 static const GdkColor kGdkBlack = {0, 0, 0, 0}; | 728 static const GdkColor kGdkBlack = {0, 0, 0, 0}; |
729 | 729 |
730 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); | 730 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); |
731 | 731 |
732 gfx::Point left_top(1, 1); | 732 gfx::Point left_top(1, 1); |
733 gfx::Rect init_bounds(views::Screen::GetMonitorAreaNearestPoint(left_top)); | 733 gfx::Rect init_bounds(views::Screen::GetMonitorAreaNearestPoint(left_top)); |
734 | 734 |
735 LockWindow* lock_window = new LockWindow(); | 735 LockWindow* lock_window = new LockWindow(); |
736 lock_window_ = lock_window->GetWidget(); | 736 lock_window_ = lock_window->GetWidget(); |
737 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 737 views::Widget::InitParams params( |
| 738 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
738 params.bounds = init_bounds; | 739 params.bounds = init_bounds; |
739 params.native_widget = lock_window; | 740 params.native_widget = lock_window; |
740 lock_window_->Init(params); | 741 lock_window_->Init(params); |
741 gtk_widget_modify_bg( | 742 gtk_widget_modify_bg( |
742 lock_window_->GetNativeView(), GTK_STATE_NORMAL, &kGdkBlack); | 743 lock_window_->GetNativeView(), GTK_STATE_NORMAL, &kGdkBlack); |
743 | 744 |
744 g_signal_connect(lock_window_->GetNativeView(), "client-event", | 745 g_signal_connect(lock_window_->GetNativeView(), "client-event", |
745 G_CALLBACK(OnClientEventThunk), this); | 746 G_CALLBACK(OnClientEventThunk), this); |
746 | 747 |
747 // GTK does not like zero width/height. | 748 // GTK does not like zero width/height. |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1217 |
1217 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1218 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
1218 if (!background_view_->IsScreenSaverVisible()) { | 1219 if (!background_view_->IsScreenSaverVisible()) { |
1219 StartScreenSaver(); | 1220 StartScreenSaver(); |
1220 return true; | 1221 return true; |
1221 } | 1222 } |
1222 return false; | 1223 return false; |
1223 } | 1224 } |
1224 | 1225 |
1225 } // namespace chromeos | 1226 } // namespace chromeos |
OLD | NEW |