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 "chrome/browser/ui/views/panels/panel_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_view.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/host_desktop.h" | 13 #include "chrome/browser/ui/host_desktop.h" |
14 #include "chrome/browser/ui/panels/panel.h" | 14 #include "chrome/browser/ui/panels/panel.h" |
15 #include "chrome/browser/ui/panels/panel_bounds_animation.h" | 15 #include "chrome/browser/ui/panels/panel_bounds_animation.h" |
16 #include "chrome/browser/ui/panels/panel_manager.h" | 16 #include "chrome/browser/ui/panels/panel_manager.h" |
17 #include "chrome/browser/ui/panels/stacked_panel_collection.h" | 17 #include "chrome/browser/ui/panels/stacked_panel_collection.h" |
18 #include "chrome/browser/ui/views/auto_keep_alive.h" | 18 #include "chrome/browser/ui/views/auto_keep_alive.h" |
19 #include "chrome/browser/ui/views/panels/panel_frame_view.h" | 19 #include "chrome/browser/ui/views/panels/panel_frame_view.h" |
20 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
21 #include "content/public/browser/render_widget_host_view.h" | 21 #include "content/public/browser/render_widget_host_view.h" |
22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
23 #include "ui/aura/window.h" | |
24 #include "ui/aura/window_tree_host.h" | |
25 #include "ui/content_accelerators/accelerator_util.h" | 23 #include "ui/content_accelerators/accelerator_util.h" |
26 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
27 #include "ui/gfx/path.h" | 25 #include "ui/gfx/path.h" |
28 #include "ui/gfx/screen.h" | 26 #include "ui/gfx/screen.h" |
29 #include "ui/views/controls/button/image_button.h" | 27 #include "ui/views/controls/button/image_button.h" |
30 #include "ui/views/controls/webview/webview.h" | 28 #include "ui/views/controls/webview/webview.h" |
31 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
32 | 30 |
33 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
34 #include "base/win/windows_version.h" | 32 #include "base/win/windows_version.h" |
35 #include "chrome/browser/shell_integration.h" | 33 #include "chrome/browser/shell_integration.h" |
36 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" | 34 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" |
37 #include "ui/base/win/shell.h" | 35 #include "ui/base/win/shell.h" |
38 #include "ui/gfx/icon_util.h" | 36 #include "ui/gfx/icon_util.h" |
39 #include "ui/views/win/hwnd_util.h" | 37 #include "ui/views/win/hwnd_util.h" |
40 #endif | 38 #endif |
41 | 39 |
42 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 40 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
43 #include "chrome/browser/shell_integration_linux.h" | 41 #include "chrome/browser/shell_integration_linux.h" |
44 #include "chrome/browser/ui/views/panels/x11_panel_resizer.h" | 42 #include "chrome/browser/ui/views/panels/x11_panel_resizer.h" |
45 #include "chrome/browser/web_applications/web_app.h" | 43 #include "chrome/browser/web_applications/web_app.h" |
| 44 #include "ui/aura/window.h" |
46 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 45 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
47 #endif | 46 #endif |
48 | 47 |
49 namespace { | 48 namespace { |
50 | 49 |
51 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
52 // If the height of a stacked panel shrinks below this threshold during the | 51 // If the height of a stacked panel shrinks below this threshold during the |
53 // user resizing, it will be treated as minimized. | 52 // user resizing, it will be treated as minimized. |
54 const int kStackedPanelHeightShrinkThresholdToBecomeMinimized = | 53 const int kStackedPanelHeightShrinkThresholdToBecomeMinimized = |
55 panel::kTitlebarHeight + 20; | 54 panel::kTitlebarHeight + 20; |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 // SWP_FRAMECHANGED flag must be called in order for the cached window data | 1142 // SWP_FRAMECHANGED flag must be called in order for the cached window data |
1144 // to be updated properly. | 1143 // to be updated properly. |
1145 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a
spx | 1144 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a
spx |
1146 if (update_frame) { | 1145 if (update_frame) { |
1147 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, | 1146 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, |
1148 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | | 1147 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | |
1149 SWP_NOZORDER | SWP_NOACTIVATE); | 1148 SWP_NOZORDER | SWP_NOACTIVATE); |
1150 } | 1149 } |
1151 } | 1150 } |
1152 #endif | 1151 #endif |
OLD | NEW |