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

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

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
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/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 void DesktopWindowTreeHostX11::StackAtTop() { 353 void DesktopWindowTreeHostX11::StackAtTop() {
354 XRaiseWindow(xdisplay_, xwindow_); 354 XRaiseWindow(xdisplay_, xwindow_);
355 } 355 }
356 356
357 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) { 357 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) {
358 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); 358 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen();
359 359
360 // If |window_|'s transient parent bounds are big enough to contain |size|, 360 // If |window_|'s transient parent bounds are big enough to contain |size|,
361 // use them instead. 361 // use them instead.
362 if (corewm::GetTransientParent(content_window_)) { 362 if (wm::GetTransientParent(content_window_)) {
363 gfx::Rect transient_parent_rect = 363 gfx::Rect transient_parent_rect =
364 corewm::GetTransientParent(content_window_)->GetBoundsInScreen(); 364 wm::GetTransientParent(content_window_)->GetBoundsInScreen();
365 if (transient_parent_rect.height() >= size.height() && 365 if (transient_parent_rect.height() >= size.height() &&
366 transient_parent_rect.width() >= size.width()) { 366 transient_parent_rect.width() >= size.width()) {
367 parent_bounds = transient_parent_rect; 367 parent_bounds = transient_parent_rect;
368 } 368 }
369 } 369 }
370 370
371 gfx::Rect window_bounds( 371 gfx::Rect window_bounds(
372 parent_bounds.x() + (parent_bounds.width() - size.width()) / 2, 372 parent_bounds.x() + (parent_bounds.width() - size.width()) / 2,
373 parent_bounds.y() + (parent_bounds.height() - size.height()) / 2, 373 parent_bounds.y() + (parent_bounds.height() - size.height()) / 2,
374 size.width(), 374 size.width(),
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 if (linux_ui) { 1564 if (linux_ui) {
1565 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); 1565 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
1566 if (native_theme) 1566 if (native_theme)
1567 return native_theme; 1567 return native_theme;
1568 } 1568 }
1569 1569
1570 return ui::NativeTheme::instance(); 1570 return ui::NativeTheme::instance();
1571 } 1571 }
1572 1572
1573 } // namespace views 1573 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698