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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Issue 2709283003: Allow to open multiple modal file-pickers in Linux (Closed)
Patch Set: add DCHECK_GT 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <X11/extensions/shape.h> 10 #include <X11/extensions/shape.h>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void RemoveObserver(DesktopWindowTreeHostObserverX11* observer); 78 void RemoveObserver(DesktopWindowTreeHostObserverX11* observer);
79 79
80 // Swaps the current handler for events in the non client view with |handler|. 80 // Swaps the current handler for events in the non client view with |handler|.
81 void SwapNonClientEventHandler(std::unique_ptr<ui::EventHandler> handler); 81 void SwapNonClientEventHandler(std::unique_ptr<ui::EventHandler> handler);
82 82
83 // Runs the |func| callback for each content-window, and deallocates the 83 // Runs the |func| callback for each content-window, and deallocates the
84 // internal list of open windows. 84 // internal list of open windows.
85 static void CleanUpWindowList(void (*func)(aura::Window* window)); 85 static void CleanUpWindowList(void (*func)(aura::Window* window));
86 86
87 // Disables event listening to make |dialog| modal. 87 // Disables event listening to make |dialog| modal.
88 std::unique_ptr<base::Closure> DisableEventListening(XID dialog); 88 std::unique_ptr<base::Closure> DisableEventListening();
89
90 // Returns XID of dialog currently displayed. When it returns 0,
91 // there is no dialog on the host window.
92 XID GetModalDialog();
93 89
94 protected: 90 protected:
95 // Overridden from DesktopWindowTreeHost: 91 // Overridden from DesktopWindowTreeHost:
96 void Init(aura::Window* content_window, 92 void Init(aura::Window* content_window,
97 const Widget::InitParams& params) override; 93 const Widget::InitParams& params) override;
98 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 94 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
99 void OnWidgetInitDone() override; 95 void OnWidgetInitDone() override;
100 void OnNativeWidgetActivationChanged(bool active) override; 96 void OnNativeWidgetActivationChanged(bool active) override;
101 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; 97 std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
102 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( 98 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // Used for tracking activation state in {Before|After}ActivationStateChanged. 419 // Used for tracking activation state in {Before|After}ActivationStateChanged.
424 bool was_active_; 420 bool was_active_;
425 bool had_pointer_; 421 bool had_pointer_;
426 bool had_pointer_grab_; 422 bool had_pointer_grab_;
427 bool had_window_focus_; 423 bool had_window_focus_;
428 424
429 base::CancelableCallback<void()> delayed_resize_task_; 425 base::CancelableCallback<void()> delayed_resize_task_;
430 426
431 std::unique_ptr<aura::ScopedWindowTargeter> targeter_for_modal_; 427 std::unique_ptr<aura::ScopedWindowTargeter> targeter_for_modal_;
432 428
433 XID modal_dialog_xid_; 429 uint32_t modal_dialog_counter_;
434 430
435 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 431 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
436 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_; 432 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
437 433
438 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 434 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
439 }; 435 };
440 436
441 } // namespace views 437 } // namespace views
442 438
443 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 439 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698