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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2173033002: Make various views SetShape() methods take an unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 0475bf71d6125ea65b5ddf3818bcdc9d1da1d455..46b8cd6e2b05d84b549de069e56475a879010903 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -588,7 +588,8 @@ gfx::Rect DesktopWindowTreeHostX11::GetWorkAreaBoundsInScreen() const {
return ToDIPRect(GetWorkAreaBoundsInPixels());
}
-void DesktopWindowTreeHostX11::SetShape(SkRegion* native_region) {
+void DesktopWindowTreeHostX11::SetShape(
+ std::unique_ptr<SkRegion> native_region) {
custom_window_shape_ = false;
window_shape_.reset();
@@ -608,7 +609,6 @@ void DesktopWindowTreeHostX11::SetShape(SkRegion* native_region) {
}
custom_window_shape_ = true;
- delete native_region;
}
ResetWindowRegion();
}
@@ -754,7 +754,7 @@ bool DesktopWindowTreeHostX11::SetWindowTitle(const base::string16& title) {
reinterpret_cast<const unsigned char*>(utf8str.c_str()),
utf8str.size());
XTextProperty xtp;
- char *c_utf8_str = const_cast<char *>(utf8str.c_str());
+ char* c_utf8_str = const_cast<char*>(utf8str.c_str());
if (Xutf8TextListToTextProperty(xdisplay_, &c_utf8_str, 1,
XUTF8StringStyle, &xtp) == Success) {
XSetWMName(xdisplay_, xwindow_, &xtp);

Powered by Google App Engine
This is Rietveld 408576698