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

Side by Side Diff: services/ui/public/cpp/window_tree_client.h

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check if can_accept_events setting has changed; change names 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
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_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Windows are initially hidden, use SetVisible(true) to show. 196 // Windows are initially hidden, use SetVisible(true) to show.
197 Window* NewWindow() { return NewWindow(nullptr); } 197 Window* NewWindow() { return NewWindow(nullptr); }
198 Window* NewWindow( 198 Window* NewWindow(
199 const std::map<std::string, std::vector<uint8_t>>* properties); 199 const std::map<std::string, std::vector<uint8_t>>* properties);
200 Window* NewTopLevelWindow( 200 Window* NewTopLevelWindow(
201 const std::map<std::string, std::vector<uint8_t>>* properties); 201 const std::map<std::string, std::vector<uint8_t>>* properties);
202 202
203 void AddObserver(WindowTreeClientObserver* observer); 203 void AddObserver(WindowTreeClientObserver* observer);
204 void RemoveObserver(WindowTreeClientObserver* observer); 204 void RemoveObserver(WindowTreeClientObserver* observer);
205 205
206 void SetCanAcceptEvents(Id window_id, bool can_accept_events);
207
206 #if !defined(NDEBUG) 208 #if !defined(NDEBUG)
207 std::string GetDebugWindowHierarchy() const; 209 std::string GetDebugWindowHierarchy() const;
208 void BuildDebugInfo(const std::string& depth, 210 void BuildDebugInfo(const std::string& depth,
209 Window* window, 211 Window* window,
210 std::string* result) const; 212 std::string* result) const;
211 #endif 213 #endif
212 214
213 private: 215 private:
214 friend class WindowTreeClientPrivate; 216 friend class WindowTreeClientPrivate;
215 217
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 mojo::Binding<mojom::WindowTreeClient> binding_; 395 mojo::Binding<mojom::WindowTreeClient> binding_;
394 mojom::WindowTreePtr tree_ptr_; 396 mojom::WindowTreePtr tree_ptr_;
395 // Typically this is the value contained in |tree_ptr_|, but tests may 397 // Typically this is the value contained in |tree_ptr_|, but tests may
396 // directly set this. 398 // directly set this.
397 mojom::WindowTree* tree_; 399 mojom::WindowTree* tree_;
398 400
399 bool delete_on_no_roots_; 401 bool delete_on_no_roots_;
400 402
401 bool in_destructor_; 403 bool in_destructor_;
402 404
405 // Whether this window can accept events.
406 // Initialize it to be true since server window will also initialize
407 // can_accept_events_ to be true.
408 bool can_accept_events_ = true;
409
403 // A mapping to shared memory that is one 32 bit integer long. The window 410 // A mapping to shared memory that is one 32 bit integer long. The window
404 // server uses this to let us synchronously read the cursor location. 411 // server uses this to let us synchronously read the cursor location.
405 mojo::ScopedSharedBufferMapping cursor_location_mapping_; 412 mojo::ScopedSharedBufferMapping cursor_location_mapping_;
406 413
407 base::ObserverList<WindowTreeClientObserver> observers_; 414 base::ObserverList<WindowTreeClientObserver> observers_;
408 415
409 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>> 416 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>>
410 window_manager_internal_; 417 window_manager_internal_;
411 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_; 418 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_;
412 419
(...skipping 14 matching lines...) Expand all
427 base::Callback<void(bool)> on_current_move_finished_; 434 base::Callback<void(bool)> on_current_move_finished_;
428 435
429 base::WeakPtrFactory<WindowTreeClient> weak_factory_; 436 base::WeakPtrFactory<WindowTreeClient> weak_factory_;
430 437
431 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); 438 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);
432 }; 439 };
433 440
434 } // namespace ui 441 } // namespace ui
435 442
436 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ 443 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698