| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/tabs/dragged_tab_view.h" | 5 #include "chrome/browser/views/tabs/dragged_tab_view.h" |
| 6 | 6 |
| 7 #include "app/gfx/chrome_canvas.h" | 7 #include "app/gfx/chrome_canvas.h" |
| 8 #include "chrome/browser/tab_contents/tab_contents.h" | 8 #include "chrome/browser/tab_contents/tab_contents.h" |
| 9 #include "chrome/browser/tabs/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
| 10 #include "chrome/browser/views/tabs/hwnd_photobooth.h" | 10 #include "chrome/browser/views/tabs/hwnd_photobooth.h" |
| 11 #include "chrome/browser/views/tabs/tab_renderer.h" | 11 #include "chrome/browser/views/tabs/tab_renderer.h" |
| 12 #include "skia/include/SkShader.h" | 12 #include "third_party/skia/include/core/SkShader.h" |
| 13 #include "views/widget/widget_win.h" | 13 #include "views/widget/widget_win.h" |
| 14 | 14 |
| 15 const int kTransparentAlpha = 200; | 15 const int kTransparentAlpha = 200; |
| 16 const int kOpaqueAlpha = 255; | 16 const int kOpaqueAlpha = 255; |
| 17 const int kDragFrameBorderSize = 2; | 17 const int kDragFrameBorderSize = 2; |
| 18 const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; | 18 const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; |
| 19 const float kScalingFactor = 0.5; | 19 const float kScalingFactor = 0.5; |
| 20 const int kAnimateToBoundsDurationMs = 150; | 20 const int kAnimateToBoundsDurationMs = 150; |
| 21 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162); | 21 static const SkColor kDraggedTabBorderColor = SkColorSetRGB(103, 129, 162); |
| 22 | 22 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 void DraggedTabView::ResizeContainer() { | 230 void DraggedTabView::ResizeContainer() { |
| 231 gfx::Size ps = GetPreferredSize(); | 231 gfx::Size ps = GetPreferredSize(); |
| 232 SetWindowPos(container_->GetNativeView(), HWND_TOPMOST, 0, 0, | 232 SetWindowPos(container_->GetNativeView(), HWND_TOPMOST, 0, 0, |
| 233 ScaleValue(ps.width()), ScaleValue(ps.height()), | 233 ScaleValue(ps.width()), ScaleValue(ps.height()), |
| 234 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); | 234 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); |
| 235 } | 235 } |
| 236 | 236 |
| 237 int DraggedTabView::ScaleValue(int value) { | 237 int DraggedTabView::ScaleValue(int value) { |
| 238 return attached_ ? value : static_cast<int>(value * kScalingFactor); | 238 return attached_ ? value : static_cast<int>(value * kScalingFactor); |
| 239 } | 239 } |
| OLD | NEW |