| Index: ash/display/display_controller.cc
|
| diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
|
| index 5714b93cf759473300e6765a7963b1af8aee9c72..42524d26729866580af9d3c097fea4b1eae79cb6 100644
|
| --- a/ash/display/display_controller.cc
|
| +++ b/ash/display/display_controller.cc
|
| @@ -144,7 +144,7 @@ class FocusActivationStore {
|
|
|
| void Store(bool display_removed) {
|
| if (!activation_client_) {
|
| - aura::RootWindow* root = Shell::GetPrimaryRootWindow();
|
| + aura::Window* root = Shell::GetPrimaryRootWindow();
|
| activation_client_ = aura::client::GetActivationClient(root);
|
| capture_client_ = aura::client::GetCaptureClient(root);
|
| focus_client_ = aura::client::GetFocusClient(root);
|
| @@ -311,12 +311,12 @@ void DisplayController::RemoveObserver(Observer* observer) {
|
| observers_.RemoveObserver(observer);
|
| }
|
|
|
| -aura::RootWindow* DisplayController::GetPrimaryRootWindow() {
|
| +aura::Window* DisplayController::GetPrimaryRootWindow() {
|
| DCHECK(!root_windows_.empty());
|
| return root_windows_[primary_display_id];
|
| }
|
|
|
| -aura::RootWindow* DisplayController::GetRootWindowForDisplayId(int64 id) {
|
| +aura::Window* DisplayController::GetRootWindowForDisplayId(int64 id) {
|
| return root_windows_[id];
|
| }
|
|
|
| @@ -495,12 +495,12 @@ void DisplayController::EnsurePointerInDisplays() {
|
| int64 closest_distance_squared = -1;
|
| internal::DisplayManager* display_manager = GetDisplayManager();
|
|
|
| - aura::RootWindow* dst_root_window = NULL;
|
| + aura::Window* dst_root_window = NULL;
|
| for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
|
| const gfx::Display& display = display_manager->GetDisplayAt(i);
|
| const internal::DisplayInfo display_info =
|
| display_manager->GetDisplayInfo(display.id());
|
| - aura::RootWindow* root_window = GetRootWindowForDisplayId(display.id());
|
| + aura::Window* root_window = GetRootWindowForDisplayId(display.id());
|
| if (display_info.bounds_in_native().Contains(
|
| cursor_location_in_native_coords_for_restore_)) {
|
| dst_root_window = root_window;
|
| @@ -517,24 +517,25 @@ void DisplayController::EnsurePointerInDisplays() {
|
| int64 distance_squared = (center - point_in_screen).LengthSquared();
|
| if (closest_distance_squared < 0 ||
|
| closest_distance_squared > distance_squared) {
|
| - aura::RootWindow* root_window = GetRootWindowForDisplayId(display.id());
|
| + aura::Window* root_window = GetRootWindowForDisplayId(display.id());
|
| aura::client::ScreenPositionClient* client =
|
| aura::client::GetScreenPositionClient(root_window);
|
| client->ConvertPointFromScreen(root_window, ¢er);
|
| - root_window->ConvertPointToNativeScreen(¢er);
|
| + root_window->GetDispatcher()->ConvertPointToNativeScreen(¢er);
|
| dst_root_window = root_window;
|
| target_location_in_native = center;
|
| closest_distance_squared = distance_squared;
|
| }
|
| }
|
| - dst_root_window->ConvertPointFromNativeScreen(&target_location_in_native);
|
| + dst_root_window->GetDispatcher()->ConvertPointFromNativeScreen(
|
| + &target_location_in_native);
|
| dst_root_window->MoveCursorTo(target_location_in_native);
|
| }
|
|
|
| bool DisplayController::UpdateWorkAreaOfDisplayNearestWindow(
|
| const aura::Window* window,
|
| const gfx::Insets& insets) {
|
| - const aura::RootWindow* root_window = window->GetRootWindow();
|
| + const aura::Window* root_window = window->GetRootWindow();
|
| int64 id = internal::GetRootWindowSettings(root_window)->display_id;
|
| // if id is |kInvaildDisplayID|, it's being deleted.
|
| DCHECK(id != gfx::Display::kInvalidDisplayID);
|
| @@ -545,7 +546,7 @@ const gfx::Display& DisplayController::GetDisplayNearestWindow(
|
| const aura::Window* window) const {
|
| if (!window)
|
| return GetPrimaryDisplay();
|
| - const aura::RootWindow* root_window = window->GetRootWindow();
|
| + const aura::Window* root_window = window->GetRootWindow();
|
| if (!root_window)
|
| return GetPrimaryDisplay();
|
| int64 id = internal::GetRootWindowSettings(root_window)->display_id;
|
| @@ -691,12 +692,12 @@ void DisplayController::PreDisplayConfigurationChange(bool display_removed) {
|
| gfx::Point point_in_screen = Shell::GetScreen()->GetCursorScreenPoint();
|
| gfx::Display display =
|
| Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen);
|
| - aura::RootWindow* root_window = GetRootWindowForDisplayId(display.id());
|
| + aura::Window* root_window = GetRootWindowForDisplayId(display.id());
|
|
|
| aura::client::ScreenPositionClient* client =
|
| aura::client::GetScreenPositionClient(root_window);
|
| client->ConvertPointFromScreen(root_window, &point_in_screen);
|
| - root_window->ConvertPointToNativeScreen(&point_in_screen);
|
| + root_window->GetDispatcher()->ConvertPointToNativeScreen(&point_in_screen);
|
| cursor_location_in_native_coords_for_restore_ = point_in_screen;
|
| }
|
|
|
| @@ -774,12 +775,13 @@ void DisplayController::UpdateHostWindowNames() {
|
| // crbug.com/120229 - set the window title for the primary dislpay
|
| // to "aura_root_0" so gtalk can find the primary root window to broadcast.
|
| // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting.
|
| - aura::RootWindow* primary = Shell::GetPrimaryRootWindow();
|
| + aura::Window* primary = Shell::GetPrimaryRootWindow();
|
| Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
|
| for (size_t i = 0; i < root_windows.size(); ++i) {
|
| std::string name =
|
| root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
|
| - gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget();
|
| + gfx::AcceleratedWidget xwindow =
|
| + root_windows[i]->GetDispatcher()->GetAcceleratedWidget();
|
| XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
|
| }
|
| #endif
|
|
|