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