summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:55:10 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:55:10 +0000
commit7ae52500f93dd6322525cf427941859319ff81cd (patch)
treeb0538821c2f10e1fc45b57480f9ac7d338951f80 /ash
parent3aec17e2fc285f2a776e9b7c94cb180adf11ed7d (diff)
downloadchromium_src-7ae52500f93dd6322525cf427941859319ff81cd.zip
chromium_src-7ae52500f93dd6322525cf427941859319ff81cd.tar.gz
chromium_src-7ae52500f93dd6322525cf427941859319ff81cd.tar.bz2
ash: Remove wm::GetRootWindowController.
There is already an ash::GetRootWindowController, and it does the same thing. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10828037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/display/display_controller.cc11
-rw-r--r--ash/extended_desktop_unittest.cc3
-rw-r--r--ash/shell.cc3
-rw-r--r--ash/wm/system_gesture_event_filter.cc2
-rw-r--r--ash/wm/user_activity_detector.cc9
-rw-r--r--ash/wm/window_util.cc5
-rw-r--r--ash/wm/window_util.h2
7 files changed, 16 insertions, 19 deletions
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index a4807ae..9016725 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -9,6 +9,7 @@
#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "ui/aura/env.h"
@@ -32,7 +33,7 @@ DisplayController::~DisplayController() {
for (std::map<int, aura::RootWindow*>::const_reverse_iterator it =
root_windows_.rbegin(); it != root_windows_.rend(); ++it) {
internal::RootWindowController* controller =
- wm::GetRootWindowController(it->second);
+ GetRootWindowController(it->second);
// RootWindow may not have RootWindowController in non
// extended desktop mode.
if (controller)
@@ -76,7 +77,7 @@ void DisplayController::CloseChildWindows() {
root_windows_.begin(); it != root_windows_.end(); ++it) {
aura::RootWindow* root_window = it->second;
internal::RootWindowController* controller =
- wm::GetRootWindowController(root_window);
+ GetRootWindowController(root_window);
if (controller) {
controller->CloseChildWindows();
} else {
@@ -93,7 +94,7 @@ std::vector<aura::RootWindow*> DisplayController::GetAllRootWindows() {
for (std::map<int, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) {
DCHECK(it->second);
- if (wm::GetRootWindowController(it->second))
+ if (GetRootWindowController(it->second))
windows.push_back(it->second);
}
return windows;
@@ -105,7 +106,7 @@ DisplayController::GetAllRootWindowControllers() {
for (std::map<int, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) {
internal::RootWindowController* controller =
- wm::GetRootWindowController(it->second);
+ GetRootWindowController(it->second);
if (controller)
controllers.push_back(controller);
}
@@ -217,7 +218,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
if (root != Shell::GetPrimaryRootWindow()) {
root_windows_.erase(display.id());
internal::RootWindowController* controller =
- wm::GetRootWindowController(root);
+ GetRootWindowController(root);
if (controller) {
controller->MoveWindowsTo(Shell::GetPrimaryRootWindow());
delete controller;
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index e4528f2..7fc1e2f 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -6,6 +6,7 @@
#include "ash/display/multi_display_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_util.h"
#include "ui/aura/client/activation_client.h"
@@ -78,7 +79,7 @@ TEST_F(ExtendedDesktopTest, Basic) {
ASSERT_EQ(2U, root_windows.size());
for (Shell::RootWindowList::const_iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) {
- EXPECT_TRUE(wm::GetRootWindowController(*iter) != NULL);
+ EXPECT_TRUE(GetRootWindowController(*iter) != NULL);
}
// Make sure root windows share the same controllers.
EXPECT_EQ(root_windows[0]->GetFocusManager(),
diff --git a/ash/shell.cc b/ash/shell.cc
index cab6160..ef6557a 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -45,6 +45,7 @@
#include "ash/wm/panel_layout_manager.h"
#include "ash/wm/panel_window_event_filter.h"
#include "ash/wm/power_button_controller.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/screen_dimmer.h"
@@ -306,7 +307,7 @@ void Shell::DeleteInstance() {
// static
internal::RootWindowController* Shell::GetPrimaryRootWindowController() {
- return wm::GetRootWindowController(GetPrimaryRootWindow());
+ return GetRootWindowController(GetPrimaryRootWindow());
}
// static
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 4d19efd..6970d49 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -605,7 +605,7 @@ ui::GestureStatus SystemGestureEventFilter::PreHandleGestureEvent(
return ui::GESTURE_STATUS_UNKNOWN;
RootWindowController* root_controller =
- wm::GetRootWindowController(system_target->GetRootWindow());
+ GetRootWindowController(system_target->GetRootWindow());
CHECK(root_controller);
aura::Window* desktop_container = root_controller->GetContainer(
ash::internal::kShellWindowId_DesktopBackgroundContainer);
diff --git a/ash/wm/user_activity_detector.cc b/ash/wm/user_activity_detector.cc
index d11d171..3fd845a 100644
--- a/ash/wm/user_activity_detector.cc
+++ b/ash/wm/user_activity_detector.cc
@@ -4,6 +4,7 @@
#include "ash/wm/user_activity_detector.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/user_activity_observer.h"
#include "ash/wm/window_util.h"
#include "ui/aura/event.h"
@@ -31,7 +32,7 @@ bool UserActivityDetector::PreHandleKeyEvent(aura::Window* target,
aura::KeyEvent* event) {
// Ignore input events on secondary displays in non extended desktop
// mode. Remove this once this mode is gone. crbug.com/135245.
- if (!wm::GetRootWindowController(target->GetRootWindow()))
+ if (!GetRootWindowController(target->GetRootWindow()))
return true;
MaybeNotify();
return false;
@@ -39,7 +40,7 @@ bool UserActivityDetector::PreHandleKeyEvent(aura::Window* target,
bool UserActivityDetector::PreHandleMouseEvent(aura::Window* target,
aura::MouseEvent* event) {
- if (!wm::GetRootWindowController(target->GetRootWindow()))
+ if (!GetRootWindowController(target->GetRootWindow()))
return true;
if (!(event->flags() & ui::EF_IS_SYNTHESIZED))
MaybeNotify();
@@ -49,7 +50,7 @@ bool UserActivityDetector::PreHandleMouseEvent(aura::Window* target,
ui::TouchStatus UserActivityDetector::PreHandleTouchEvent(
aura::Window* target,
aura::TouchEvent* event) {
- if (!wm::GetRootWindowController(target->GetRootWindow()))
+ if (!GetRootWindowController(target->GetRootWindow()))
return ui::TOUCH_STATUS_END;
MaybeNotify();
return ui::TOUCH_STATUS_UNKNOWN;
@@ -58,7 +59,7 @@ ui::TouchStatus UserActivityDetector::PreHandleTouchEvent(
ui::GestureStatus UserActivityDetector::PreHandleGestureEvent(
aura::Window* target,
aura::GestureEvent* event) {
- if (!wm::GetRootWindowController(target->GetRootWindow()))
+ if (!GetRootWindowController(target->GetRootWindow()))
return ui::GESTURE_STATUS_CONSUMED;
MaybeNotify();
return ui::GESTURE_STATUS_UNKNOWN;
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index 5e9f37a..0b71f06 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -59,11 +59,6 @@ bool CanActivateWindow(aura::Window* window) {
return client && client->CanActivateWindow(window);
}
-internal::RootWindowController* GetRootWindowController(
- aura::RootWindow* root_window) {
- return root_window->GetProperty(internal::kRootWindowControllerKey);
-}
-
bool IsWindowNormal(aura::Window* window) {
return window->GetProperty(aura::client::kShowStateKey) ==
ui::SHOW_STATE_NORMAL ||
diff --git a/ash/wm/window_util.h b/ash/wm/window_util.h
index 57bc7ed..6dc9d2a 100644
--- a/ash/wm/window_util.h
+++ b/ash/wm/window_util.h
@@ -24,8 +24,6 @@ ASH_EXPORT void DeactivateWindow(aura::Window* window);
ASH_EXPORT bool IsActiveWindow(aura::Window* window);
ASH_EXPORT aura::Window* GetActiveWindow();
ASH_EXPORT bool CanActivateWindow(aura::Window* window);
-ASH_EXPORT internal::RootWindowController* GetRootWindowController(
- aura::RootWindow* root_window);
// Retrieves the activatable window for |window|. If |window| is activatable,
// this will just return it, otherwise it will climb the parent/transient parent