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

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

Issue 7880003: content: Move constrained window code from TabContents to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix views merge part 2 Created 9 years, 3 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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 00baca8d266a850da7e56963054d3026b381d28f..dc98db2a8934e924178b81c5638201c5c18fbb14 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -94,6 +94,7 @@
#include "chrome/browser/ui/browser_synced_window_delegate.h"
#include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/constrained_window_tab_helper.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
@@ -3510,15 +3511,6 @@ void Browser::ContentsZoomChange(bool zoom_in) {
ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS);
}
-void Browser::SetTabContentBlocked(TabContents* contents, bool blocked) {
- int index = tabstrip_model()->GetWrapperIndex(contents);
- if (index == TabStripModel::kNoTab) {
- NOTREACHED();
- return;
- }
- tabstrip_model()->SetTabBlocked(index, blocked);
-}
-
void Browser::TabContentsFocused(TabContents* tab_content) {
window_->TabContentsFocused(tab_content);
}
@@ -4162,6 +4154,15 @@ void Browser::SwapTabContents(TabContentsWrapper* old_tab_contents,
new_tab_contents);
}
+void Browser::SetTabContentBlocked(TabContentsWrapper* wrapper, bool blocked) {
+ int index = tabstrip_model()->GetIndexOfTabContents(wrapper);
+ if (index == TabStripModel::kNoTab) {
+ NOTREACHED();
+ return;
+ }
+ tabstrip_model()->SetTabBlocked(index, blocked);
+}
+
void Browser::SetSuggestedText(const string16& text,
InstantCompleteBehavior behavior) {
if (window()->GetLocationBar())
@@ -4941,6 +4942,7 @@ void Browser::SetAsDelegate(TabContentsWrapper* tab, Browser* delegate) {
// ...and all the helpers.
tab->blocked_content_tab_helper()->set_delegate(delegate);
tab->bookmark_tab_helper()->set_delegate(delegate);
+ tab->constrained_window_tab_helper()->set_delegate(delegate);
tab->search_engine_tab_helper()->set_delegate(delegate);
}

Powered by Google App Engine
This is Rietveld 408576698