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 // This has to be before any other includes, else default is picked up. | 5 // This has to be before any other includes, else default is picked up. |
6 // See base/logging for details on this. | 6 // See base/logging for details on this. |
7 #define NOTIMPLEMENTED_POLICY 5 | 7 #define NOTIMPLEMENTED_POLICY 5 |
8 | 8 |
9 #include "ui/views/mus/native_widget_mus.h" | 9 #include "ui/views/mus/native_widget_mus.h" |
10 | 10 |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 native_widget_delegate_->OnGestureEvent(event); | 1471 native_widget_delegate_->OnGestureEvent(event); |
1472 } | 1472 } |
1473 | 1473 |
1474 void NativeWidgetMus::OnHostResized(const aura::WindowTreeHost* host) { | 1474 void NativeWidgetMus::OnHostResized(const aura::WindowTreeHost* host) { |
1475 native_widget_delegate_->OnNativeWidgetSizeChanged( | 1475 native_widget_delegate_->OnNativeWidgetSizeChanged( |
1476 host->window()->bounds().size()); | 1476 host->window()->bounds().size()); |
1477 UpdateClientArea(); | 1477 UpdateClientArea(); |
1478 UpdateHitTestMask(); | 1478 UpdateHitTestMask(); |
1479 } | 1479 } |
1480 | 1480 |
1481 void NativeWidgetMus::OnHostMoved(const aura::WindowTreeHost* host, | 1481 void NativeWidgetMus::OnHostMovedInPixel( |
1482 const gfx::Point& new_origin) { | 1482 const aura::WindowTreeHost* host, |
| 1483 const gfx::Point& new_origin_in_pixel) { |
1483 native_widget_delegate_->OnNativeWidgetMove(); | 1484 native_widget_delegate_->OnNativeWidgetMove(); |
1484 } | 1485 } |
1485 | 1486 |
1486 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { | 1487 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { |
1487 GetWidget()->Close(); | 1488 GetWidget()->Close(); |
1488 } | 1489 } |
1489 | 1490 |
1490 //////////////////////////////////////////////////////////////////////////////// | 1491 //////////////////////////////////////////////////////////////////////////////// |
1491 // NativeWidgetMus, aura::WindowDragDropDelegate implementation: | 1492 // NativeWidgetMus, aura::WindowDragDropDelegate implementation: |
1492 | 1493 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 | 1576 |
1576 gfx::Path mask_path; | 1577 gfx::Path mask_path; |
1577 native_widget_delegate_->GetHitTestMask(&mask_path); | 1578 native_widget_delegate_->GetHitTestMask(&mask_path); |
1578 // TODO(jamescook): Use the full path for the mask. | 1579 // TODO(jamescook): Use the full path for the mask. |
1579 gfx::Rect mask_rect = | 1580 gfx::Rect mask_rect = |
1580 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1581 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
1581 window_->SetHitTestMask(mask_rect); | 1582 window_->SetHitTestMask(mask_rect); |
1582 } | 1583 } |
1583 | 1584 |
1584 } // namespace views | 1585 } // namespace views |
OLD | NEW |