summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorbruthig@chromium.org <bruthig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-16 19:07:46 +0000
committerbruthig@chromium.org <bruthig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-16 19:07:46 +0000
commit76bc46334ee9948e43f5bec8c5436d8446acc5a2 (patch)
treeec7704e783d471602004395f5404692e2c1d2791 /ash
parent088661e28a7c26fa6e443540010e4b203851842f (diff)
downloadchromium_src-76bc46334ee9948e43f5bec8c5436d8446acc5a2.zip
chromium_src-76bc46334ee9948e43f5bec8c5436d8446acc5a2.tar.gz
chromium_src-76bc46334ee9948e43f5bec8c5436d8446acc5a2.tar.bz2
Add const to PanelLayoutManagerTest::IsPanelAboveLauncherIcon 'panel' parameter
BUG=none Review URL: https://codereview.chromium.org/331843003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/root_window_controller.cc3
-rw-r--r--ash/root_window_controller.h7
-rw-r--r--ash/shelf/shelf.cc3
-rw-r--r--ash/shelf/shelf.h2
-rw-r--r--ash/shelf/shelf_util.cc2
-rw-r--r--ash/shelf/shelf_util.h2
-rw-r--r--ash/shell.cc2
-rw-r--r--ash/shell.h2
-rw-r--r--ash/wm/panels/panel_layout_manager_unittest.cc6
9 files changed, 14 insertions, 15 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index d04a0f2..aafe0ba 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -330,7 +330,8 @@ void RootWindowController::CreateForVirtualKeyboardDisplay(
}
// static
-RootWindowController* RootWindowController::ForShelf(aura::Window* window) {
+RootWindowController* RootWindowController::ForShelf(
+ const aura::Window* window) {
return GetRootWindowController(window->GetRootWindow());
}
diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h
index b7a059f..5c91f56 100644
--- a/ash/root_window_controller.h
+++ b/ash/root_window_controller.h
@@ -80,7 +80,6 @@ class AccessibilityObserver;
// |GetRootWindowController(aura::WindowEventDispatcher*)| function.
class ASH_EXPORT RootWindowController : public ShellObserver {
public:
-
// Creates and Initialize the RootWindowController for primary display.
static void CreateForPrimaryDisplay(AshWindowTreeHost* host);
@@ -95,7 +94,7 @@ class ASH_EXPORT RootWindowController : public ShellObserver {
// |window|. This returns the RootWindowController for the |window|'s
// root window when multiple shelf mode is enabled, or the primary
// RootWindowController otherwise.
- static RootWindowController* ForShelf(aura::Window* window);
+ static RootWindowController* ForShelf(const aura::Window* window);
// Returns a RootWindowController of the window's root window.
static RootWindowController* ForWindow(const aura::Window* window);
@@ -326,6 +325,6 @@ class ASH_EXPORT RootWindowController : public ShellObserver {
ASH_EXPORT RootWindowController* GetRootWindowController(
const aura::Window* root_window);
-} // ash
+} // namespace ash
-#endif // ASH_ROOT_WINDOW_CONTROLLER_H_
+#endif // ASH_ROOT_WINDOW_CONTROLLER_H_
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc
index 2d988fc..f9d3704 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/shelf/shelf.cc
@@ -80,7 +80,8 @@ void Shelf::SetAlignment(ShelfAlignment alignment) {
// ShelfLayoutManager will resize the shelf.
}
-gfx::Rect Shelf::GetScreenBoundsOfItemIconForWindow(aura::Window* window) {
+gfx::Rect Shelf::GetScreenBoundsOfItemIconForWindow(
+ const aura::Window* window) {
ShelfID id = GetShelfIDForWindow(window);
gfx::Rect bounds(shelf_view_->GetIdealBoundsOfItemIcon(id));
gfx::Point screen_origin;
diff --git a/ash/shelf/shelf.h b/ash/shelf/shelf.h
index 2b06d82..88cd060 100644
--- a/ash/shelf/shelf.h
+++ b/ash/shelf/shelf.h
@@ -63,7 +63,7 @@ class ASH_EXPORT Shelf {
// Returns the screen bounds of the item for the specified window. If there is
// no item for the specified window an empty rect is returned.
- gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window);
+ gfx::Rect GetScreenBoundsOfItemIconForWindow(const aura::Window* window);
// Updates the icon position given the current window bounds. This is used
// when dragging panels to reposition them with respect to the other panels.
diff --git a/ash/shelf/shelf_util.cc b/ash/shelf/shelf_util.cc
index 2d008ff..af773b4 100644
--- a/ash/shelf/shelf_util.cc
+++ b/ash/shelf/shelf_util.cc
@@ -27,7 +27,7 @@ void SetShelfIDForWindow(ShelfID id, aura::Window* window) {
window->SetProperty(kShelfID, id);
}
-ShelfID GetShelfIDForWindow(aura::Window* window) {
+ShelfID GetShelfIDForWindow(const aura::Window* window) {
DCHECK(window);
return window->GetProperty(kShelfID);
}
diff --git a/ash/shelf/shelf_util.h b/ash/shelf/shelf_util.h
index 7e5dae1..f93f42e 100644
--- a/ash/shelf/shelf_util.h
+++ b/ash/shelf/shelf_util.h
@@ -30,7 +30,7 @@ ASH_EXPORT void SetShelfIDForWindow(ShelfID id, aura::Window* window);
// or 0 if there isn't one.
// Note: Window of a tabbed browser will return the |ShelfID| of the
// currently active tab.
-ASH_EXPORT ShelfID GetShelfIDForWindow(aura::Window* window);
+ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window);
// Sets ShelfItemDetails for |window|.
ASH_EXPORT void SetShelfItemDetailsForWindow(aura::Window* window,
diff --git a/ash/shell.cc b/ash/shell.cc
index 3d83a68..c8b3279 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -501,7 +501,7 @@ void Shell::SetShelfAlignment(ShelfAlignment alignment,
}
}
-ShelfAlignment Shell::GetShelfAlignment(aura::Window* root_window) {
+ShelfAlignment Shell::GetShelfAlignment(const aura::Window* root_window) {
return GetRootWindowController(root_window)
->GetShelfLayoutManager()
->GetAlignment();
diff --git a/ash/shell.h b/ash/shell.h
index 9dc84caf..14e1f91 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -451,7 +451,7 @@ class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
// Sets/gets shelf's alignment on |root_window|.
void SetShelfAlignment(ShelfAlignment alignment,
aura::Window* root_window);
- ShelfAlignment GetShelfAlignment(aura::Window* root_window);
+ ShelfAlignment GetShelfAlignment(const aura::Window* root_window);
// Dims or undims the screen.
void SetDimming(bool should_dim);
diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
index 6bf85b4..4faeacb 100644
--- a/ash/wm/panels/panel_layout_manager_unittest.cc
+++ b/ash/wm/panels/panel_layout_manager_unittest.cc
@@ -117,9 +117,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
EXPECT_FALSE(window1_bounds.Intersects(window2_bounds));
}
- // TODO(dcheng): This should be const, but GetScreenBoundsOfItemIconForWindow
- // takes a non-const Window. We can probably fix that.
- void IsPanelAboveLauncherIcon(aura::Window* panel) {
+ void IsPanelAboveLauncherIcon(const aura::Window* panel) {
// Waits until all shelf view animations are done.
shelf_view_test()->RunMessageLoopUntilAnimationsDone();
@@ -234,7 +232,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
shell->SetShelfAlignment(alignment, root_window);
}
- ShelfAlignment GetAlignment(aura::Window* root_window) {
+ ShelfAlignment GetAlignment(const aura::Window* root_window) {
ash::Shell* shell = ash::Shell::GetInstance();
return shell->GetShelfAlignment(root_window);
}