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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 switch (message) { | 354 switch (message) { |
355 case WM_SIZING: | 355 case WM_SIZING: |
356 if (w_param == WMSZ_BOTTOM) | 356 if (w_param == WMSZ_BOTTOM) |
357 user_resizing_interior_stacked_panel_edge_ = true; | 357 user_resizing_interior_stacked_panel_edge_ = true; |
358 break; | 358 break; |
359 } | 359 } |
360 return false; | 360 return false; |
361 } | 361 } |
362 #endif | 362 #endif |
363 | 363 |
364 void PanelView::AnimationEnded(const ui::Animation* animation) { | 364 void PanelView::AnimationEnded(const gfx::Animation* animation) { |
365 panel_->manager()->OnPanelAnimationEnded(panel_.get()); | 365 panel_->manager()->OnPanelAnimationEnded(panel_.get()); |
366 } | 366 } |
367 | 367 |
368 void PanelView::AnimationProgressed(const ui::Animation* animation) { | 368 void PanelView::AnimationProgressed(const gfx::Animation* animation) { |
369 gfx::Rect new_bounds = bounds_animator_->CurrentValueBetween( | 369 gfx::Rect new_bounds = bounds_animator_->CurrentValueBetween( |
370 animation_start_bounds_, bounds_); | 370 animation_start_bounds_, bounds_); |
371 SetWidgetBounds(new_bounds); | 371 SetWidgetBounds(new_bounds); |
372 } | 372 } |
373 | 373 |
374 void PanelView::SetWidgetBounds(const gfx::Rect& new_bounds) { | 374 void PanelView::SetWidgetBounds(const gfx::Rect& new_bounds) { |
375 #if defined(OS_WIN) | 375 #if defined(OS_WIN) |
376 // An overlapped window is a top-level window that has a titlebar, border, | 376 // An overlapped window is a top-level window that has a titlebar, border, |
377 // and client area. The Windows system will automatically put the shadow | 377 // and client area. The Windows system will automatically put the shadow |
378 // around the whole window. Also the system will enforce the minimum height | 378 // around the whole window. Also the system will enforce the minimum height |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 DCHECK(thickness_for_mouse_resizing > 0); | 1135 DCHECK(thickness_for_mouse_resizing > 0); |
1136 SkRegion* region = new SkRegion; | 1136 SkRegion* region = new SkRegion; |
1137 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 1137 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
1138 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 1138 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
1139 SkRegion::kUnion_Op); | 1139 SkRegion::kUnion_Op); |
1140 region->op(0, height - thickness_for_mouse_resizing, width, height, | 1140 region->op(0, height - thickness_for_mouse_resizing, width, height, |
1141 SkRegion::kUnion_Op); | 1141 SkRegion::kUnion_Op); |
1142 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 1142 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
1143 #endif | 1143 #endif |
1144 } | 1144 } |
OLD | NEW |