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

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

Issue 2639053002: [ozone/wayland] Implement basic keyboard handling support (Closed)
Patch Set: addressed kpschoedel's review Created 3 years, 11 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_window.h" 5 #include "ui/ozone/platform/wayland/wayland_window.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/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 PlatformImeController* WaylandWindow::GetPlatformImeController() { 143 PlatformImeController* WaylandWindow::GetPlatformImeController() {
144 NOTIMPLEMENTED(); 144 NOTIMPLEMENTED();
145 return nullptr; 145 return nullptr;
146 } 146 }
147 147
148 bool WaylandWindow::CanDispatchEvent(const PlatformEvent& native_event) { 148 bool WaylandWindow::CanDispatchEvent(const PlatformEvent& native_event) {
149 Event* event = static_cast<Event*>(native_event); 149 Event* event = static_cast<Event*>(native_event);
150 if (event->IsMouseEvent()) 150 if (event->IsMouseEvent())
151 return has_pointer_focus_; 151 return has_pointer_focus_;
152 if (event->IsKeyEvent())
153 return has_keyboard_focus_;
152 return false; 154 return false;
153 } 155 }
154 156
155 uint32_t WaylandWindow::DispatchEvent(const PlatformEvent& native_event) { 157 uint32_t WaylandWindow::DispatchEvent(const PlatformEvent& native_event) {
156 DispatchEventFromNativeUiEvent( 158 DispatchEventFromNativeUiEvent(
157 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, 159 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent,
158 base::Unretained(delegate_))); 160 base::Unretained(delegate_)));
159 return POST_DISPATCH_STOP_PROPAGATION; 161 return POST_DISPATCH_STOP_PROPAGATION;
160 } 162 }
161 163
(...skipping 13 matching lines...) Expand all
175 window->pending_bounds_ = gfx::Rect(0, 0, width, height); 177 window->pending_bounds_ = gfx::Rect(0, 0, width, height);
176 window->pending_configure_serial_ = serial; 178 window->pending_configure_serial_ = serial;
177 } 179 }
178 180
179 // static 181 // static
180 void WaylandWindow::Close(void* data, xdg_surface* obj) { 182 void WaylandWindow::Close(void* data, xdg_surface* obj) {
181 NOTIMPLEMENTED(); 183 NOTIMPLEMENTED();
182 } 184 }
183 185
184 } // namespace ui 186 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_window.h ('k') | ui/ozone/platform/wayland/wayland_xkb_keyboard_layout_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698