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

Unified Diff: ash/wm/window_util.cc

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « ash/wm/window_properties.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_util.cc
===================================================================
--- ash/wm/window_util.cc (revision 170295)
+++ ash/wm/window_util.cc (working copy)
@@ -19,31 +19,22 @@
#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
+#include "ui/views/corewm/window_util.h"
namespace ash {
namespace wm {
+// TODO(beng): replace many of these functions with the corewm versions.
void ActivateWindow(aura::Window* window) {
- DCHECK(window);
- DCHECK(window->GetRootWindow());
- aura::client::GetActivationClient(window->GetRootWindow())->ActivateWindow(
- window);
+ views::corewm::ActivateWindow(window);
}
void DeactivateWindow(aura::Window* window) {
- DCHECK(window);
- DCHECK(window->GetRootWindow());
- aura::client::GetActivationClient(window->GetRootWindow())->DeactivateWindow(
- window);
+ views::corewm::DeactivateWindow(window);
}
bool IsActiveWindow(aura::Window* window) {
- DCHECK(window);
- if (!window->GetRootWindow())
- return false;
- aura::client::ActivationClient* client =
- aura::client::GetActivationClient(window->GetRootWindow());
- return client && client->GetActiveWindow() == window;
+ return views::corewm::IsActiveWindow(window);
}
aura::Window* GetActiveWindow() {
@@ -52,7 +43,7 @@
}
aura::Window* GetActivatableWindow(aura::Window* window) {
- return internal::ActivationController::GetActivatableWindow(window, NULL);
+ return views::corewm::GetActivatableWindow(window);
}
bool IsActiveWindowFullscreen() {
@@ -68,12 +59,7 @@
}
bool CanActivateWindow(aura::Window* window) {
- DCHECK(window);
- if (!window->GetRootWindow())
- return false;
- aura::client::ActivationClient* client =
- aura::client::GetActivationClient(window->GetRootWindow());
- return client && client->CanActivateWindow(window);
+ return views::corewm::CanActivateWindow(window);
}
bool CanMaximizeWindow(const aura::Window* window) {
« no previous file with comments | « ash/wm/window_properties.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698