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

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

Issue 1045443002: Make File-Picker modal on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 6 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 <X11/extensions/shape.h> 8 #include <X11/extensions/shape.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h> 10 #include <X11/Xutil.h>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "ui/aura/scoped_window_targeter.h"
16 #include "ui/aura/window_tree_host.h" 17 #include "ui/aura/window_tree_host.h"
17 #include "ui/base/cursor/cursor_loader_x11.h" 18 #include "ui/base/cursor/cursor_loader_x11.h"
18 #include "ui/events/platform/platform_event_dispatcher.h" 19 #include "ui/events/platform/platform_event_dispatcher.h"
19 #include "ui/gfx/geometry/insets.h" 20 #include "ui/gfx/geometry/insets.h"
20 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
21 #include "ui/gfx/geometry/size.h" 22 #include "ui/gfx/geometry/size.h"
22 #include "ui/gfx/x/x11_atom_cache.h" 23 #include "ui/gfx/x/x11_atom_cache.h"
23 #include "ui/views/views_export.h" 24 #include "ui/views/views_export.h"
24 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 25 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
25 26
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer); 79 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer);
79 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer); 80 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer);
80 81
81 // Swaps the current handler for events in the non client view with |handler|. 82 // Swaps the current handler for events in the non client view with |handler|.
82 void SwapNonClientEventHandler(scoped_ptr<ui::EventHandler> handler); 83 void SwapNonClientEventHandler(scoped_ptr<ui::EventHandler> handler);
83 84
84 // Deallocates the internal list of open windows. 85 // Deallocates the internal list of open windows.
85 static void CleanUpWindowList(); 86 static void CleanUpWindowList();
86 87
88 XID GetModalDialog();
89 void EnableEventListening();
90 void DisableEventListening(XID dialog);
sadrul 2015/06/30 17:30:56 document
joone 2015/07/01 03:16:06 Done.
91
87 protected: 92 protected:
88 // Overridden from DesktopWindowTreeHost: 93 // Overridden from DesktopWindowTreeHost:
89 void Init(aura::Window* content_window, 94 void Init(aura::Window* content_window,
90 const Widget::InitParams& params) override; 95 const Widget::InitParams& params) override;
91 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 96 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
92 scoped_ptr<corewm::Tooltip> CreateTooltip() override; 97 scoped_ptr<corewm::Tooltip> CreateTooltip() override;
93 scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( 98 scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
94 DesktopNativeCursorManager* cursor_manager) override; 99 DesktopNativeCursorManager* cursor_manager) override;
95 void Close() override; 100 void Close() override;
96 void CloseNow() override; 101 void CloseNow() override;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Whether we currently are flashing our frame. This feature is implemented 345 // Whether we currently are flashing our frame. This feature is implemented
341 // by setting the urgency hint with the window manager, which can draw 346 // by setting the urgency hint with the window manager, which can draw
342 // attention to the window or completely ignore the hint. We stop flashing 347 // attention to the window or completely ignore the hint. We stop flashing
343 // the frame when |xwindow_| gains focus or handles a mouse button event. 348 // the frame when |xwindow_| gains focus or handles a mouse button event.
344 bool urgency_hint_set_; 349 bool urgency_hint_set_;
345 350
346 base::CancelableCallback<void()> delayed_resize_task_; 351 base::CancelableCallback<void()> delayed_resize_task_;
347 352
348 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 353 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
349 354
355 scoped_ptr<aura::ScopedWindowTargeter> scoped_targeter_;
sadrul 2015/06/30 17:30:56 Call this |targeter_for_modal_| (or something like
joone 2015/07/01 03:16:06 Done.
356
357 XID modal_dialog_xid_;
358
350 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 359 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
351 }; 360 };
352 361
353 } // namespace views 362 } // namespace views
354 363
355 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 364 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698