summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 19:22:45 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 19:22:45 +0000
commitbf9cdb36cc79becab099c9f37eb80284fb203f45 (patch)
tree4c9011f0aa08ac613027abd372cec3a3b613032b /ash/shell
parentfef72c1c9890633a237e06ccb0d0f4ce2ca6c9c1 (diff)
downloadchromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.zip
chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.gz
chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.bz2
Make GetRootWindow() return a Window instead of a RootWindow.
Also adds a typedef from RootWindow to WindowEventDispatcher, the eventual name of this type. Adds a GetDispatcher() method that crawls up to the root Window and returns the WindowEventDispatcher. R=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/37733003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/content_client/shell_browser_main_parts.cc2
-rw-r--r--ash/shell/context_menu.cc2
-rw-r--r--ash/shell/context_menu.h4
-rw-r--r--ash/shell/shell_delegate_impl.cc2
-rw-r--r--ash/shell/shell_delegate_impl.h2
-rw-r--r--ash/shell/window_watcher.cc4
-rw-r--r--ash/shell/window_watcher_launcher_item_delegate.cc2
-rw-r--r--ash/shell/window_watcher_launcher_item_delegate.h2
-rw-r--r--ash/shell/window_watcher_unittest.cc2
9 files changed, 11 insertions, 11 deletions
diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc
index f8eb434..71e6ca4 100644
--- a/ash/shell/content_client/shell_browser_main_parts.cc
+++ b/ash/shell/content_client/shell_browser_main_parts.cc
@@ -134,7 +134,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
Shell::GetInstance()->desktop_background_controller()->SetDefaultWallpaper(
false /* is_guest */);
- ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
+ ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->ShowRootWindow();
}
void ShellBrowserMainParts::PostMainMessageLoopRun() {
diff --git a/ash/shell/context_menu.cc b/ash/shell/context_menu.cc
index e1a62d1..19ad408 100644
--- a/ash/shell/context_menu.cc
+++ b/ash/shell/context_menu.cc
@@ -14,7 +14,7 @@
namespace ash {
namespace shell {
-ContextMenu::ContextMenu(aura::RootWindow* root)
+ContextMenu::ContextMenu(aura::Window* root)
: ui::SimpleMenuModel(NULL),
root_window_(root),
alignment_menu_(root) {
diff --git a/ash/shell/context_menu.h b/ash/shell/context_menu.h
index a07310e..32421ca 100644
--- a/ash/shell/context_menu.h
+++ b/ash/shell/context_menu.h
@@ -21,7 +21,7 @@ namespace shell {
class ContextMenu : public ui::SimpleMenuModel,
public ui::SimpleMenuModel::Delegate {
public:
- explicit ContextMenu(aura::RootWindow* root);
+ explicit ContextMenu(aura::Window* root);
virtual ~ContextMenu();
// ui::SimpleMenuModel::Delegate overrides:
@@ -38,7 +38,7 @@ class ContextMenu : public ui::SimpleMenuModel,
MENU_ALIGNMENT_MENU,
};
- aura::RootWindow* root_window_;
+ aura::Window* root_window_;
ShelfAlignmentMenu alignment_menu_;
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 6280f2b..717d07d 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -155,7 +155,7 @@ void ShellDelegateImpl::HandleMediaPlayPause() {
void ShellDelegateImpl::HandleMediaPrevTrack() {
}
-ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) {
+ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) {
return new ContextMenu(root);
}
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 75c14e4..35f46ff 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -52,7 +52,7 @@ class ShellDelegateImpl : public ash::ShellDelegate {
virtual void HandleMediaPlayPause() OVERRIDE;
virtual void HandleMediaPrevTrack() OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(
- aura::RootWindow* root_window) OVERRIDE;
+ aura::Window* root_window) OVERRIDE;
virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
virtual base::string16 GetProductName() const OVERRIDE;
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index 7c72e27..302a523 100644
--- a/ash/shell/window_watcher.cc
+++ b/ash/shell/window_watcher.cc
@@ -36,7 +36,7 @@ class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver {
window->RemoveObserver(watcher_);
}
- void RootWindowAdded(aura::RootWindow* root) {
+ void RootWindowAdded(aura::Window* root) {
aura::Window* panel_container = ash::Shell::GetContainer(
root,
internal::kShellWindowId_PanelContainer);
@@ -150,7 +150,7 @@ void WindowWatcher::OnDisplayBoundsChanged(const gfx::Display& display) {
}
void WindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
- aura::RootWindow* root = Shell::GetInstance()->display_controller()->
+ aura::Window* root = Shell::GetInstance()->display_controller()->
GetRootWindowForDisplayId(new_display.id());
workspace_window_watcher_->RootWindowAdded(root);
}
diff --git a/ash/shell/window_watcher_launcher_item_delegate.cc b/ash/shell/window_watcher_launcher_item_delegate.cc
index 553b9fc..e755a6e 100644
--- a/ash/shell/window_watcher_launcher_item_delegate.cc
+++ b/ash/shell/window_watcher_launcher_item_delegate.cc
@@ -36,7 +36,7 @@ base::string16 WindowWatcherLauncherItemDelegate::GetTitle() {
}
ui::MenuModel* WindowWatcherLauncherItemDelegate::CreateContextMenu(
- aura::RootWindow* root_window) {
+ aura::Window* root_window) {
return NULL;
}
diff --git a/ash/shell/window_watcher_launcher_item_delegate.h b/ash/shell/window_watcher_launcher_item_delegate.h
index e7d0b22..53014b6 100644
--- a/ash/shell/window_watcher_launcher_item_delegate.h
+++ b/ash/shell/window_watcher_launcher_item_delegate.h
@@ -25,7 +25,7 @@ class WindowWatcherLauncherItemDelegate : public ash::LauncherItemDelegate {
virtual void ItemSelected(const ui::Event& event) OVERRIDE;
virtual base::string16 GetTitle() OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(
- aura::RootWindow* root_window) OVERRIDE;
+ aura::Window* root_window) OVERRIDE;
virtual ash::LauncherMenuModel* CreateApplicationMenu(
int event_flags) OVERRIDE;
virtual bool IsDraggable() OVERRIDE;
diff --git a/ash/shell/window_watcher_unittest.cc b/ash/shell/window_watcher_unittest.cc
index 71a2f87..4d470ae 100644
--- a/ash/shell/window_watcher_unittest.cc
+++ b/ash/shell/window_watcher_unittest.cc
@@ -24,7 +24,7 @@ TEST_F(WindowWatcherTest, ShellDeleteInstance) {
shell::ShellDelegateImpl* delegate = new ash::shell::ShellDelegateImpl;
Shell::CreateInstance(delegate);
- Shell::GetPrimaryRootWindow()->ShowRootWindow();
+ Shell::GetPrimaryRootWindow()->GetDispatcher()->ShowRootWindow();
Shell::GetInstance()->CreateLauncher();
Shell::GetInstance()->UpdateAfterLoginStatusChange(
user::LOGGED_IN_USER);