summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.h5
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_unittest.cc2
-rw-r--r--chrome/browser/chromeos/login/simple_web_view_dialog.cc2
-rw-r--r--chrome/browser/chromeos/login/simple_web_view_dialog.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm17
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm4
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc25
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.h2
-rw-r--r--chrome/browser/ui/views/location_bar/click_handler.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.cc6
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc23
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.h5
-rw-r--r--chrome/browser/ui/views/location_bar/page_action_image_view.cc4
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc4
-rw-r--r--chrome/browser/ui/views/toolbar_view.h2
17 files changed, 56 insertions, 61 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 46c6b39..be0cf1f 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -40,7 +40,7 @@
#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/omnibox/omnibox_view.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/chrome_switches.h"
#include "chrome/common/metrics/proto/omnibox_event.pb.h"
@@ -522,7 +522,7 @@ void AutocompleteEditModel::OpenMatch(const AutocompleteMatch& match,
autocomplete_controller_->input().type(),
popup_->selected_line(),
-1, // don't yet know tab ID; set later if appropriate
- ClassifyPage(controller_->GetTabContentsWrapper()->
+ ClassifyPage(controller_->GetTabContents()->
web_contents()->GetURL()),
base::TimeTicks::Now() - time_user_first_modified_omnibox_,
0, // inline autocomplete length; possibly set later
@@ -538,7 +538,7 @@ void AutocompleteEditModel::OpenMatch(const AutocompleteMatch& match,
// If we know the destination is being opened in the current tab,
// we can easily get the tab ID. (If it's being opened in a new
// tab, we don't know the tab ID yet.)
- log.tab_id = controller_->GetTabContentsWrapper()->
+ log.tab_id = controller_->GetTabContents()->
restore_tab_helper()->session_id().id();
}
autocomplete_controller_->AddProvidersInfo(&log.providers_info);
@@ -1098,7 +1098,7 @@ void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) {
// It's possible the tab strip does not have an active tab contents, for
// instance if the tab has been closed or on return from a sleep state
// (http://crbug.com/105689)
- TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
+ TabContents* tab = controller_->GetTabContents();
if (!tab)
return;
prerender::PrerenderManager* prerender_manager =
diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h
index dba8702..06b6a06 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -28,7 +28,6 @@ class OmniboxView;
class Profile;
class SkBitmap;
class TabContents;
-typedef TabContents TabContentsWrapper;
namespace gfx {
class Rect;
@@ -81,8 +80,8 @@ class AutocompleteEditController {
// Returns the InstantController, or NULL if instant is not enabled.
virtual InstantController* GetInstant() = 0;
- // Returns the TabContentsWrapper of the currently selected tab.
- virtual TabContentsWrapper* GetTabContentsWrapper() const = 0;
+ // Returns the TabContents of the currently active tab.
+ virtual TabContents* GetTabContents() const = 0;
protected:
virtual ~AutocompleteEditController();
diff --git a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
index 2037156..37544d9 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc
@@ -99,7 +99,7 @@ class TestingAutocompleteEditController : public AutocompleteEditController {
virtual SkBitmap GetFavicon() const OVERRIDE { return SkBitmap(); }
virtual string16 GetTitle() const OVERRIDE { return string16(); }
virtual InstantController* GetInstant() OVERRIDE { return NULL; }
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE {
+ virtual TabContents* GetTabContents() const OVERRIDE {
return NULL;
}
diff --git a/chrome/browser/chromeos/login/simple_web_view_dialog.cc b/chrome/browser/chromeos/login/simple_web_view_dialog.cc
index 9051b96..085e978 100644
--- a/chrome/browser/chromeos/login/simple_web_view_dialog.cc
+++ b/chrome/browser/chromeos/login/simple_web_view_dialog.cc
@@ -266,7 +266,7 @@ void SimpleWebViewDialog::LoadingStateChanged(WebContents* source) {
command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading);
}
-TabContentsWrapper* SimpleWebViewDialog::GetTabContentsWrapper() const {
+TabContents* SimpleWebViewDialog::GetTabContents() const {
return NULL;
}
diff --git a/chrome/browser/chromeos/login/simple_web_view_dialog.h b/chrome/browser/chromeos/login/simple_web_view_dialog.h
index 7bb0308..3d15ffe 100644
--- a/chrome/browser/chromeos/login/simple_web_view_dialog.h
+++ b/chrome/browser/chromeos/login/simple_web_view_dialog.h
@@ -71,7 +71,7 @@ class SimpleWebViewDialog : public views::ButtonListener,
// Implements LocationBarView::Delegate:
virtual void NavigationStateChanged(const content::WebContents* source,
unsigned changed_flags) OVERRIDE;
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE;
+ virtual TabContents* GetTabContents() const OVERRIDE;
virtual InstantController* GetInstant() OVERRIDE;
virtual views::Widget* CreateViewsBubble(
views::BubbleDelegateView* bubble_delegate) OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 38ea57f..53693c6 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -147,7 +147,7 @@ class LocationBarViewMac : public AutocompleteEditController,
virtual SkBitmap GetFavicon() const OVERRIDE;
virtual string16 GetTitle() const OVERRIDE;
virtual InstantController* GetInstant() OVERRIDE;
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE;
+ virtual TabContents* GetTabContents() const OVERRIDE;
NSImage* GetKeywordImage(const string16& keyword);
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index e62a1ce..909f944 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -48,7 +48,7 @@
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/browser/ui/content_settings/content_setting_image_model.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"
@@ -318,8 +318,8 @@ InstantController* LocationBarViewMac::GetInstant() {
return browser_->instant();
}
-TabContentsWrapper* LocationBarViewMac::GetTabContentsWrapper() const {
- return browser_->GetSelectedTabContentsWrapper();
+TabContents* LocationBarViewMac::GetTabContents() const {
+ return browser_->GetActiveTabContents();
}
void LocationBarViewMac::Revert() {
@@ -353,7 +353,7 @@ int LocationBarViewMac::PageActionVisibleCount() {
}
WebContents* LocationBarViewMac::GetWebContents() const {
- return browser_->GetSelectedWebContents();
+ return browser_->GetActiveWebContents();
}
PageActionDecoration* LocationBarViewMac::GetPageActionDecoration(
@@ -539,9 +539,8 @@ void LocationBarViewMac::Observe(int type,
case 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();
break;
}
@@ -572,7 +571,7 @@ void LocationBarViewMac::PostNotification(NSString* notification) {
bool LocationBarViewMac::RefreshContentSettingsDecorations() {
const bool input_in_progress = toolbar_model_->input_in_progress();
WebContents* web_contents =
- input_in_progress ? NULL : browser_->GetSelectedWebContents();
+ input_in_progress ? NULL : browser_->GetActiveWebContents();
bool icons_updated = false;
for (size_t i = 0; i < content_setting_decorations_.size(); ++i) {
icons_updated |=
@@ -598,7 +597,7 @@ void LocationBarViewMac::RefreshPageActionDecorations() {
std::vector<ExtensionAction*> page_actions;
- TabContentsWrapper* tab_contents = GetTabContentsWrapper();
+ TabContents* tab_contents = GetTabContents();
if (!tab_contents) {
DeletePageActionDecorations(); // Necessary?
return;
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index c961e6e..778ce2e 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -17,7 +17,7 @@
#import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
#include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.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_action.h"
#include "chrome/common/extensions/extension_resource.h"
@@ -91,7 +91,7 @@ bool PageActionDecoration::AcceptsMousePress() {
// Either notify listeners or show a popup depending on the Page
// Action.
bool PageActionDecoration::OnMousePressed(NSRect frame) {
- TabContentsWrapper* tab_contents = owner_->GetTabContentsWrapper();
+ TabContents* tab_contents = owner_->GetTabContents();
if (!tab_contents) {
// We don't want other code to try and handle this click. Returning true
// prevents this by indicating that we handled it.
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 3f51f16..46f57bd 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;
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
index 4a0fbce..67b79b4 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -117,7 +117,7 @@ class LocationBarViewGtk : public AutocompleteEditController,
virtual SkBitmap GetFavicon() const OVERRIDE;
virtual string16 GetTitle() const OVERRIDE;
virtual InstantController* GetInstant() OVERRIDE;
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE;
+ virtual TabContents* GetTabContents() const OVERRIDE;
// Implement the LocationBar interface.
virtual void ShowFirstRunBubble() OVERRIDE;
diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc
index a087e4c..7be1bfc 100644
--- a/chrome/browser/ui/views/location_bar/click_handler.cc
+++ b/chrome/browser/ui/views/location_bar/click_handler.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/views/location_bar/click_handler.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -30,7 +30,7 @@ void ClickHandler::OnMouseReleased(const views::MouseEvent& event) {
if (location_bar_->GetLocationEntry()->IsEditingOrEmpty())
return;
- WebContents* tab = location_bar_->GetTabContentsWrapper()->web_contents();
+ WebContents* tab = location_bar_->GetTabContents()->web_contents();
const NavigationController& controller = tab->GetController();
NavigationEntry* nav_entry = controller.GetActiveEntry();
if (!nav_entry) {
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index c9d315e..49371f1 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/browser/ui/content_settings/content_setting_image_model.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/views/content_setting_bubble_contents.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "content/public/browser/web_contents.h"
@@ -80,7 +80,7 @@ void ContentSettingImageView::UpdateFromWebContents(WebContents* web_contents) {
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(
@@ -166,7 +166,7 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) {
if (!HitTest(event.location()))
return;
- TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper();
+ TabContents* tab_contents = parent_->GetTabContents();
if (!tab_contents)
return;
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index fac4d7d..e32bd74 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -29,7 +29,7 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/location_bar/action_box_button_view.h"
@@ -78,8 +78,8 @@ using views::View;
namespace {
WebContents* GetWebContentsFromDelegate(LocationBarView::Delegate* delegate) {
- const TabContentsWrapper* wrapper = delegate->GetTabContentsWrapper();
- return wrapper ? wrapper->web_contents() : NULL;
+ const TabContents* tab_contents = delegate->GetTabContents();
+ return tab_contents ? tab_contents->web_contents() : NULL;
}
// A utility function to cast OmniboxView to OmniboxViewViews.
@@ -937,7 +937,7 @@ void LocationBarView::OnSetFocus() {
}
SkBitmap LocationBarView::GetFavicon() const {
- return delegate_->GetTabContentsWrapper()->favicon_tab_helper()->GetFavicon();
+ return delegate_->GetTabContents()->favicon_tab_helper()->GetFavicon();
}
string16 LocationBarView::GetTitle() const {
@@ -948,8 +948,8 @@ InstantController* LocationBarView::GetInstant() {
return delegate_->GetInstant();
}
-TabContentsWrapper* LocationBarView::GetTabContentsWrapper() const {
- return delegate_->GetTabContentsWrapper();
+TabContents* LocationBarView::GetTabContents() const {
+ return delegate_->GetTabContents();
}
int LocationBarView::AvailableWidth(int location_bar_width) {
@@ -1004,7 +1004,7 @@ void LocationBarView::RefreshPageActionViews() {
std::vector<ExtensionAction*> page_actions;
- TabContentsWrapper* tab_contents = GetTabContentsWrapper();
+ TabContents* tab_contents = GetTabContents();
if (tab_contents) {
extensions::LocationBarController* controller =
tab_contents->extension_tab_helper()->location_bar_controller();
@@ -1038,7 +1038,7 @@ void LocationBarView::RefreshPageActionViews() {
if (!page_action_views_.empty() && contents) {
Browser* browser =
browser::FindBrowserForController(&contents->GetController(), NULL);
- GURL url = browser->GetSelectedWebContents()->GetURL();
+ GURL url = browser->GetActiveWebContents()->GetURL();
for (PageActionViews::const_iterator i(page_action_views_.begin());
i != page_action_views_.end(); ++i) {
@@ -1155,7 +1155,7 @@ void LocationBarView::WriteDragDataForView(views::View* sender,
DCHECK_NE(GetDragOperationsForView(sender, press_pt),
ui::DragDropTypes::DRAG_NONE);
- TabContentsWrapper* tab_contents = delegate_->GetTabContentsWrapper();
+ TabContents* tab_contents = delegate_->GetTabContents();
DCHECK(tab_contents);
button_drag_utils::SetURLAndDragImage(
tab_contents->web_contents()->GetURL(),
@@ -1322,9 +1322,8 @@ void LocationBarView::Observe(int type,
case 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();
break;
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index d080f6a..5b448bf 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -50,7 +50,6 @@ class SelectedKeywordView;
class StarView;
class SuggestedTextView;
class TabContents;
-typedef TabContents TabContentsWrapper;
class TemplateURLService;
namespace views {
@@ -88,7 +87,7 @@ class LocationBarView : public LocationBar,
class Delegate {
public:
// Should return the current tab contents.
- virtual TabContentsWrapper* GetTabContentsWrapper() const = 0;
+ virtual TabContents* GetTabContents() const = 0;
// Returns the InstantController, or NULL if there isn't one.
virtual InstantController* GetInstant() = 0;
@@ -258,7 +257,7 @@ class LocationBarView : public LocationBar,
virtual SkBitmap GetFavicon() const OVERRIDE;
virtual string16 GetTitle() const OVERRIDE;
virtual InstantController* GetInstant() OVERRIDE;
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE;
+ virtual TabContents* GetTabContents() const OVERRIDE;
// Overridden from views::View:
virtual std::string GetClassName() const OVERRIDE;
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index f266fee..46ff5f2 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/common/chrome_notification_types.h"
@@ -93,7 +93,7 @@ PageActionImageView::~PageActionImageView() {
}
void PageActionImageView::ExecuteAction(int button) {
- TabContentsWrapper* tab_contents = owner_->GetTabContentsWrapper();
+ TabContents* tab_contents = owner_->GetTabContents();
if (!tab_contents)
return;
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 2f12389..0e5ec58 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -377,8 +377,8 @@ void ToolbarView::OnMenuButtonClicked(views::View* source,
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, LocationBarView::Delegate implementation:
-TabContentsWrapper* ToolbarView::GetTabContentsWrapper() const {
- return browser_->GetSelectedTabContentsWrapper();
+TabContents* ToolbarView::GetTabContents() const {
+ return browser_->GetActiveTabContents();
}
InstantController* ToolbarView::GetInstant() {
diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h
index d3e67bc..8bbd22c 100644
--- a/chrome/browser/ui/views/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar_view.h
@@ -91,7 +91,7 @@ class ToolbarView : public views::AccessiblePaneView,
const gfx::Point& point) OVERRIDE;
// Overridden from LocationBarView::Delegate:
- virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE;
+ virtual TabContents* GetTabContents() const OVERRIDE;
virtual InstantController* GetInstant() OVERRIDE;
virtual views::Widget* CreateViewsBubble(
views::BubbleDelegateView* bubble_delegate) OVERRIDE;