summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/browser_window_gtk.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-28 21:57:07 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-28 21:57:07 +0000
commitcc8723746d3f6606a2aa7a022a8ead81e9126695 (patch)
tree142770835522925ad6844e0478257d014d57d5f9 /chrome/browser/ui/gtk/browser_window_gtk.cc
parent02430df2fe3edf17dc8f2b33f971abd292f219d8 (diff)
downloadchromium_src-cc8723746d3f6606a2aa7a022a8ead81e9126695.zip
chromium_src-cc8723746d3f6606a2aa7a022a8ead81e9126695.tar.gz
chromium_src-cc8723746d3f6606a2aa7a022a8ead81e9126695.tar.bz2
Remove TabStripModel wrapper use.
BUG=167548 TEST=no functional change Review URL: https://chromiumcodereview.appspot.com/11953065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/browser_window_gtk.cc')
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index ad2da1d..f3fa078 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -41,7 +41,6 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window_state.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
@@ -740,7 +739,8 @@ void BrowserWindowGtk::BookmarkBarStateChanged(
}
void BrowserWindowGtk::UpdateDevTools() {
- UpdateDevToolsForContents(chrome::GetActiveWebContents(browser_.get()));
+ UpdateDevToolsForContents(
+ browser_->tab_strip_model()->GetActiveWebContents());
}
void BrowserWindowGtk::UpdateLoadingAnimations(bool should_animate) {
@@ -770,7 +770,8 @@ void BrowserWindowGtk::LoadingAnimationCallback() {
tabstrip_->UpdateLoadingAnimations();
} else if (ShouldShowWindowIcon()) {
// ... or in the window icon area for popups and app windows.
- WebContents* web_contents = chrome::GetActiveWebContents(browser_.get());
+ WebContents* web_contents =
+ browser_->tab_strip_model()->GetActiveWebContents();
// GetSelectedTabContents can return NULL for example under Purify when
// the animations are running slowly and this function is called on
// a timer through LoadingAnimationCallback.
@@ -1111,17 +1112,17 @@ void BrowserWindowGtk::ShowCreateChromeAppShortcutsDialog(
void BrowserWindowGtk::Cut() {
gtk_window_util::DoCut(
- window_, chrome::GetActiveWebContents(browser_.get()));
+ window_, browser_->tab_strip_model()->GetActiveWebContents());
}
void BrowserWindowGtk::Copy() {
gtk_window_util::DoCopy(
- window_, chrome::GetActiveWebContents(browser_.get()));
+ window_, browser_->tab_strip_model()->GetActiveWebContents());
}
void BrowserWindowGtk::Paste() {
gtk_window_util::DoPaste(
- window_, chrome::GetActiveWebContents(browser_.get()));
+ window_, browser_->tab_strip_model()->GetActiveWebContents());
}
gfx::Rect BrowserWindowGtk::GetInstantBounds() {
@@ -1157,7 +1158,8 @@ void BrowserWindowGtk::ShowPasswordGenerationBubble(
const gfx::Rect& rect,
const content::PasswordForm& form,
autofill::PasswordGenerator* password_generator) {
- WebContents* web_contents = chrome::GetActiveWebContents(browser_.get());
+ WebContents* web_contents =
+ browser_->tab_strip_model()->GetActiveWebContents();
if (!web_contents || !web_contents->GetContentNativeView()) {
return;
}
@@ -1180,8 +1182,8 @@ void BrowserWindowGtk::Observe(int type,
void BrowserWindowGtk::TabDetachedAt(WebContents* 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
- // chrome::GetActiveWebContents(browser_.get()) will return NULL or something
- // else.
+ // browser_->tab_strip_model()->GetActiveWebContents() will return NULL or
+ // something else.
if (index == browser_->tab_strip_model()->active_index()) {
infobar_container_->ChangeInfoBarService(NULL);
UpdateDevToolsForContents(NULL);
@@ -1979,7 +1981,8 @@ gboolean BrowserWindowGtk::OnKeyPress(GtkWidget* widget, GdkEventKey* event) {
// If a widget besides the native view is focused, we have to try to handle
// the custom accelerators before letting it handle them.
- WebContents* current_web_contents = chrome::GetActiveWebContents(browser());
+ WebContents* current_web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
// The current tab might not have a render view if it crashed.
if (!current_web_contents || !current_web_contents->GetContentNativeView() ||
!gtk_widget_is_focus(current_web_contents->GetContentNativeView())) {