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

Side by Side Diff: ui/aura/test/mus/window_tree_client_private.cc

Issue 2535983004: Makes sure bounds and visibilty are updated correctly for new displays (Closed)
Patch Set: merge Created 4 years 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
« no previous file with comments | « ui/aura/test/mus/window_tree_client_private.h ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/aura/test/mus/window_tree_client_private.h" 5 #include "ui/aura/test/mus/window_tree_client_private.h"
6 6
7 #include "ui/aura/mus/window_port_mus.h" 7 #include "ui/aura/mus/window_port_mus.h"
8 #include "ui/aura/mus/window_tree_client.h" 8 #include "ui/aura/mus/window_tree_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/display/display.h" 10 #include "ui/display/display.h"
(...skipping 14 matching lines...) Expand all
25 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); 25 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New());
26 root_data->parent_id = 0; 26 root_data->parent_id = 0;
27 root_data->window_id = next_window_id_++; 27 root_data->window_id = next_window_id_++;
28 root_data->visible = true; 28 root_data->visible = true;
29 const int64_t display_id = 1; 29 const int64_t display_id = 1;
30 const Id focused_window_id = 0; 30 const Id focused_window_id = 0;
31 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data), 31 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data),
32 display_id, focused_window_id, true); 32 display_id, focused_window_id, true);
33 } 33 }
34 34
35 WindowTreeHost* WindowTreeClientPrivate::CallWmNewDisplayAdded( 35 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
36 const display::Display& display) { 36 const display::Display& display) {
37 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); 37 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New());
38 root_data->parent_id = 0; 38 root_data->parent_id = 0;
39 root_data->window_id = next_window_id_++; 39 root_data->window_id = next_window_id_++;
40 root_data->visible = true; 40 root_data->visible = true;
41 root_data->bounds = gfx::Rect(display.bounds().size()); 41 root_data->bounds = gfx::Rect(display.bounds().size());
42 const bool parent_drawn = true; 42 const bool parent_drawn = true;
43 return CallWmNewDisplayAdded(display, std::move(root_data), parent_drawn);
44 }
45
46 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
47 const display::Display& display,
48 ui::mojom::WindowDataPtr root_data,
49 bool parent_drawn) {
43 return tree_client_impl_->WmNewDisplayAddedImpl(display, std::move(root_data), 50 return tree_client_impl_->WmNewDisplayAddedImpl(display, std::move(root_data),
44 parent_drawn); 51 parent_drawn);
45 } 52 }
46 53
47 void WindowTreeClientPrivate::CallOnWindowInputEvent( 54 void WindowTreeClientPrivate::CallOnWindowInputEvent(
48 Window* window, 55 Window* window,
49 std::unique_ptr<ui::Event> event) { 56 std::unique_ptr<ui::Event> event) {
50 const uint32_t event_id = 0u; 57 const uint32_t event_id = 0u;
51 const uint32_t observer_id = 0u; 58 const uint32_t observer_id = 0u;
52 tree_client_impl_->OnWindowInputEvent(event_id, 59 tree_client_impl_->OnWindowInputEvent(event_id,
(...skipping 13 matching lines...) Expand all
66 ClientSpecificId client_id) { 73 ClientSpecificId client_id) {
67 tree_client_impl_->WindowTreeConnectionEstablished(window_tree); 74 tree_client_impl_->WindowTreeConnectionEstablished(window_tree);
68 tree_client_impl_->client_id_ = client_id; 75 tree_client_impl_->client_id_ = client_id;
69 } 76 }
70 77
71 bool WindowTreeClientPrivate::HasPointerWatcher() { 78 bool WindowTreeClientPrivate::HasPointerWatcher() {
72 return tree_client_impl_->has_pointer_watcher_; 79 return tree_client_impl_->has_pointer_watcher_;
73 } 80 }
74 81
75 } // namespace aura 82 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/mus/window_tree_client_private.h ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698