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

Side by Side Diff: services/ui/ws/window_tree.h

Issue 2712203002: c++ / mojo changes for 'external window mode'
Patch Set: . Created 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_
6 #define SERVICES_UI_WS_WINDOW_TREE_H_ 6 #define SERVICES_UI_WS_WINDOW_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 public: 70 public:
71 WindowTree(WindowServer* window_server, 71 WindowTree(WindowServer* window_server,
72 const UserId& user_id, 72 const UserId& user_id,
73 ServerWindow* root, 73 ServerWindow* root,
74 std::unique_ptr<AccessPolicy> access_policy); 74 std::unique_ptr<AccessPolicy> access_policy);
75 ~WindowTree() override; 75 ~WindowTree() override;
76 76
77 void Init(std::unique_ptr<WindowTreeBinding> binding, 77 void Init(std::unique_ptr<WindowTreeBinding> binding,
78 mojom::WindowTreePtr tree); 78 mojom::WindowTreePtr tree);
79 79
80 // Call WindowTreeClient::OnEmbed.
fwang 2017/02/28 08:23:53 I think it's "Calls" for consistency with other co
tonikitoo 2017/03/01 05:05:44 Done.
81 void DoOnEmbed(mojom::WindowTreePtr tree, ServerWindow* root);
82
80 // Called if this WindowTree hosts a WindowManager. 83 // Called if this WindowTree hosts a WindowManager.
81 void ConfigureWindowManager(); 84 void ConfigureWindowManager();
82 85
83 ClientSpecificId id() const { return id_; } 86 ClientSpecificId id() const { return id_; }
84 87
85 void set_embedder_intercepts_events() { embedder_intercepts_events_ = true; } 88 void set_embedder_intercepts_events() { embedder_intercepts_events_ = true; }
86 bool embedder_intercepts_events() const { 89 bool embedder_intercepts_events() const {
87 return embedder_intercepts_events_; 90 return embedder_intercepts_events_;
88 } 91 }
89 92
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DisplayManager* display_manager(); 149 DisplayManager* display_manager();
147 const DisplayManager* display_manager() const; 150 const DisplayManager* display_manager() const;
148 151
149 WindowServer* window_server() { return window_server_; } 152 WindowServer* window_server() { return window_server_; }
150 const WindowServer* window_server() const { return window_server_; } 153 const WindowServer* window_server() const { return window_server_; }
151 154
152 // Called from ~WindowServer. Reset WindowTreeClient so that it no longer gets 155 // Called from ~WindowServer. Reset WindowTreeClient so that it no longer gets
153 // any messages. 156 // any messages.
154 void PrepareForWindowServerShutdown(); 157 void PrepareForWindowServerShutdown();
155 158
159 // Adds a new root to this tree.
160 void AddRoot(const ServerWindow* root);
161
156 // Adds a new root to this tree. This is only valid for window managers. 162 // Adds a new root to this tree. This is only valid for window managers.
157 void AddRootForWindowManager(const ServerWindow* root); 163 void AddRootForWindowManager(const ServerWindow* root);
158 164
159 // Invoked when a tree is about to be destroyed. 165 // Invoked when a tree is about to be destroyed.
160 void OnWindowDestroyingTreeImpl(WindowTree* tree); 166 void OnWindowDestroyingTreeImpl(WindowTree* tree);
161 167
162 // Sends updated display information. 168 // Sends updated display information.
163 void OnWmDisplayModified(const display::Display& display); 169 void OnWmDisplayModified(const display::Display& display);
164 170
165 // These functions are synchronous variants of those defined in the mojom. The 171 // These functions are synchronous variants of those defined in the mojom. The
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 waiting_for_top_level_window_info_; 584 waiting_for_top_level_window_info_;
579 bool embedder_intercepts_events_ = false; 585 bool embedder_intercepts_events_ = false;
580 586
581 DISALLOW_COPY_AND_ASSIGN(WindowTree); 587 DISALLOW_COPY_AND_ASSIGN(WindowTree);
582 }; 588 };
583 589
584 } // namespace ws 590 } // namespace ws
585 } // namespace ui 591 } // namespace ui
586 592
587 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ 593 #endif // SERVICES_UI_WS_WINDOW_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698