| 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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "base/win/windows_version.h" | 31 #include "base/win/windows_version.h" |
| 32 #include "chrome/browser/shell_integration.h" | 32 #include "chrome/browser/shell_integration.h" |
| 33 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" | 33 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" |
| 34 #include "ui/base/win/shell.h" | 34 #include "ui/base/win/shell.h" |
| 35 #include "ui/gfx/icon_util.h" | 35 #include "ui/gfx/icon_util.h" |
| 36 #include "ui/views/win/hwnd_util.h" | 36 #include "ui/views/win/hwnd_util.h" |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 #if defined(OS_WIN) |
| 41 // If the height of a stacked panel shrinks below this threshold during the | 42 // If the height of a stacked panel shrinks below this threshold during the |
| 42 // user resizing, it will be treated as minimized. | 43 // user resizing, it will be treated as minimized. |
| 43 const int kStackedPanelHeightShrinkThresholdToBecomeMinimized = | 44 const int kStackedPanelHeightShrinkThresholdToBecomeMinimized = |
| 44 panel::kTitlebarHeight + 20; | 45 panel::kTitlebarHeight + 20; |
| 46 #endif |
| 45 | 47 |
| 46 // Supported accelerators. | 48 // Supported accelerators. |
| 47 // Note: We can't use the acclerator table defined in chrome/browser/ui/views | 49 // Note: We can't use the acclerator table defined in chrome/browser/ui/views |
| 48 // due to checkdeps violation. | 50 // due to checkdeps violation. |
| 49 struct AcceleratorMapping { | 51 struct AcceleratorMapping { |
| 50 ui::KeyboardCode keycode; | 52 ui::KeyboardCode keycode; |
| 51 int modifiers; | 53 int modifiers; |
| 52 int command_id; | 54 int command_id; |
| 53 }; | 55 }; |
| 54 const AcceleratorMapping kPanelAcceleratorMap[] = { | 56 const AcceleratorMapping kPanelAcceleratorMap[] = { |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 DCHECK(thickness_for_mouse_resizing > 0); | 1149 DCHECK(thickness_for_mouse_resizing > 0); |
| 1148 SkRegion* region = new SkRegion; | 1150 SkRegion* region = new SkRegion; |
| 1149 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 1151 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
| 1150 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 1152 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
| 1151 SkRegion::kUnion_Op); | 1153 SkRegion::kUnion_Op); |
| 1152 region->op(0, height - thickness_for_mouse_resizing, width, height, | 1154 region->op(0, height - thickness_for_mouse_resizing, width, height, |
| 1153 SkRegion::kUnion_Op); | 1155 SkRegion::kUnion_Op); |
| 1154 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 1156 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
| 1155 #endif | 1157 #endif |
| 1156 } | 1158 } |
| OLD | NEW |