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

Unified Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 6693054: Get rid of extensions dependency from content\browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.h ('k') | chrome/browser/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.cc
===================================================================
--- chrome/browser/tabs/tab_strip_model.cc (revision 80243)
+++ chrome/browser/tabs/tab_strip_model.cc (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service.h"
@@ -117,7 +118,8 @@
int add_types) {
bool foreground = add_types & ADD_SELECTED;
// Force app tabs to be pinned.
- bool pin = contents->is_app() || add_types & ADD_PINNED;
+ bool pin =
+ contents->extension_tab_helper()->is_app() || add_types & ADD_PINNED;
index = ConstrainInsertionIndex(index, pin);
// In tab dragging situations, if the last tab in the window was detached
@@ -545,7 +547,7 @@
bool TabStripModel::IsAppTab(int index) const {
TabContentsWrapper* contents = GetTabContentsAt(index);
- return contents && contents->is_app();
+ return contents && contents->extension_tab_helper()->is_app();
}
bool TabStripModel::IsTabBlocked(int index) const {
@@ -997,7 +999,7 @@
// Iterate backwards as we may remove items while iterating.
for (int i = count() - 1; i >= 0; i--) {
TabContentsWrapper* contents = GetTabContentsAt(i);
- if (contents->extension_app() == extension) {
+ if (contents->extension_tab_helper()->extension_app() == extension) {
// The extension an app tab was created from has been nuked. Delete
// the TabContents. Deleting a TabContents results in a notification
// of type TAB_CONTENTS_DESTROYED; we do the necessary cleanup in
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.h ('k') | chrome/browser/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698