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

Side by Side Diff: ui/ozone/platform/wayland/wayland_display.cc

Issue 1742883002: ozone/platform/wayland: Drop WaylandWindow::GetWidget() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-test1
Patch Set: Created 4 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/ozone/platform/wayland/wayland_display.h" 5 #include "ui/ozone/platform/wayland/wayland_display.h"
6 6
7 #include <xdg-shell-unstable-v5-client-protocol.h> 7 #include <xdg-shell-unstable-v5-client-protocol.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void WaylandDisplay::Flush() { 63 void WaylandDisplay::Flush() {
64 DCHECK(display_); 64 DCHECK(display_);
65 wl_display_flush(display_.get()); 65 wl_display_flush(display_.get());
66 } 66 }
67 67
68 WaylandWindow* WaylandDisplay::GetWindow(gfx::AcceleratedWidget widget) { 68 WaylandWindow* WaylandDisplay::GetWindow(gfx::AcceleratedWidget widget) {
69 auto it = window_map_.find(widget); 69 auto it = window_map_.find(widget);
70 return it == window_map_.end() ? nullptr : it->second; 70 return it == window_map_.end() ? nullptr : it->second;
71 } 71 }
72 72
73 void WaylandDisplay::AddWindow(WaylandWindow* window) { 73 void WaylandDisplay::AddWindow(gfx::AcceleratedWidget widget,
74 window_map_[window->GetWidget()] = window; 74 WaylandWindow* window) {
75 window_map_[widget] = window;
75 } 76 }
76 77
77 void WaylandDisplay::RemoveWindow(WaylandWindow* window) { 78 void WaylandDisplay::RemoveWindow(gfx::AcceleratedWidget widget) {
78 window_map_.erase(window->GetWidget()); 79 window_map_.erase(widget);
79 } 80 }
80 81
81 void WaylandDisplay::OnDispatcherListChanged() { 82 void WaylandDisplay::OnDispatcherListChanged() {
82 if (watching_) 83 if (watching_)
83 return; 84 return;
84 85
85 DCHECK(display_); 86 DCHECK(display_);
86 DCHECK(base::MessageLoopForUI::IsCurrent()); 87 DCHECK(base::MessageLoopForUI::IsCurrent());
87 base::MessageLoopForUI::current()->WatchFileDescriptor( 88 base::MessageLoopForUI::current()->WatchFileDescriptor(
88 wl_display_get_fd(display_.get()), true, 89 wl_display_get_fd(display_.get()), true,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 uint32_t name) { 139 uint32_t name) {
139 NOTIMPLEMENTED(); 140 NOTIMPLEMENTED();
140 } 141 }
141 142
142 // static 143 // static
143 void WaylandDisplay::Ping(void* data, xdg_shell* shell, uint32_t serial) { 144 void WaylandDisplay::Ping(void* data, xdg_shell* shell, uint32_t serial) {
144 xdg_shell_pong(shell, serial); 145 xdg_shell_pong(shell, serial);
145 } 146 }
146 147
147 } // namespace ui 148 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_display.h ('k') | ui/ozone/platform/wayland/wayland_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698