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

Unified Diff: ui/aura_shell/window_util.cc

Issue 8894018: Move the concept of Activation to the Shell. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/window_util.h ('k') | ui/aura_shell/workspace/workspace.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/window_util.cc
===================================================================
--- ui/aura_shell/window_util.cc (revision 114022)
+++ ui/aura_shell/window_util.cc (working copy)
@@ -4,8 +4,11 @@
#include "ui/aura_shell/window_util.h"
+#include "ui/aura/client/activation_client.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
-#include "ui/aura/client/aura_constants.h"
+#include "ui/aura_shell/activation_controller.h"
#include "ui/base/ui_base_types.h"
namespace aura_shell {
@@ -15,4 +18,24 @@
ui::SHOW_STATE_MAXIMIZED;
}
+void ActivateWindow(aura::Window* window) {
+ aura::ActivationClient::GetActivationClient()->ActivateWindow(window);
+}
+
+void DeactivateWindow(aura::Window* window) {
+ aura::ActivationClient::GetActivationClient()->DeactivateWindow(window);
+}
+
+bool IsActiveWindow(aura::Window* window) {
+ return GetActiveWindow() == window;
+}
+
+aura::Window* GetActiveWindow() {
+ return aura::ActivationClient::GetActivationClient()->GetActiveWindow();
+}
+
+aura::Window* GetActivatableWindow(aura::Window* window) {
+ return internal::ActivationController::GetActivatableWindow(window);
+}
+
} // namespace aura_shell
« no previous file with comments | « ui/aura_shell/window_util.h ('k') | ui/aura_shell/workspace/workspace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698