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

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
« no previous file with comments | « components/exo/shell_surface_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 #include <xdg-shell-unstable-v5-server-protocol.h> 24 #include <xdg-shell-unstable-v5-server-protocol.h>
25 #include <xdg-shell-unstable-v6-server-protocol.h> 25 #include <xdg-shell-unstable-v6-server-protocol.h>
26 26
27 #include <algorithm> 27 #include <algorithm>
28 #include <cstdlib> 28 #include <cstdlib>
29 #include <iterator> 29 #include <iterator>
30 #include <string> 30 #include <string>
31 #include <utility> 31 #include <utility>
32 32
33 #include "ash/public/cpp/shell_window_ids.h" 33 #include "ash/public/cpp/shell_window_ids.h"
34 #include "ash/public/interfaces/window_pin_type.mojom.h"
34 #include "ash/shell.h" 35 #include "ash/shell.h"
35 #include "base/bind.h" 36 #include "base/bind.h"
36 #include "base/cancelable_callback.h" 37 #include "base/cancelable_callback.h"
37 #include "base/files/file_path.h" 38 #include "base/files/file_path.h"
38 #include "base/macros.h" 39 #include "base/macros.h"
39 #include "base/memory/free_deleter.h" 40 #include "base/memory/free_deleter.h"
40 #include "base/memory/ptr_util.h" 41 #include "base/memory/ptr_util.h"
41 #include "base/memory/weak_ptr.h" 42 #include "base/memory/weak_ptr.h"
42 #include "base/strings/stringprintf.h" 43 #include "base/strings/stringprintf.h"
43 #include "base/strings/utf_string_conversions.h" 44 #include "base/strings/utf_string_conversions.h"
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true); 1945 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true);
1945 } 1946 }
1946 1947
1947 void remote_surface_unfullscreen(wl_client* client, wl_resource* resource) { 1948 void remote_surface_unfullscreen(wl_client* client, wl_resource* resource) {
1948 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false); 1949 GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false);
1949 } 1950 }
1950 1951
1951 void remote_surface_pin(wl_client* client, 1952 void remote_surface_pin(wl_client* client,
1952 wl_resource* resource, 1953 wl_resource* resource,
1953 int32_t trusted) { 1954 int32_t trusted) {
1954 GetUserDataAs<ShellSurface>(resource)->SetPinned(true, trusted); 1955 GetUserDataAs<ShellSurface>(resource)->SetPinned(
1956 trusted ? ash::mojom::WindowPinType::TRUSTED_PINNED
1957 : ash::mojom::WindowPinType::PINNED);
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
« no previous file with comments | « components/exo/shell_surface_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698