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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10533046: TabContentsWrapper -> TabContents, part 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compiling is good 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/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index cdcf09096c74bae46e8baa669f96c2bd711350b4..577402e7e88df082243b03588296b12d3f711a96 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -56,7 +56,7 @@
#include "chrome/browser/ui/gtk/rounded_window.h"
#include "chrome/browser/ui/gtk/view_id_util.h"
#include "chrome/browser/ui/omnibox/location_bar_util.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
@@ -442,7 +442,7 @@ void LocationBarViewGtk::SetSiteTypeDragSource() {
}
WebContents* LocationBarViewGtk::GetWebContents() const {
- return browser_->GetSelectedWebContents();
+ return browser_->GetActiveWebContents();
}
void LocationBarViewGtk::SetPreviewEnabledPageAction(
@@ -617,7 +617,7 @@ void LocationBarViewGtk::OnSetFocus() {
}
SkBitmap LocationBarViewGtk::GetFavicon() const {
- return GetTabContentsWrapper()->favicon_tab_helper()->GetFavicon();
+ return GetTabContents()->favicon_tab_helper()->GetFavicon();
}
string16 LocationBarViewGtk::GetTitle() const {
@@ -628,8 +628,8 @@ InstantController* LocationBarViewGtk::GetInstant() {
return browser_->instant();
}
-TabContentsWrapper* LocationBarViewGtk::GetTabContentsWrapper() const {
- return browser_->GetSelectedTabContentsWrapper();
+TabContents* LocationBarViewGtk::GetTabContents() const {
+ return browser_->GetActiveTabContents();
}
void LocationBarViewGtk::ShowFirstRunBubble() {
@@ -692,7 +692,7 @@ void LocationBarViewGtk::UpdateContentSettingsIcons() {
void LocationBarViewGtk::UpdatePageActions() {
std::vector<ExtensionAction*> page_actions;
- TabContentsWrapper* tab_contents = GetTabContentsWrapper();
+ TabContents* tab_contents = GetTabContents();
if (tab_contents) {
LocationBarController* controller =
tab_contents->extension_tab_helper()->location_bar_controller();
@@ -718,7 +718,7 @@ void LocationBarViewGtk::UpdatePageActions() {
WebContents* contents = GetWebContents();
if (!page_action_views_.empty() && contents) {
- GURL url = browser()->GetSelectedWebContents()->GetURL();
+ GURL url = browser()->GetActiveWebContents()->GetURL();
for (size_t i = 0; i < page_action_views_.size(); i++) {
page_action_views_[i]->UpdateVisibility(
@@ -816,9 +816,8 @@ void LocationBarViewGtk::Observe(int type,
if (type == chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED) {
// Only update if the updated action box was for the active tab contents.
- TabContentsWrapper* target_tab =
- content::Details<TabContentsWrapper>(details).ptr();
- if (target_tab == GetTabContentsWrapper())
+ TabContents* target_tab = content::Details<TabContents>(details).ptr();
+ if (target_tab == GetTabContents())
UpdatePageActions();
return;
}
@@ -1378,7 +1377,7 @@ void LocationBarViewGtk::ContentSettingImageViewGtk::UpdateFromWebContents(
TabSpecificContentSettings* content_settings = NULL;
if (web_contents) {
- content_settings = TabContentsWrapper::GetCurrentWrapperForContents(
+ content_settings = TabContents::GetOwningTabContentsForWebContents(
web_contents)->content_settings();
}
if (!content_settings || content_settings->IsBlockageIndicated(
@@ -1451,7 +1450,7 @@ void LocationBarViewGtk::ContentSettingImageViewGtk::AnimationCanceled(
gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnButtonPressed(
GtkWidget* sender, GdkEvent* event) {
- TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper();
+ TabContents* tab_contents = parent_->GetTabContents();
if (!tab_contents)
return TRUE;
Profile* profile = parent_->browser()->profile();
@@ -1750,7 +1749,7 @@ void LocationBarViewGtk::PageActionViewGtk::DisconnectPageActionAccelerator() {
gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed(
GtkWidget* sender,
GdkEventButton* event) {
- TabContentsWrapper* tab_contents = owner_->GetTabContentsWrapper();
+ TabContents* tab_contents = owner_->GetTabContents();
if (!tab_contents)
return TRUE;
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | chrome/browser/ui/views/location_bar/click_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698