Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/ui/gtk/tabs/drag_data.cc

Issue 10545115: TabContentsWrapper -> TabContents, part 41. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/gtk/tabs/drag_data.h" 5 #include "chrome/browser/ui/gtk/tabs/drag_data.h"
6 6
7 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" 7 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_delegate.h" 11 #include "content/public/browser/web_contents_delegate.h"
12 12
13 using content::WebContents; 13 using content::WebContents;
14 14
15 DraggedTabData::DraggedTabData() 15 DraggedTabData::DraggedTabData()
16 : tab_(NULL), 16 : tab_(NULL),
17 contents_(NULL), 17 contents_(NULL),
18 original_delegate_(NULL), 18 original_delegate_(NULL),
19 source_model_index_(-1), 19 source_model_index_(-1),
20 pinned_(false), 20 pinned_(false),
21 mini_(false) { 21 mini_(false) {
22 } 22 }
23 23
24 DraggedTabData::DraggedTabData(TabGtk* tab, 24 DraggedTabData::DraggedTabData(TabGtk* tab,
25 TabContentsWrapper* contents, 25 TabContents* contents,
26 content::WebContentsDelegate* original_delegate, 26 content::WebContentsDelegate* original_delegate,
27 int source_model_index, 27 int source_model_index,
28 bool pinned, 28 bool pinned,
29 bool mini) 29 bool mini)
30 : tab_(tab), 30 : tab_(tab),
31 contents_(contents), 31 contents_(contents),
32 original_delegate_(original_delegate), 32 original_delegate_(original_delegate),
33 source_model_index_(source_model_index), 33 source_model_index_(source_model_index),
34 pinned_(pinned), 34 pinned_(pinned),
35 mini_(mini) { 35 mini_(mini) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 int DragData::GetAddTypesForDraggedTabAt(size_t index) { 89 int DragData::GetAddTypesForDraggedTabAt(size_t index) {
90 int add_types = TabStripModel::ADD_NONE; 90 int add_types = TabStripModel::ADD_NONE;
91 if (get(index)->pinned_) 91 if (get(index)->pinned_)
92 add_types |= TabStripModel::ADD_PINNED; 92 add_types |= TabStripModel::ADD_PINNED;
93 if (static_cast<int>(index) == source_tab_index_) 93 if (static_cast<int>(index) == source_tab_index_)
94 add_types |= TabStripModel::ADD_ACTIVE; 94 add_types |= TabStripModel::ADD_ACTIVE;
95 return add_types; 95 return add_types;
96 } 96 }
97 97
98 TabContentsWrapper* DragData::GetSourceTabContentsWrapper() { 98 TabContents* DragData::GetSourceTabContents() {
99 return GetSourceTabData()->contents_; 99 return GetSourceTabData()->contents_;
100 } 100 }
101 101
102 WebContents* DragData::GetSourceWebContents() { 102 WebContents* DragData::GetSourceWebContents() {
103 TabContentsWrapper* contents = GetSourceTabData()->contents_; 103 TabContents* contents = GetSourceTabData()->contents_;
104 return contents ? contents->web_contents(): NULL; 104 return contents ? contents->web_contents(): NULL;
105 } 105 }
106 106
107 DraggedTabData* DragData::GetSourceTabData() { 107 DraggedTabData* DragData::GetSourceTabData() {
108 return get(source_tab_index_); 108 return get(source_tab_index_);
109 } 109 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/drag_data.h ('k') | chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698