| OLD | NEW |
| 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 << "Number of pending configure acks for shell surface has reached: " | 1262 << "Number of pending configure acks for shell surface has reached: " |
| 1263 << pending_configs_.size(); | 1263 << pending_configs_.size(); |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 aura::Window* ShellSurface::GetDragWindow() { | 1266 aura::Window* ShellSurface::GetDragWindow() { |
| 1267 switch (bounds_mode_) { | 1267 switch (bounds_mode_) { |
| 1268 case BoundsMode::SHELL: | 1268 case BoundsMode::SHELL: |
| 1269 return widget_->GetNativeWindow(); | 1269 return widget_->GetNativeWindow(); |
| 1270 | 1270 |
| 1271 case BoundsMode::CLIENT: | 1271 case BoundsMode::CLIENT: |
| 1272 return host_window(); | 1272 return root_surface() ? root_surface()->window() : nullptr; |
| 1273 | 1273 |
| 1274 case BoundsMode::FIXED: | 1274 case BoundsMode::FIXED: |
| 1275 return nullptr; | 1275 return nullptr; |
| 1276 } | 1276 } |
| 1277 | 1277 |
| 1278 NOTREACHED(); | 1278 NOTREACHED(); |
| 1279 return nullptr; | 1279 return nullptr; |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 void ShellSurface::AttemptToStartDrag(int component) { | 1282 void ShellSurface::AttemptToStartDrag(int component) { |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 gfx::Point ShellSurface::GetMouseLocation() const { | 1681 gfx::Point ShellSurface::GetMouseLocation() const { |
| 1682 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); | 1682 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); |
| 1683 gfx::Point location = | 1683 gfx::Point location = |
| 1684 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); | 1684 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); |
| 1685 aura::Window::ConvertPointToTarget( | 1685 aura::Window::ConvertPointToTarget( |
| 1686 root_window, widget_->GetNativeWindow()->parent(), &location); | 1686 root_window, widget_->GetNativeWindow()->parent(), &location); |
| 1687 return location; | 1687 return location; |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 } // namespace exo | 1690 } // namespace exo |
| OLD | NEW |