summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/tabs/base_tab.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/views/tabs/base_tab.cc')
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 4810411..81a7262 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -311,7 +311,7 @@ bool BaseTab::OnMouseDragged(const views::MouseEvent& event) {
return true;
}
-void BaseTab::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
+void BaseTab::OnMouseReleased(const views::MouseEvent& event) {
if (!controller())
return;
@@ -320,7 +320,7 @@ void BaseTab::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
// In some cases, ending the drag will schedule the tab for destruction; if
// so, bail immediately, since our members are already dead and we shouldn't
// do anything else except drop the tab where it is.
- if (controller()->EndDrag(canceled))
+ if (controller()->EndDrag(false))
return;
// Close tab on middle click, but only if the button is released over the tab
@@ -347,6 +347,11 @@ void BaseTab::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
}
}
+void BaseTab::OnMouseCaptureLost() {
+ if (controller())
+ controller()->EndDrag(true);
+}
+
void BaseTab::OnMouseEntered(const views::MouseEvent& event) {
if (!hover_animation_.get()) {
hover_animation_.reset(new ui::SlideAnimation(this));