| 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 <wayland-server-core.h> | 7 #include <wayland-server-core.h> |
| 8 #include <wayland-server-protocol-core.h> | 8 #include <wayland-server-protocol-core.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 void shell_surface_set_title(wl_client* client, | 638 void shell_surface_set_title(wl_client* client, |
| 639 wl_resource* resource, | 639 wl_resource* resource, |
| 640 const char* title) { | 640 const char* title) { |
| 641 GetUserDataAs<ShellSurface>(resource) | 641 GetUserDataAs<ShellSurface>(resource) |
| 642 ->SetTitle(base::string16(base::ASCIIToUTF16(title))); | 642 ->SetTitle(base::string16(base::ASCIIToUTF16(title))); |
| 643 } | 643 } |
| 644 | 644 |
| 645 void shell_surface_set_class(wl_client* client, | 645 void shell_surface_set_class(wl_client* client, |
| 646 wl_resource* resource, | 646 wl_resource* resource, |
| 647 const char* clazz) { | 647 const char* clazz) { |
| 648 NOTIMPLEMENTED(); | 648 GetUserDataAs<ShellSurface>(resource)->SetApplicationId(clazz); |
| 649 } | 649 } |
| 650 | 650 |
| 651 const struct wl_shell_surface_interface shell_surface_implementation = { | 651 const struct wl_shell_surface_interface shell_surface_implementation = { |
| 652 shell_surface_pong, shell_surface_move, | 652 shell_surface_pong, shell_surface_move, |
| 653 shell_surface_resize, shell_surface_set_toplevel, | 653 shell_surface_resize, shell_surface_set_toplevel, |
| 654 shell_surface_set_transient, shell_surface_set_fullscreen, | 654 shell_surface_set_transient, shell_surface_set_fullscreen, |
| 655 shell_surface_set_popup, shell_surface_set_maximized, | 655 shell_surface_set_popup, shell_surface_set_maximized, |
| 656 shell_surface_set_title, shell_surface_set_class}; | 656 shell_surface_set_title, shell_surface_set_class}; |
| 657 | 657 |
| 658 //////////////////////////////////////////////////////////////////////////////// | 658 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 DCHECK(event_loop); | 741 DCHECK(event_loop); |
| 742 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 742 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 743 } | 743 } |
| 744 | 744 |
| 745 void Server::Flush() { | 745 void Server::Flush() { |
| 746 wl_display_flush_clients(wl_display_.get()); | 746 wl_display_flush_clients(wl_display_.get()); |
| 747 } | 747 } |
| 748 | 748 |
| 749 } // namespace wayland | 749 } // namespace wayland |
| 750 } // namespace exo | 750 } // namespace exo |
| OLD | NEW |