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

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

Issue 8918021: Fixing browser crash in the linux tab dragging code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698