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

Unified Diff: chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index bee520dbaf3725665118fadd560f345a5fdafe67..a2a479d036d5966a4b49dab72848d67e0a004e58 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/tabs/dragged_view_gtk.h"
#include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_source.h"
@@ -90,7 +90,7 @@ void DraggedTabControllerGtk::CaptureDragInfo(const gfx::Point& mouse_offset) {
void DraggedTabControllerGtk::Drag() {
if (!drag_data_->GetSourceTabData()->tab_ ||
- !drag_data_->GetSourceTabContentsWrapper() ||
+ !drag_data_->GetSourceTabContents() ||
!drag_data_->GetSourceWebContents()) {
return;
}
@@ -135,7 +135,7 @@ bool DraggedTabControllerGtk::IsDraggingTab(const TabGtk* tab) {
}
bool DraggedTabControllerGtk::IsDraggingTabContents(
- const TabContentsWrapper* tab_contents) {
+ const TabContents* tab_contents) {
for (size_t i = 0; i < drag_data_->size(); i++) {
if (tab_contents == drag_data_->get(i)->contents_)
return true;
@@ -149,7 +149,7 @@ bool DraggedTabControllerGtk::IsTabDetached(const TabGtk* tab) {
DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) {
int source_model_index = source_tabstrip_->GetIndexOfTab(tab);
- TabContentsWrapper* contents =
+ TabContents* contents =
source_tabstrip_->model()->GetTabContentsAt(source_model_index);
bool pinned = source_tabstrip_->IsTabPinned(tab);
bool mini = source_tabstrip_->model()->IsMiniTab(source_model_index);
@@ -164,7 +164,7 @@ DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) {
DraggedTabData dragged_tab_data(tab, contents, original_delegate,
source_model_index, pinned, mini);
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- content::Source<TabContentsWrapper>(dragged_tab_data.contents_));
+ content::Source<TabContents>(dragged_tab_data.contents_));
return dragged_tab_data;
}
@@ -226,8 +226,8 @@ void DraggedTabControllerGtk::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED, type);
- TabContentsWrapper* destroyed_tab_contents =
- content::Source<TabContentsWrapper>(source).ptr();
+ TabContents* destroyed_tab_contents =
+ content::Source<TabContents>(source).ptr();
WebContents* destroyed_web_contents = destroyed_tab_contents->web_contents();
for (size_t i = 0; i < drag_data_->size(); ++i) {
if (drag_data_->get(i)->contents_ == destroyed_tab_contents) {
@@ -288,7 +288,7 @@ void DraggedTabControllerGtk::ContinueDragging() {
void DraggedTabControllerGtk::RestoreSelection(TabStripModel* model) {
for (size_t i = 0; i < drag_data_->size(); ++i) {
- TabContentsWrapper* contents = drag_data_->get(i)->contents_;
+ TabContents* contents = drag_data_->get(i)->contents_;
// If a tab is destroyed while dragging contents might be null. See
// http://crbug.com/115409.
if (contents != NULL) {
@@ -315,7 +315,7 @@ void DraggedTabControllerGtk::MoveAttached(const gfx::Point& screen_point) {
double ratio = unselected / TabGtk::GetStandardSize().width();
int threshold = static_cast<int>(ratio * kHorizontalMoveThreshold);
- // Update the model, moving the TabContentsWrapper from one index to another.
+ // Update the model, moving the TabContents from one index to another.
// Do this only if we have moved a minimum distance since the last reorder (to
// prevent jitter) or if this is the first move and the tabs are not
// consecutive.
@@ -424,16 +424,16 @@ void DraggedTabControllerGtk::Attach(TabStripGtk* attached_tabstrip,
if (attached_dragged_tabs.size() == 0) {
// There is no tab in |attached_tabstrip| that corresponds to the dragged
- // TabContentsWrapper. We must now create one.
+ // TabContents. We must now create one.
- // Remove ourselves as the delegate now that the dragged TabContentsWrapper
+ // Remove ourselves as the delegate now that the dragged TabContents
// is being inserted back into a Browser.
for (size_t i = 0; i < drag_data_->size(); ++i) {
drag_data_->get(i)->contents_->web_contents()->SetDelegate(NULL);
drag_data_->get(i)->original_delegate_ = NULL;
}
- // Return the TabContentsWrapper to normalcy.
+ // Return the TabContents to normalcy.
drag_data_->GetSourceWebContents()->SetCapturingContents(false);
// We need to ask the tabstrip we're attached to ensure that the ideal
@@ -552,7 +552,7 @@ int DraggedTabControllerGtk::GetInsertionIndexForDraggedBounds(
}
TabGtk* tab = GetTabMatchingDraggedContents(
- attached_tabstrip_, drag_data_->GetSourceTabContentsWrapper());
+ attached_tabstrip_, drag_data_->GetSourceTabContents());
if (tab == NULL) {
// If dragged tabs are not attached yet, we don't need to constrain the
// index.
@@ -613,7 +613,7 @@ int DraggedTabControllerGtk::NormalizeIndexToAttachedTabStrip(int index) const {
}
TabGtk* DraggedTabControllerGtk::GetTabMatchingDraggedContents(
- TabStripGtk* tabstrip, TabContentsWrapper* tab_contents) {
+ TabStripGtk* tabstrip, TabContents* tab_contents) {
int index = tabstrip->model()->GetIndexOfTabContents(tab_contents);
return index == TabStripModel::kNoTab ? NULL : tabstrip->GetTabAt(index);
}
@@ -753,7 +753,7 @@ bool DraggedTabControllerGtk::CompleteDrag() {
destroy_immediately = false;
} else {
// Compel the model to construct a new window for the detached
- // TabContentsWrapper.
+ // TabContents.
BrowserWindowGtk* window = source_tabstrip_->window();
gfx::Rect window_bounds = window->GetRestoredBounds();
window_bounds.set_origin(GetWindowCreatePoint());
@@ -846,7 +846,7 @@ void DraggedTabControllerGtk::CleanUpDraggedTabs() {
for (size_t i = 0; i < drag_data_->size(); ++i) {
if (drag_data_->get(i)->contents_) {
registrar_.Remove(this, chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- content::Source<TabContentsWrapper>(drag_data_->get(i)->contents_));
+ content::Source<TabContents>(drag_data_->get(i)->contents_));
}
source_tabstrip_->DestroyDraggedTab(drag_data_->get(i)->tab_);
drag_data_->get(i)->tab_ = NULL;
« no previous file with comments | « chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h ('k') | chrome/browser/ui/gtk/tabs/dragged_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698