| 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 "ash/aura/wm_window_aura.h" |
| 7 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
| 8 #include "ash/common/wm/window_resizer.h" | 9 #include "ash/common/wm/window_resizer.h" |
| 9 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| 10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 11 #include "ash/wm/aura/wm_window_aura.h" | |
| 12 #include "ash/wm/window_state_aura.h" | 12 #include "ash/wm/window_state_aura.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/trace_event/trace_event.h" | 17 #include "base/trace_event/trace_event.h" |
| 18 #include "base/trace_event/trace_event_argument.h" | 18 #include "base/trace_event/trace_event_argument.h" |
| 19 #include "components/exo/surface.h" | 19 #include "components/exo/surface.h" |
| 20 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 21 #include "ui/aura/window_event_dispatcher.h" | 21 #include "ui/aura/window_event_dispatcher.h" |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 break; | 822 break; |
| 823 case HTTOPLEFT: | 823 case HTTOPLEFT: |
| 824 cursor_client->SetCursor(ui::kCursorNorthWestResize); | 824 cursor_client->SetCursor(ui::kCursorNorthWestResize); |
| 825 break; | 825 break; |
| 826 default: | 826 default: |
| 827 NOTREACHED(); | 827 NOTREACHED(); |
| 828 break; | 828 break; |
| 829 } | 829 } |
| 830 | 830 |
| 831 resizer_ = ash::CreateWindowResizer( | 831 resizer_ = ash::CreateWindowResizer( |
| 832 ash::wm::WmWindowAura::Get(widget_->GetNativeWindow()), drag_location, | 832 ash::WmWindowAura::Get(widget_->GetNativeWindow()), drag_location, |
| 833 component, aura::client::WINDOW_MOVE_SOURCE_MOUSE); | 833 component, aura::client::WINDOW_MOVE_SOURCE_MOUSE); |
| 834 if (!resizer_) | 834 if (!resizer_) |
| 835 return; | 835 return; |
| 836 | 836 |
| 837 // Apply pending origin offsets and resize direction before starting a new | 837 // Apply pending origin offsets and resize direction before starting a new |
| 838 // resize operation. These can still be pending if the client has acknowledged | 838 // resize operation. These can still be pending if the client has acknowledged |
| 839 // the configure request but not yet called Commit(). | 839 // the configure request but not yet called Commit(). |
| 840 origin_ += pending_origin_offset_; | 840 origin_ += pending_origin_offset_; |
| 841 pending_origin_offset_ = gfx::Vector2d(); | 841 pending_origin_offset_ = gfx::Vector2d(); |
| 842 resize_component_ = pending_resize_component_; | 842 resize_component_ = pending_resize_component_; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 gfx::Rect(window_size).InsetsFrom(non_transparent_bounds); | 964 gfx::Rect(window_size).InsetsFrom(non_transparent_bounds); |
| 965 ash::wm::WindowState* window_state = | 965 ash::wm::WindowState* window_state = |
| 966 ash::wm::GetWindowState(widget_->GetNativeWindow()); | 966 ash::wm::GetWindowState(widget_->GetNativeWindow()); |
| 967 if (window_state->transparent_insets() != transparent_insets) { | 967 if (window_state->transparent_insets() != transparent_insets) { |
| 968 window_state->set_transparent_insets(transparent_insets); | 968 window_state->set_transparent_insets(transparent_insets); |
| 969 ash::Shell::GetInstance()->UpdateShelfVisibility(); | 969 ash::Shell::GetInstance()->UpdateShelfVisibility(); |
| 970 } | 970 } |
| 971 } | 971 } |
| 972 | 972 |
| 973 } // namespace exo | 973 } // namespace exo |
| OLD | NEW |