| 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 "ui/views/mus/platform_window_mus.h" | 5 #include "ui/views/mus/platform_window_mus.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "components/bitmap_uploader/bitmap_uploader.h" | 8 #include "components/bitmap_uploader/bitmap_uploader.h" |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window_property.h" | 10 #include "components/mus/public/cpp/window_property.h" |
| 11 #include "components/mus/public/interfaces/window_manager.mojom.h" | 11 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| 12 #include "mojo/converters/input_events/input_events_type_converters.h" | 12 #include "mojo/converters/input_events/input_events_type_converters.h" |
| 13 #include "ui/base/view_prop.h" | 13 #include "ui/base/view_prop.h" |
| 14 #include "ui/platform_window/platform_window_delegate.h" | 14 #include "ui/platform_window/platform_window_delegate.h" |
| 15 #include "ui/views/mus/window_manager_connection.h" | 15 #include "ui/views/mus/window_manager_connection.h" |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 static uint32_t accelerated_widget_count = 1; | 20 static uint32_t accelerated_widget_count = 1; |
| 21 | 21 |
| 22 } // namespace | 22 } // namespace |
| 23 | 23 |
| 24 PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate, | 24 PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate, |
| 25 mojo::Shell* shell, | 25 mojo::shell::mojom::Shell* shell, |
| 26 mus::Window* mus_window) | 26 mus::Window* mus_window) |
| 27 : delegate_(delegate), | 27 : delegate_(delegate), |
| 28 mus_window_(mus_window), | 28 mus_window_(mus_window), |
| 29 show_state_(mus::mojom::ShowState::RESTORED), | 29 show_state_(mus::mojom::ShowState::RESTORED), |
| 30 last_cursor_(mus::mojom::Cursor::CURSOR_NULL), | 30 last_cursor_(mus::mojom::Cursor::CURSOR_NULL), |
| 31 has_capture_(false), | 31 has_capture_(false), |
| 32 mus_window_destroyed_(false) { | 32 mus_window_destroyed_(false) { |
| 33 DCHECK(delegate_); | 33 DCHECK(delegate_); |
| 34 DCHECK(mus_window_); | 34 DCHECK(mus_window_); |
| 35 mus_window_->AddObserver(this); | 35 mus_window_->AddObserver(this); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // It's possible dispatching the event will spin a nested message loop. Ack | 232 // It's possible dispatching the event will spin a nested message loop. Ack |
| 233 // the callback now, otherwise we appear unresponsive for the life of the | 233 // the callback now, otherwise we appear unresponsive for the life of the |
| 234 // nested message loop. | 234 // nested message loop. |
| 235 (*ack_callback)->Run(); | 235 (*ack_callback)->Run(); |
| 236 ack_callback->reset(); | 236 ack_callback->reset(); |
| 237 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); | 237 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); |
| 238 delegate_->DispatchEvent(ui_event.get()); | 238 delegate_->DispatchEvent(ui_event.get()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace views | 241 } // namespace views |
| OLD | NEW |