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 "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
8 #include "app/gfx/chrome_canvas.h" | 8 #include "app/gfx/chrome_canvas.h" |
9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "app/os_exchange_data.h" | 11 #include "app/os_exchange_data.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "app/slide_animation.h" | 13 #include "app/slide_animation.h" |
| 14 #include "app/win_util.h" |
14 #include "base/gfx/size.h" | 15 #include "base/gfx/size.h" |
15 #include "base/stl_util-inl.h" | 16 #include "base/stl_util-inl.h" |
16 #include "chrome/browser/metrics/user_metrics.h" | 17 #include "chrome/browser/metrics/user_metrics.h" |
17 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
18 #include "chrome/browser/tab_contents/tab_contents.h" | 19 #include "chrome/browser/tab_contents/tab_contents.h" |
19 #include "chrome/browser/tabs/tab_strip_model.h" | 20 #include "chrome/browser/tabs/tab_strip_model.h" |
20 #include "chrome/browser/view_ids.h" | 21 #include "chrome/browser/view_ids.h" |
21 #include "chrome/browser/views/tabs/dragged_tab_controller.h" | 22 #include "chrome/browser/views/tabs/dragged_tab_controller.h" |
22 #include "chrome/browser/views/tabs/tab.h" | 23 #include "chrome/browser/views/tabs/tab.h" |
23 #include "chrome/browser/tab_contents/tab_contents.h" | 24 #include "chrome/browser/tab_contents/tab_contents.h" |
24 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
25 #include "chrome/common/win_util.h" | |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "grit/theme_resources.h" | 27 #include "grit/theme_resources.h" |
28 #include "views/controls/image_view.h" | 28 #include "views/controls/image_view.h" |
29 #include "views/painter.h" | 29 #include "views/painter.h" |
30 #include "views/window/non_client_view.h" | 30 #include "views/window/non_client_view.h" |
31 #include "views/window/window.h" | 31 #include "views/window/window.h" |
32 | 32 |
33 #undef min | 33 #undef min |
34 #undef max | 34 #undef max |
35 | 35 |
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 // If the TabContents being detached was removed as a result of a drag | 1521 // If the TabContents being detached was removed as a result of a drag |
1522 // gesture from its corresponding Tab, we don't want to remove the Tab from | 1522 // gesture from its corresponding Tab, we don't want to remove the Tab from |
1523 // the child list, because if we do so it'll stop receiving events and the | 1523 // the child list, because if we do so it'll stop receiving events and the |
1524 // drag will stall. So we only remove if a drag isn't active, or the Tab | 1524 // drag will stall. So we only remove if a drag isn't active, or the Tab |
1525 // was for some other TabContents. | 1525 // was for some other TabContents. |
1526 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { | 1526 if (!IsDragSessionActive() || !drag_controller_->IsDragSourceTab(removed)) { |
1527 removed->GetParent()->RemoveChildView(removed); | 1527 removed->GetParent()->RemoveChildView(removed); |
1528 delete removed; | 1528 delete removed; |
1529 } | 1529 } |
1530 } | 1530 } |
OLD | NEW |