Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: components/exo/wayland/server.cc

Issue 2778733004: Add WindowPinType property on arua::Window (Closed)
Patch Set: Address review issues Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« components/exo/shell_surface.h ('K') | « components/exo/shell_surface_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698