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

Side by Side Diff: components/exo/shell_surface.cc

Issue 2862173004: exo: Revert workaround for multi-display ARC (Closed)
Patch Set: Rebase Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/frame/custom_frame_view_ash.h" 9 #include "ash/frame/custom_frame_view_ash.h"
10 #include "ash/public/cpp/shelf_types.h" 10 #include "ash/public/cpp/shelf_types.h"
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 break; 1474 break;
1475 } 1475 }
1476 1476
1477 // Set |ignore_window_bounds_changes_| as this change to window bounds 1477 // Set |ignore_window_bounds_changes_| as this change to window bounds
1478 // should not result in a configure request. 1478 // should not result in a configure request.
1479 DCHECK(!ignore_window_bounds_changes_); 1479 DCHECK(!ignore_window_bounds_changes_);
1480 ignore_window_bounds_changes_ = true; 1480 ignore_window_bounds_changes_ = true;
1481 const gfx::Rect widget_bounds = widget_->GetWindowBoundsInScreen(); 1481 const gfx::Rect widget_bounds = widget_->GetWindowBoundsInScreen();
1482 if (widget_bounds != new_widget_bounds) { 1482 if (widget_bounds != new_widget_bounds) {
1483 if (bounds_mode_ != BoundsMode::CLIENT || !resizer_) { 1483 if (bounds_mode_ != BoundsMode::CLIENT || !resizer_) {
1484 // TODO(domlaskowski): Use screen coordinates once multi-display support 1484 widget_->SetBounds(new_widget_bounds);
1485 // lands in ARC. See crbug.com/718627.
1486 widget_->GetNativeWindow()->SetBounds(new_widget_bounds);
1487 UpdateSurfaceBounds(); 1485 UpdateSurfaceBounds();
1488 } else { 1486 } else {
1489 // TODO(domlaskowski): Synchronize window state transitions with the 1487 // TODO(domlaskowski): Synchronize window state transitions with the
1490 // client, and abort client-side dragging on transition to fullscreen. See 1488 // client, and abort client-side dragging on transition to fullscreen. See
1491 // crbug.com/699746. 1489 // crbug.com/699746.
1492 DLOG_IF(ERROR, widget_bounds.size() != new_widget_bounds.size()) 1490 DLOG_IF(ERROR, widget_bounds.size() != new_widget_bounds.size())
1493 << "Window size changed during client-driven drag"; 1491 << "Window size changed during client-driven drag";
1494 1492
1495 // Convert from screen to display coordinates. 1493 // Convert from screen to display coordinates.
1496 gfx::Point origin = new_widget_bounds.origin(); 1494 gfx::Point origin = new_widget_bounds.origin();
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 gfx::Point ShellSurface::GetMouseLocation() const { 1663 gfx::Point ShellSurface::GetMouseLocation() const {
1666 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); 1664 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow();
1667 gfx::Point location = 1665 gfx::Point location =
1668 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); 1666 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
1669 aura::Window::ConvertPointToTarget( 1667 aura::Window::ConvertPointToTarget(
1670 root_window, widget_->GetNativeWindow()->parent(), &location); 1668 root_window, widget_->GetNativeWindow()->parent(), &location);
1671 return location; 1669 return location;
1672 } 1670 }
1673 1671
1674 } // namespace exo 1672 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698