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

Unified Diff: ash/shell.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First cut for review/trybots Created 7 years, 2 months 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 50810a366ae2e943a282765ed6e662516b07f6b1..7c4d8a7342b53a5ee498e6f2bd00de3123e39150 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -201,12 +201,12 @@ Shell::RootWindowControllerList Shell::GetAllRootWindowControllers() {
}
// static
-aura::RootWindow* Shell::GetPrimaryRootWindow() {
+aura::Window* Shell::GetPrimaryRootWindow() {
return GetInstance()->display_controller()->GetPrimaryRootWindow();
}
// static
-aura::RootWindow* Shell::GetTargetRootWindow() {
+aura::Window* Shell::GetTargetRootWindow() {
Shell* shell = GetInstance();
if (shell->scoped_target_root_window_)
return shell->scoped_target_root_window_;
@@ -225,13 +225,13 @@ Shell::RootWindowList Shell::GetAllRootWindows() {
}
// static
-aura::Window* Shell::GetContainer(aura::RootWindow* root_window,
+aura::Window* Shell::GetContainer(aura::Window* root_window,
int container_id) {
return root_window->GetChildById(container_id);
}
// static
-const aura::Window* Shell::GetContainer(const aura::RootWindow* root_window,
+const aura::Window* Shell::GetContainer(const aura::Window* root_window,
int container_id) {
return root_window->GetChildById(container_id);
}
@@ -239,7 +239,7 @@ const aura::Window* Shell::GetContainer(const aura::RootWindow* root_window,
// static
std::vector<aura::Window*> Shell::GetContainersFromAllRootWindows(
int container_id,
- aura::RootWindow* priority_root) {
+ aura::Window* priority_root) {
std::vector<aura::Window*> containers;
RootWindowList root_windows = GetAllRootWindows();
for (RootWindowList::const_iterator it = root_windows.begin();
@@ -264,7 +264,7 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
if (session_state_delegate_->IsScreenLocked())
return;
- aura::RootWindow* root =
+ aura::Window* root =
wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size()));
internal::GetRootWindowController(root)->
ShowContextMenu(location_in_screen, source_type);
@@ -399,19 +399,19 @@ void Shell::UpdateShelfVisibility() {
}
void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
- aura::RootWindow* root_window) {
+ aura::Window* root_window) {
ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
SetAutoHideBehavior(behavior);
}
ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior(
- aura::RootWindow* root_window) const {
+ aura::Window* root_window) const {
return ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
auto_hide_behavior();
}
void Shell::SetShelfAlignment(ShelfAlignment alignment,
- aura::RootWindow* root_window) {
+ aura::Window* root_window) {
if (ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
SetAlignment(alignment)) {
FOR_EACH_OBSERVER(
@@ -419,7 +419,7 @@ void Shell::SetShelfAlignment(ShelfAlignment alignment,
}
}
-ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) {
+ShelfAlignment Shell::GetShelfAlignment(aura::Window* root_window) {
return internal::GetRootWindowController(root_window)->
GetShelfLayoutManager()->GetAlignment();
}
@@ -432,7 +432,7 @@ void Shell::SetDimming(bool should_dim) {
}
void Shell::NotifyFullscreenStateChange(bool is_fullscreen,
- aura::RootWindow* root_window) {
+ aura::Window* root_window) {
FOR_EACH_OBSERVER(ShellObserver, observers_, OnFullscreenStateChanged(
is_fullscreen, root_window));
}
@@ -742,7 +742,7 @@ void Shell::Init() {
display_controller_->Start();
display_controller_->InitPrimaryDisplay();
- aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
+ aura::Window* root_window = display_controller_->GetPrimaryRootWindow();
target_root_window_ = root_window;
resolution_notification_controller_.reset(
@@ -767,7 +767,7 @@ void Shell::Init() {
AddShellObserver(overlay_filter_.get());
input_method_filter_.reset(new views::corewm::InputMethodEventFilter(
- root_window->GetAcceleratedWidget()));
+ root_window->GetDispatcher()->GetAcceleratedWidget()));
AddPreTargetHandler(input_method_filter_.get());
accelerator_filter_.reset(new internal::AcceleratorFilter);
@@ -856,7 +856,8 @@ void Shell::Init() {
// TODO(oshima): Initialize all RootWindowControllers once, and
// initialize controller/delegates above when initializing the
// primary root window controller.
- internal::RootWindowController::CreateForPrimaryDisplay(root_window);
+ internal::RootWindowController::CreateForPrimaryDisplay(
+ root_window->GetDispatcher());
display_controller_->InitSecondaryDisplays();

Powered by Google App Engine
This is Rietveld 408576698