Chromium Code Reviews| 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 <alpha-compositing-unstable-v1-server-protocol.h> | 7 #include <alpha-compositing-unstable-v1-server-protocol.h> |
| 8 #include <gaming-input-unstable-v1-server-protocol.h> | 8 #include <gaming-input-unstable-v1-server-protocol.h> |
| 9 #include <gaming-input-unstable-v2-server-protocol.h> | 9 #include <gaming-input-unstable-v2-server-protocol.h> |
| 10 #include <grp.h> | 10 #include <grp.h> |
| (...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1944 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true); | 1944 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true); |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 void remote_surface_unfullscreen(wl_client* client, wl_resource* resource) { | 1947 void remote_surface_unfullscreen(wl_client* client, wl_resource* resource) { |
| 1948 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false); | 1948 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false); |
| 1949 } | 1949 } |
| 1950 | 1950 |
| 1951 void remote_surface_pin(wl_client* client, | 1951 void remote_surface_pin(wl_client* client, |
| 1952 wl_resource* resource, | 1952 wl_resource* resource, |
| 1953 int32_t trusted) { | 1953 int32_t trusted) { |
| 1954 GetUserDataAs<ShellSurface>(resource)->SetPinned(true, trusted); | 1954 ash::mojom::WindowPinType type = |
|
reveman
2017/04/04 18:26:16
optional nit: no need for this temporary variable
Peng
2017/04/04 19:43:49
Done.
| |
| 1955 trusted ? ash::mojom::WindowPinType::TRUSTED_PINNED | |
| 1956 : ash::mojom::WindowPinType::PINNED; | |
| 1957 GetUserDataAs<ShellSurface>(resource)->SetPinned(type); | |
| 1955 } | 1958 } |
| 1956 | 1959 |
| 1957 void remote_surface_unpin(wl_client* client, wl_resource* resource) { | 1960 void remote_surface_unpin(wl_client* client, wl_resource* resource) { |
| 1958 GetUserDataAs<ShellSurface>(resource)->SetPinned(false, /* trusted */ false); | 1961 GetUserDataAs<ShellSurface>(resource)->SetPinned( |
| 1962 ash::mojom::WindowPinType::NONE); | |
| 1959 } | 1963 } |
| 1960 | 1964 |
| 1961 void remote_surface_set_system_modal(wl_client* client, wl_resource* resource) { | 1965 void remote_surface_set_system_modal(wl_client* client, wl_resource* resource) { |
| 1962 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(true); | 1966 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(true); |
| 1963 } | 1967 } |
| 1964 | 1968 |
| 1965 void remote_surface_unset_system_modal(wl_client* client, | 1969 void remote_surface_unset_system_modal(wl_client* client, |
| 1966 wl_resource* resource) { | 1970 wl_resource* resource) { |
| 1967 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(false); | 1971 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(false); |
| 1968 } | 1972 } |
| (...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3922 DCHECK(event_loop); | 3926 DCHECK(event_loop); |
| 3923 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 3927 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 3924 } | 3928 } |
| 3925 | 3929 |
| 3926 void Server::Flush() { | 3930 void Server::Flush() { |
| 3927 wl_display_flush_clients(wl_display_.get()); | 3931 wl_display_flush_clients(wl_display_.get()); |
| 3928 } | 3932 } |
| 3929 | 3933 |
| 3930 } // namespace wayland | 3934 } // namespace wayland |
| 3931 } // namespace exo | 3935 } // namespace exo |
| OLD | NEW |