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

Unified Diff: ui/aura_shell/shell.cc

Issue 8817018: Implement cycle window forward/backward by keyboard shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/shell_accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/shell.cc
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index 87be5acada237f89b6bdc2ee5e3bdd495797c596..51c1b99d51f0f21cec974f84ebe52b84b877f4cf 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -4,6 +4,8 @@
#include "ui/aura_shell/shell.h"
+#include <algorithm>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "ui/aura/aura_switches.h"
@@ -285,6 +287,21 @@ void Shell::ToggleAppList() {
app_list_->SetVisible(!app_list_->IsVisible());
}
+// Returns true if the screen is locked.
+bool Shell::IsScreenLocked() const {
+ const aura::Window* lock_screen_container = GetContainer(
+ internal::kShellWindowId_LockScreenContainer);
+ const aura::Window::Windows& lock_screen_windows =
+ lock_screen_container->children();
+ aura::Window::Windows::const_iterator lock_screen_it =
+ std::find_if(lock_screen_windows.begin(), lock_screen_windows.end(),
+ std::mem_fun(&aura::Window::IsVisible));
+ if (lock_screen_it != lock_screen_windows.end())
+ return true;
+
+ return false;
+}
+
////////////////////////////////////////////////////////////////////////////////
// Shell, private:
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/shell_accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698