diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 04:35:53 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 04:35:53 +0000 |
commit | 8a810d9876bff1cee4f67b48efb406a8fafdd21a (patch) | |
tree | 7410abd5ae093ff4c620944cba2042ddc57ec3c8 /ui/aura_shell | |
parent | 197eeace847bb687765593d6b2d33705e1144672 (diff) | |
download | chromium_src-8a810d9876bff1cee4f67b48efb406a8fafdd21a.zip chromium_src-8a810d9876bff1cee4f67b48efb406a8fafdd21a.tar.gz chromium_src-8a810d9876bff1cee4f67b48efb406a8fafdd21a.tar.bz2 |
Renames LayoutManager::OnWindowAdded/OnWillRemoveWindow to
OnWindowAddedToLayout and OnWillRemoveWindowFromLayout. I'm doing this
so that if you extend both LayoutManager and WindowObserver it's
easier to distinguish where the method is originating from.
This fixes a crash as ToplevelLayoutManager didn't want to implement
the WIndowObserver variants but ended up implementing them by virtue
of both having the same name.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: http://codereview.chromium.org/8479051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell')
-rw-r--r-- | ui/aura_shell/default_container_layout_manager.cc | 5 | ||||
-rw-r--r-- | ui/aura_shell/default_container_layout_manager.h | 4 | ||||
-rw-r--r-- | ui/aura_shell/desktop_layout_manager.cc | 4 | ||||
-rw-r--r-- | ui/aura_shell/desktop_layout_manager.h | 4 | ||||
-rw-r--r-- | ui/aura_shell/toplevel_layout_manager.cc | 5 | ||||
-rw-r--r-- | ui/aura_shell/toplevel_layout_manager.h | 4 |
6 files changed, 14 insertions, 12 deletions
diff --git a/ui/aura_shell/default_container_layout_manager.cc b/ui/aura_shell/default_container_layout_manager.cc index d44eec5..43f280d 100644 --- a/ui/aura_shell/default_container_layout_manager.cc +++ b/ui/aura_shell/default_container_layout_manager.cc @@ -96,7 +96,7 @@ void DefaultContainerLayoutManager::OnWindowResized() { // Workspace is updated via DesktopObserver::OnDesktopResized. } -void DefaultContainerLayoutManager::OnWindowAdded(aura::Window* child) { +void DefaultContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) { if (child->type() != aura::WINDOW_TYPE_NORMAL || child->transient_parent()) return; @@ -120,7 +120,8 @@ void DefaultContainerLayoutManager::OnWindowAdded(aura::Window* child) { new_workspace->Activate(); } -void DefaultContainerLayoutManager::OnWillRemoveWindow(aura::Window* child) { +void DefaultContainerLayoutManager::OnWillRemoveWindowFromLayout( + aura::Window* child) { child->RemoveObserver(show_state_controller_.get()); ClearRestoreBounds(child); diff --git a/ui/aura_shell/default_container_layout_manager.h b/ui/aura_shell/default_container_layout_manager.h index 50336c3..24bc604 100644 --- a/ui/aura_shell/default_container_layout_manager.h +++ b/ui/aura_shell/default_container_layout_manager.h @@ -56,8 +56,8 @@ class AURA_SHELL_EXPORT DefaultContainerLayoutManager // Overridden from aura::LayoutManager: virtual void OnWindowResized() OVERRIDE; - virtual void OnWindowAdded(aura::Window* child) OVERRIDE; - virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE; + virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; + virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; virtual void OnChildWindowVisibilityChanged(aura::Window* child, bool visibile) OVERRIDE; virtual void SetChildBounds(aura::Window* child, diff --git a/ui/aura_shell/desktop_layout_manager.cc b/ui/aura_shell/desktop_layout_manager.cc index fbcdb17..4160a43 100644 --- a/ui/aura_shell/desktop_layout_manager.cc +++ b/ui/aura_shell/desktop_layout_manager.cc @@ -40,10 +40,10 @@ void DesktopLayoutManager::OnWindowResized() { shelf_->LayoutShelf(); } -void DesktopLayoutManager::OnWindowAdded(aura::Window* child) { +void DesktopLayoutManager::OnWindowAddedToLayout(aura::Window* child) { } -void DesktopLayoutManager::OnWillRemoveWindow(aura::Window* child) { +void DesktopLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) { } void DesktopLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child, diff --git a/ui/aura_shell/desktop_layout_manager.h b/ui/aura_shell/desktop_layout_manager.h index 08bc16c..96abeeb 100644 --- a/ui/aura_shell/desktop_layout_manager.h +++ b/ui/aura_shell/desktop_layout_manager.h @@ -40,8 +40,8 @@ class DesktopLayoutManager : public aura::LayoutManager { // Overridden from aura::LayoutManager: virtual void OnWindowResized() OVERRIDE; - virtual void OnWindowAdded(aura::Window* child) OVERRIDE; - virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE; + virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; + virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; virtual void OnChildWindowVisibilityChanged(aura::Window* child, bool visibile) OVERRIDE; virtual void SetChildBounds(aura::Window* child, diff --git a/ui/aura_shell/toplevel_layout_manager.cc b/ui/aura_shell/toplevel_layout_manager.cc index 6846547..65ff83e 100644 --- a/ui/aura_shell/toplevel_layout_manager.cc +++ b/ui/aura_shell/toplevel_layout_manager.cc @@ -27,14 +27,15 @@ ToplevelLayoutManager::~ToplevelLayoutManager() { void ToplevelLayoutManager::OnWindowResized() { } -void ToplevelLayoutManager::OnWindowAdded(aura::Window* child) { +void ToplevelLayoutManager::OnWindowAddedToLayout(aura::Window* child) { windows_.insert(child); child->AddObserver(this); if (child->GetProperty(aura::kShowStateKey)) WindowStateChanged(child); } -void ToplevelLayoutManager::OnWillRemoveWindow(aura::Window* child) { +void ToplevelLayoutManager::OnWillRemoveWindowFromLayout( + aura::Window* child) { windows_.erase(child); child->RemoveObserver(this); UpdateShelfVisibility(); diff --git a/ui/aura_shell/toplevel_layout_manager.h b/ui/aura_shell/toplevel_layout_manager.h index 5c080aa..0593e8d 100644 --- a/ui/aura_shell/toplevel_layout_manager.h +++ b/ui/aura_shell/toplevel_layout_manager.h @@ -33,8 +33,8 @@ class AURA_SHELL_EXPORT ToplevelLayoutManager : public aura::LayoutManager, // LayoutManager overrides: virtual void OnWindowResized() OVERRIDE; - virtual void OnWindowAdded(aura::Window* child) OVERRIDE; - virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE; + virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; + virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; virtual void OnChildWindowVisibilityChanged(aura::Window* child, bool visibile) OVERRIDE; virtual void SetChildBounds(aura::Window* child, |