OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/tabs/drag_data.h" | 5 #include "chrome/browser/ui/gtk/tabs/drag_data.h" |
6 | 6 |
7 #include "chrome/browser/tabs/tab_strip_model.h" | 7 #include "chrome/browser/tabs/tab_strip_model.h" |
8 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" | 8 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
10 #include "content/browser/tab_contents/tab_contents.h" | 10 #include "content/browser/tab_contents/tab_contents.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 if (static_cast<int>(index) == source_tab_index_) | 91 if (static_cast<int>(index) == source_tab_index_) |
92 add_types |= TabStripModel::ADD_ACTIVE; | 92 add_types |= TabStripModel::ADD_ACTIVE; |
93 return add_types; | 93 return add_types; |
94 } | 94 } |
95 | 95 |
96 TabContentsWrapper* DragData::GetSourceTabContentsWrapper() { | 96 TabContentsWrapper* DragData::GetSourceTabContentsWrapper() { |
97 return GetSourceTabData()->contents_; | 97 return GetSourceTabData()->contents_; |
98 } | 98 } |
99 | 99 |
100 TabContents* DragData::GetSourceTabContents() { | 100 TabContents* DragData::GetSourceTabContents() { |
101 return GetSourceTabData()->contents_->tab_contents(); | 101 TabContentsWrapper* contents = GetSourceTabData()->contents_; |
102 return contents != NULL ? contents->tab_contents(): NULL; | |
Lei Zhang
2011/12/12 22:31:26
nit: you can omit "!= NULL"
dpapad
2011/12/12 22:36:47
Done.
| |
102 } | 103 } |
103 | 104 |
104 DraggedTabData* DragData::GetSourceTabData() { | 105 DraggedTabData* DragData::GetSourceTabData() { |
105 return get(source_tab_index_); | 106 return get(source_tab_index_); |
106 } | 107 } |
OLD | NEW |