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

Side by Side Diff: services/ui/public/cpp/tests/window_tree_client_private.cc

Issue 2248263003: Updates PointerEventRouter to handle switching move type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: false- Created 4 years, 4 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 "services/ui/public/cpp/tests/window_tree_client_private.h" 5 #include "services/ui/public/cpp/tests/window_tree_client_private.h"
6 6
7 #include "services/ui/public/cpp/window.h" 7 #include "services/ui/public/cpp/window.h"
8 #include "services/ui/public/cpp/window_private.h" 8 #include "services/ui/public/cpp/window_private.h"
9 #include "services/ui/public/cpp/window_tree_client.h" 9 #include "services/ui/public/cpp/window_tree_client.h"
10 #include "ui/display/display.h" 10 #include "ui/display/display.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 WindowTreeClientPrivate::WindowTreeClientPrivate( 14 WindowTreeClientPrivate::WindowTreeClientPrivate(
15 WindowTreeClient* tree_client_impl) 15 WindowTreeClient* tree_client_impl)
16 : tree_client_impl_(tree_client_impl) {} 16 : tree_client_impl_(tree_client_impl) {}
17 17
18 WindowTreeClientPrivate::WindowTreeClientPrivate(Window* window) 18 WindowTreeClientPrivate::WindowTreeClientPrivate(Window* window)
19 : WindowTreeClientPrivate(window->window_tree()) {} 19 : WindowTreeClientPrivate(window->window_tree()) {}
20 20
21 WindowTreeClientPrivate::~WindowTreeClientPrivate() {} 21 WindowTreeClientPrivate::~WindowTreeClientPrivate() {}
22 22
23 uint32_t WindowTreeClientPrivate::pointer_watcher_id() {
24 return tree_client_impl_->pointer_watcher_id_;
25 }
26
27 void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) { 23 void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) {
28 mojom::WindowDataPtr root_data(mojom::WindowData::New()); 24 mojom::WindowDataPtr root_data(mojom::WindowData::New());
29 root_data->parent_id = 0; 25 root_data->parent_id = 0;
30 root_data->window_id = 1; 26 root_data->window_id = 1;
31 root_data->properties.SetToEmpty(); 27 root_data->properties.SetToEmpty();
32 root_data->visible = true; 28 root_data->visible = true;
33 const int64_t display_id = 1; 29 const int64_t display_id = 1;
34 const Id focused_window_id = 0; 30 const Id focused_window_id = 0;
35 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data), 31 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data),
36 display_id, focused_window_id, true); 32 display_id, focused_window_id, true);
(...skipping 27 matching lines...) Expand all
64 new_capture ? WindowPrivate(new_capture).server_id() : 0, 60 new_capture ? WindowPrivate(new_capture).server_id() : 0,
65 old_capture ? WindowPrivate(old_capture).server_id() : 0); 61 old_capture ? WindowPrivate(old_capture).server_id() : 0);
66 } 62 }
67 63
68 void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree, 64 void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree,
69 ClientSpecificId client_id) { 65 ClientSpecificId client_id) {
70 tree_client_impl_->tree_ = window_tree; 66 tree_client_impl_->tree_ = window_tree;
71 tree_client_impl_->client_id_ = client_id; 67 tree_client_impl_->client_id_ = client_id;
72 } 68 }
73 69
70 bool WindowTreeClientPrivate::HasPointerWatcher() {
71 return tree_client_impl_->has_pointer_watcher_;
72 }
73
74 } // namespace ui 74 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698