| 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/tab_strip.h" | 5 #include "chrome/browser/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include "base/gfx/size.h" | 7 #include "base/gfx/size.h" |
| 8 #include "chrome/browser/metrics/user_metrics.h" | 8 #include "chrome/browser/metrics/user_metrics.h" |
| 9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 UserMetrics::RecordAction(L"Tab_DropURLOnTab", model_->profile()); | 704 UserMetrics::RecordAction(L"Tab_DropURLOnTab", model_->profile()); |
| 705 | 705 |
| 706 model_->GetTabContentsAt(drop_index)->controller().LoadURL( | 706 model_->GetTabContentsAt(drop_index)->controller().LoadURL( |
| 707 url, GURL(), PageTransition::GENERATED); | 707 url, GURL(), PageTransition::GENERATED); |
| 708 model_->SelectTabContentsAt(drop_index, true); | 708 model_->SelectTabContentsAt(drop_index, true); |
| 709 } | 709 } |
| 710 | 710 |
| 711 return GetDropEffect(event); | 711 return GetDropEffect(event); |
| 712 } | 712 } |
| 713 | 713 |
| 714 bool TabStrip::GetAccessibleRole(VARIANT* role) { | 714 bool TabStrip::GetAccessibleRole(AccessibilityTypes::Role* role) { |
| 715 DCHECK(role); | 715 DCHECK(role); |
| 716 | 716 |
| 717 role->vt = VT_I4; | 717 *role = AccessibilityTypes::ROLE_GROUPING; |
| 718 role->lVal = ROLE_SYSTEM_GROUPING; | |
| 719 return true; | 718 return true; |
| 720 } | 719 } |
| 721 | 720 |
| 722 bool TabStrip::GetAccessibleName(std::wstring* name) { | 721 bool TabStrip::GetAccessibleName(std::wstring* name) { |
| 723 if (!accessible_name_.empty()) { | 722 if (!accessible_name_.empty()) { |
| 724 (*name).assign(accessible_name_); | 723 (*name).assign(accessible_name_); |
| 725 return true; | 724 return true; |
| 726 } | 725 } |
| 727 return false; | 726 return false; |
| 728 } | 727 } |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 // If the TabContents being detached was removed as a result of a drag | 1527 // If the TabContents being detached was removed as a result of a drag |
| 1529 // gesture from its corresponding Tab, we don't want to remove the Tab from | 1528 // gesture from its corresponding Tab, we don't want to remove the Tab from |
| 1530 // the child list, because if we do so it'll stop receiving events and the | 1529 // the child list, because if we do so it'll stop receiving events and the |
| 1531 // drag will stall. So we only remove if a drag isn't active, or the Tab | 1530 // drag will stall. So we only remove if a drag isn't active, or the Tab |
| 1532 // was for some other TabContents. | 1531 // was for some other TabContents. |
| 1533 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { | 1532 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { |
| 1534 removed->GetParent()->RemoveChildView(removed); | 1533 removed->GetParent()->RemoveChildView(removed); |
| 1535 delete removed; | 1534 delete removed; |
| 1536 } | 1535 } |
| 1537 } | 1536 } |
| OLD | NEW |