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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 private: | 524 private: |
525 aura::Window* aura_window_; | 525 aura::Window* aura_window_; |
526 ui::Window* mus_window_; | 526 ui::Window* mus_window_; |
527 | 527 |
528 DISALLOW_COPY_AND_ASSIGN(MusCaptureClient); | 528 DISALLOW_COPY_AND_ASSIGN(MusCaptureClient); |
529 }; | 529 }; |
530 | 530 |
531 //////////////////////////////////////////////////////////////////////////////// | 531 //////////////////////////////////////////////////////////////////////////////// |
532 // NativeWidgetMus, public: | 532 // NativeWidgetMus, public: |
533 | 533 |
534 NativeWidgetMus::NativeWidgetMus(internal::NativeWidgetDelegate* delegate, | 534 NativeWidgetMus::NativeWidgetMus( |
535 ui::Window* window, | 535 internal::NativeWidgetDelegate* delegate, |
536 ui::mojom::SurfaceType surface_type) | 536 ui::Window* window, |
| 537 ui::mojom::CompositorFrameSinkType compositor_frame_sink_type) |
537 : window_(window), | 538 : window_(window), |
538 last_cursor_(ui::mojom::Cursor::CURSOR_NULL), | 539 last_cursor_(ui::mojom::Cursor::CURSOR_NULL), |
539 native_widget_delegate_(delegate), | 540 native_widget_delegate_(delegate), |
540 surface_type_(surface_type), | 541 compositor_frame_sink_type_(compositor_frame_sink_type), |
541 show_state_before_fullscreen_(ui::mojom::ShowState::DEFAULT), | 542 show_state_before_fullscreen_(ui::mojom::ShowState::DEFAULT), |
542 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), | 543 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), |
543 content_(new aura::Window(this)), | 544 content_(new aura::Window(this)), |
544 last_drop_operation_(ui::DragDropTypes::DRAG_NONE), | 545 last_drop_operation_(ui::DragDropTypes::DRAG_NONE), |
545 close_widget_factory_(this) { | 546 close_widget_factory_(this) { |
546 window_->set_input_event_handler(this); | 547 window_->set_input_event_handler(this); |
547 mus_window_observer_ = base::MakeUnique<MusWindowObserver>(this); | 548 mus_window_observer_ = base::MakeUnique<MusWindowObserver>(this); |
548 | 549 |
549 // TODO(fsamuel): Figure out lifetime of |window_|. | 550 // TODO(fsamuel): Figure out lifetime of |window_|. |
550 aura::SetMusWindow(content_, window_); | 551 aura::SetMusWindow(content_, window_); |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 | 1569 |
1569 gfx::Path mask_path; | 1570 gfx::Path mask_path; |
1570 native_widget_delegate_->GetHitTestMask(&mask_path); | 1571 native_widget_delegate_->GetHitTestMask(&mask_path); |
1571 // TODO(jamescook): Use the full path for the mask. | 1572 // TODO(jamescook): Use the full path for the mask. |
1572 gfx::Rect mask_rect = | 1573 gfx::Rect mask_rect = |
1573 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1574 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
1574 window_->SetHitTestMask(mask_rect); | 1575 window_->SetHitTestMask(mask_rect); |
1575 } | 1576 } |
1576 | 1577 |
1577 } // namespace views | 1578 } // namespace views |
OLD | NEW |