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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 4694008: Make pink's TabContentsWrapper change compile on Windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 66453)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -69,6 +69,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/tab_contents_wrapper.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/themes/browser_theme_provider.h"
@@ -736,7 +737,7 @@
void BrowserWindowGtk::UpdateDevTools() {
UpdateDevToolsForContents(
- browser_->tabstrip_model()->GetSelectedTabContents());
+ browser_->GetSelectedTabContents());
}
void BrowserWindowGtk::UpdateLoadingAnimations(bool should_animate) {
@@ -836,9 +837,9 @@
force);
}
-void BrowserWindowGtk::UpdateToolbar(TabContents* contents,
+void BrowserWindowGtk::UpdateToolbar(TabContentsWrapper* contents,
bool should_restore_state) {
- toolbar_->UpdateTabContents(contents, should_restore_state);
+ toolbar_->UpdateTabContents(contents->tab_contents(), should_restore_state);
}
void BrowserWindowGtk::FocusToolbar() {
@@ -1144,44 +1145,44 @@
}
}
-void BrowserWindowGtk::TabDetachedAt(TabContents* contents, int index) {
+void BrowserWindowGtk::TabDetachedAt(TabContentsWrapper* contents, int index) {
// We use index here rather than comparing |contents| because by this time
// the model has already removed |contents| from its list, so
// browser_->GetSelectedTabContents() will return NULL or something else.
if (index == browser_->tabstrip_model()->selected_index())
infobar_container_->ChangeTabContents(NULL);
- contents_container_->DetachTabContents(contents);
+ contents_container_->DetachTabContents(contents->tab_contents());
UpdateDevToolsForContents(NULL);
}
-void BrowserWindowGtk::TabSelectedAt(TabContents* old_contents,
- TabContents* new_contents,
+void BrowserWindowGtk::TabSelectedAt(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
int index,
bool user_gesture) {
DCHECK(old_contents != new_contents);
- if (old_contents && !old_contents->is_being_destroyed())
+ if (old_contents && !old_contents->tab_contents()->is_being_destroyed())
old_contents->view()->StoreFocus();
// Update various elements that are interested in knowing the current
// TabContents.
- infobar_container_->ChangeTabContents(new_contents);
- contents_container_->SetTabContents(new_contents);
- UpdateDevToolsForContents(new_contents);
+ infobar_container_->ChangeTabContents(new_contents->tab_contents());
+ contents_container_->SetTabContents(new_contents->tab_contents());
+ UpdateDevToolsForContents(new_contents->tab_contents());
- new_contents->DidBecomeSelected();
+ new_contents->tab_contents()->DidBecomeSelected();
// TODO(estade): after we manage browser activation, add a check to make sure
// we are the active browser before calling RestoreFocus().
if (!browser_->tabstrip_model()->closing_all()) {
new_contents->view()->RestoreFocus();
- if (new_contents->find_ui_active())
+ if (new_contents->tab_contents()->find_ui_active())
browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
}
// Update all the UI bits.
UpdateTitleBar();
UpdateToolbar(new_contents, true);
- UpdateUIForContents(new_contents);
+ UpdateUIForContents(new_contents->tab_contents());
}
void BrowserWindowGtk::TabStripEmpty() {
@@ -1860,7 +1861,7 @@
// If a widget besides the native view is focused, we have to try to handle
// the custom accelerators before letting it handle them.
TabContents* current_tab_contents =
- browser()->tabstrip_model()->GetSelectedTabContents();
+ browser()->GetSelectedTabContents();
// The current tab might not have a render view if it crashed.
if (!current_tab_contents || !current_tab_contents->GetContentNativeView() ||
!gtk_widget_is_focus(current_tab_contents->GetContentNativeView())) {

Powered by Google App Engine
This is Rietveld 408576698