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

Side by Side Diff: ui/views/widget/desktop_aura/x11_desktop_handler.cc

Issue 2313033002: Refactor X11ForeignWindowManager (Reland) (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" 5 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "ui/aura/env.h" 12 #include "ui/aura/env.h"
13 #include "ui/aura/window_event_dispatcher.h" 13 #include "ui/aura/window_event_dispatcher.h"
14 #include "ui/base/x/x11_foreign_window_manager.h"
15 #include "ui/base/x/x11_menu_list.h" 14 #include "ui/base/x/x11_menu_list.h"
16 #include "ui/base/x/x11_util.h" 15 #include "ui/base/x/x11_util.h"
17 #include "ui/events/platform/platform_event_source.h" 16 #include "ui/events/platform/platform_event_source.h"
18 #include "ui/gfx/x/x11_error_tracker.h" 17 #include "ui/gfx/x/x11_error_tracker.h"
19 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 18 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
20 19
21 namespace { 20 namespace {
22 21
23 const char* const kAtomsToCache[] = { 22 const char* const kAtomsToCache[] = {
24 "_NET_CURRENT_DESKTOP", 23 "_NET_CURRENT_DESKTOP",
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // coordinates and stacking order to eliminate repeated calls to the X server 132 // coordinates and stacking order to eliminate repeated calls to the X server
134 // during mouse movement, drag and shaping events. 133 // during mouse movement, drag and shaping events.
135 if (event_type == CreateNotify) { 134 if (event_type == CreateNotify) {
136 // The window might be destroyed if the message pump did not get a chance to 135 // The window might be destroyed if the message pump did not get a chance to
137 // run but we can safely ignore the X error. 136 // run but we can safely ignore the X error.
138 gfx::X11ErrorTracker error_tracker; 137 gfx::X11ErrorTracker error_tracker;
139 ui::XMenuList::GetInstance()->MaybeRegisterMenu(window); 138 ui::XMenuList::GetInstance()->MaybeRegisterMenu(window);
140 } else { 139 } else {
141 ui::XMenuList::GetInstance()->MaybeUnregisterMenu(window); 140 ui::XMenuList::GetInstance()->MaybeUnregisterMenu(window);
142 } 141 }
143
144 if (event_type == DestroyNotify) {
145 // Notify the XForeignWindowManager that |window| has been destroyed.
146 ui::XForeignWindowManager::GetInstance()->OnWindowDestroyed(window);
147 }
148 } 142 }
149 143
150 } // namespace views 144 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698