| 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/wayland/server.h" | 5 #include "components/exo/wayland/server.h" |
| 6 | 6 |
| 7 #include <grp.h> | 7 #include <grp.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include <algorithm> | 24 #include <algorithm> |
| 25 #include <cstdlib> | 25 #include <cstdlib> |
| 26 #include <iterator> | 26 #include <iterator> |
| 27 #include <string> | 27 #include <string> |
| 28 #include <utility> | 28 #include <utility> |
| 29 | 29 |
| 30 #include "ash/common/display/display_info.h" | 30 #include "ash/common/display/display_info.h" |
| 31 #include "ash/common/shell_observer.h" | 31 #include "ash/common/shell_observer.h" |
| 32 #include "ash/common/shell_window_ids.h" | 32 #include "ash/common/shell_window_ids.h" |
| 33 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | |
| 34 #include "ash/common/wm_shell.h" | 33 #include "ash/common/wm_shell.h" |
| 35 #include "ash/display/display_manager.h" | 34 #include "ash/display/display_manager.h" |
| 36 #include "ash/shell.h" | 35 #include "ash/shell.h" |
| 36 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 37 #include "base/bind.h" | 37 #include "base/bind.h" |
| 38 #include "base/cancelable_callback.h" | 38 #include "base/cancelable_callback.h" |
| 39 #include "base/files/file_path.h" | 39 #include "base/files/file_path.h" |
| 40 #include "base/macros.h" | 40 #include "base/macros.h" |
| 41 #include "base/memory/free_deleter.h" | 41 #include "base/memory/free_deleter.h" |
| 42 #include "base/memory/ptr_util.h" | 42 #include "base/memory/ptr_util.h" |
| 43 #include "base/memory/weak_ptr.h" | 43 #include "base/memory/weak_ptr.h" |
| 44 #include "base/strings/stringprintf.h" | 44 #include "base/strings/stringprintf.h" |
| 45 #include "base/strings/utf_string_conversions.h" | 45 #include "base/strings/utf_string_conversions.h" |
| 46 #include "base/threading/thread.h" | 46 #include "base/threading/thread.h" |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 WaylandRemoteShell(Display* display, | 1581 WaylandRemoteShell(Display* display, |
| 1582 wl_resource* remote_shell_resource) | 1582 wl_resource* remote_shell_resource) |
| 1583 : display_(display), | 1583 : display_(display), |
| 1584 remote_shell_resource_(remote_shell_resource), | 1584 remote_shell_resource_(remote_shell_resource), |
| 1585 weak_ptr_factory_(this) { | 1585 weak_ptr_factory_(this) { |
| 1586 ash::WmShell::Get()->AddShellObserver(this); | 1586 ash::WmShell::Get()->AddShellObserver(this); |
| 1587 ash::Shell* shell = ash::Shell::GetInstance(); | 1587 ash::Shell* shell = ash::Shell::GetInstance(); |
| 1588 shell->activation_client()->AddObserver(this); | 1588 shell->activation_client()->AddObserver(this); |
| 1589 display::Screen::GetScreen()->AddObserver(this); | 1589 display::Screen::GetScreen()->AddObserver(this); |
| 1590 | 1590 |
| 1591 layout_mode_ = ash::WmShell::Get() | 1591 layout_mode_ = ash::Shell::GetInstance() |
| 1592 ->maximize_mode_controller() | 1592 ->maximize_mode_controller() |
| 1593 ->IsMaximizeModeWindowManagerEnabled() | 1593 ->IsMaximizeModeWindowManagerEnabled() |
| 1594 ? ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET | 1594 ? ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET |
| 1595 : ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED; | 1595 : ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED; |
| 1596 | 1596 |
| 1597 SendPrimaryDisplayMetrics(); | 1597 SendPrimaryDisplayMetrics(); |
| 1598 SendActivated(shell->activation_client()->GetActiveWindow(), nullptr); | 1598 SendActivated(shell->activation_client()->GetActiveWindow(), nullptr); |
| 1599 } | 1599 } |
| 1600 ~WaylandRemoteShell() override { | 1600 ~WaylandRemoteShell() override { |
| 1601 ash::WmShell::Get()->RemoveShellObserver(this); | 1601 ash::WmShell::Get()->RemoveShellObserver(this); |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3139 DCHECK(event_loop); | 3139 DCHECK(event_loop); |
| 3140 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 3140 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 3141 } | 3141 } |
| 3142 | 3142 |
| 3143 void Server::Flush() { | 3143 void Server::Flush() { |
| 3144 wl_display_flush_clients(wl_display_.get()); | 3144 wl_display_flush_clients(wl_display_.get()); |
| 3145 } | 3145 } |
| 3146 | 3146 |
| 3147 } // namespace wayland | 3147 } // namespace wayland |
| 3148 } // namespace exo | 3148 } // namespace exo |
| OLD | NEW |