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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 | 1268 |
1269 // If we have a delegate which is providing a default window icon, use that | 1269 // If we have a delegate which is providing a default window icon, use that |
1270 // icon. | 1270 // icon. |
1271 gfx::ImageSkia* window_icon = | 1271 gfx::ImageSkia* window_icon = |
1272 ViewsDelegate::GetInstance() | 1272 ViewsDelegate::GetInstance() |
1273 ? ViewsDelegate::GetInstance()->GetDefaultWindowIcon() | 1273 ? ViewsDelegate::GetInstance()->GetDefaultWindowIcon() |
1274 : NULL; | 1274 : NULL; |
1275 if (window_icon) { | 1275 if (window_icon) { |
1276 SetWindowIcons(gfx::ImageSkia(), *window_icon); | 1276 SetWindowIcons(gfx::ImageSkia(), *window_icon); |
1277 } | 1277 } |
1278 CreateCompositor(GetAcceleratedWidget()); | 1278 CreateCompositor(); |
| 1279 OnAcceleratedWidgetAvailable(); |
1279 } | 1280 } |
1280 | 1281 |
1281 gfx::Size DesktopWindowTreeHostX11::AdjustSize( | 1282 gfx::Size DesktopWindowTreeHostX11::AdjustSize( |
1282 const gfx::Size& requested_size_in_pixels) { | 1283 const gfx::Size& requested_size_in_pixels) { |
1283 std::vector<gfx::Display> displays = | 1284 std::vector<gfx::Display> displays = |
1284 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)->GetAllDisplays(); | 1285 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)->GetAllDisplays(); |
1285 // Compare against all monitor sizes. The window manager can move the window | 1286 // Compare against all monitor sizes. The window manager can move the window |
1286 // to whichever monitor it wants. | 1287 // to whichever monitor it wants. |
1287 for (size_t i = 0; i < displays.size(); ++i) { | 1288 for (size_t i = 0; i < displays.size(); ++i) { |
1288 if (requested_size_in_pixels == displays[i].GetSizeInPixel()) { | 1289 if (requested_size_in_pixels == displays[i].GetSizeInPixel()) { |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 if (linux_ui) { | 2056 if (linux_ui) { |
2056 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2057 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
2057 if (native_theme) | 2058 if (native_theme) |
2058 return native_theme; | 2059 return native_theme; |
2059 } | 2060 } |
2060 | 2061 |
2061 return ui::NativeTheme::instance(); | 2062 return ui::NativeTheme::instance(); |
2062 } | 2063 } |
2063 | 2064 |
2064 } // namespace views | 2065 } // namespace views |
OLD | NEW |