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

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

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: Created 4 years 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 #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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1190 }
1191 1191
1192 void DesktopWindowTreeHostX11::HideImpl() { 1192 void DesktopWindowTreeHostX11::HideImpl() {
1193 if (IsVisible()) { 1193 if (IsVisible()) {
1194 XWithdrawWindow(xdisplay_, xwindow_, 0); 1194 XWithdrawWindow(xdisplay_, xwindow_, 0);
1195 wait_for_unmap_ = true; 1195 wait_for_unmap_ = true;
1196 } 1196 }
1197 native_widget_delegate_->OnNativeWidgetVisibilityChanged(false); 1197 native_widget_delegate_->OnNativeWidgetVisibilityChanged(false);
1198 } 1198 }
1199 1199
1200 gfx::Rect DesktopWindowTreeHostX11::GetBounds() const { 1200 gfx::Rect DesktopWindowTreeHostX11::GetBoundsInPixel() const {
1201 return bounds_in_pixels_; 1201 return bounds_in_pixels_;
1202 } 1202 }
1203 1203
1204 void DesktopWindowTreeHostX11::SetBounds( 1204 void DesktopWindowTreeHostX11::SetBoundsInPixel(
1205 const gfx::Rect& requested_bounds_in_pixel) { 1205 const gfx::Rect& requested_bounds_in_pixel) {
1206 gfx::Rect bounds_in_pixels(requested_bounds_in_pixel.origin(), 1206 gfx::Rect bounds_in_pixels(requested_bounds_in_pixel.origin(),
1207 AdjustSize(requested_bounds_in_pixel.size())); 1207 AdjustSize(requested_bounds_in_pixel.size()));
1208 bool origin_changed = bounds_in_pixels_.origin() != bounds_in_pixels.origin(); 1208 bool origin_changed = bounds_in_pixels_.origin() != bounds_in_pixels.origin();
1209 bool size_changed = bounds_in_pixels_.size() != bounds_in_pixels.size(); 1209 bool size_changed = bounds_in_pixels_.size() != bounds_in_pixels.size();
1210 XWindowChanges changes = {0}; 1210 XWindowChanges changes = {0};
1211 unsigned value_mask = 0; 1211 unsigned value_mask = 0;
1212 1212
1213 delayed_resize_task_.Cancel(); 1213 delayed_resize_task_.Cancel();
1214 1214
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2338 if (linux_ui) { 2338 if (linux_ui) {
2339 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2339 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2340 if (native_theme) 2340 if (native_theme)
2341 return native_theme; 2341 return native_theme;
2342 } 2342 }
2343 2343
2344 return ui::NativeThemeAura::instance(); 2344 return ui::NativeThemeAura::instance();
2345 } 2345 }
2346 2346
2347 } // namespace views 2347 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698