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

Side by Side Diff: ui/ozone/platform/drm/cursor_proxy_mojo.cc

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more proof-reading Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h"
6
7 #include "services/shell/public/cpp/connector.h"
8
9 namespace ui {
10
11 CursorProxyMojo::CursorProxyMojo(shell::Connector* connector)
12 : connector_(connector->Clone()) {
13 connector->ConnectToInterface("mojo:ui", &main_cursor_ptr_);
14 }
15
16 void CursorProxyMojo::InitializeOnEvdev() {
17 connector_->ConnectToInterface("mojo:ui", &evdev_cursor_ptr_);
18 }
19
20 CursorProxyMojo::~CursorProxyMojo() {}
21
22 void CursorProxyMojo::CursorSet(gfx::AcceleratedWidget widget,
23 const std::vector<SkBitmap>& bitmaps,
24 const gfx::Point& location,
25 int frame_delay_ms) {
26 main_cursor_ptr_->SetCursor(widget, bitmaps, location, frame_delay_ms);
27 }
28
29 void CursorProxyMojo::Move(gfx::AcceleratedWidget widget,
30 const gfx::Point& location) {
31 evdev_cursor_ptr_->MoveCursor(widget, location);
spang 2016/07/19 14:59:37 Why is it necessary to have two connections (since
rjkroege 2016/07/21 01:10:41 Yes. Connections are thread-to-thread.
spang 2016/07/21 19:21:57 Those docs aren't quite right :( For example table
32 }
33
34 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698