OLD | NEW |
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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 if (params.parent && params.parent->GetHost()) { | 1209 if (params.parent && params.parent->GetHost()) { |
1210 XID parent_xid = | 1210 XID parent_xid = |
1211 params.parent->GetHost()->GetAcceleratedWidget(); | 1211 params.parent->GetHost()->GetAcceleratedWidget(); |
1212 window_parent_ = GetHostForXID(parent_xid); | 1212 window_parent_ = GetHostForXID(parent_xid); |
1213 DCHECK(window_parent_); | 1213 DCHECK(window_parent_); |
1214 window_parent_->window_children_.insert(this); | 1214 window_parent_->window_children_.insert(this); |
1215 } | 1215 } |
1216 | 1216 |
1217 // If we have a delegate which is providing a default window icon, use that | 1217 // If we have a delegate which is providing a default window icon, use that |
1218 // icon. | 1218 // icon. |
1219 gfx::ImageSkia* window_icon = ViewsDelegate::views_delegate ? | 1219 gfx::ImageSkia* window_icon = |
1220 ViewsDelegate::views_delegate->GetDefaultWindowIcon() : NULL; | 1220 ViewsDelegate::GetInstance() |
| 1221 ? ViewsDelegate::GetInstance()->GetDefaultWindowIcon() |
| 1222 : NULL; |
1221 if (window_icon) { | 1223 if (window_icon) { |
1222 SetWindowIcons(gfx::ImageSkia(), *window_icon); | 1224 SetWindowIcons(gfx::ImageSkia(), *window_icon); |
1223 } | 1225 } |
1224 CreateCompositor(GetAcceleratedWidget()); | 1226 CreateCompositor(GetAcceleratedWidget()); |
1225 } | 1227 } |
1226 | 1228 |
1227 gfx::Size DesktopWindowTreeHostX11::AdjustSize( | 1229 gfx::Size DesktopWindowTreeHostX11::AdjustSize( |
1228 const gfx::Size& requested_size_in_pixels) { | 1230 const gfx::Size& requested_size_in_pixels) { |
1229 std::vector<gfx::Display> displays = | 1231 std::vector<gfx::Display> displays = |
1230 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)->GetAllDisplays(); | 1232 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)->GetAllDisplays(); |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 if (linux_ui) { | 1999 if (linux_ui) { |
1998 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2000 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
1999 if (native_theme) | 2001 if (native_theme) |
2000 return native_theme; | 2002 return native_theme; |
2001 } | 2003 } |
2002 | 2004 |
2003 return ui::NativeTheme::instance(); | 2005 return ui::NativeTheme::instance(); |
2004 } | 2006 } |
2005 | 2007 |
2006 } // namespace views | 2008 } // namespace views |
OLD | NEW |