diff options
Diffstat (limited to 'chrome/browser/extensions')
6 files changed, 11 insertions, 25 deletions
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc index cae6bfd..ef10800 100644 --- a/chrome/browser/extensions/extension_browser_event_router.cc +++ b/chrome/browser/extensions/extension_browser_event_router.cc @@ -426,15 +426,12 @@ void ExtensionBrowserEventRouter::TabChangedAt(TabContents* contents, void ExtensionBrowserEventRouter::TabReplacedAt(TabContents* old_contents, TabContents* new_contents, - int index, - TabReplaceType type) { - if (type == REPLACE_MATCH_PREVIEW) { - // The ids of the two tabs should remain the same: - DCHECK_EQ(old_contents->controller().session_id().id(), - new_contents->controller().session_id().id()); - UnregisterForTabNotifications(old_contents); - RegisterForTabNotifications(new_contents); - } + int index) { + // The ids of the two tabs should remain the same: + DCHECK_EQ(old_contents->controller().session_id().id(), + new_contents->controller().session_id().id()); + UnregisterForTabNotifications(old_contents); + RegisterForTabNotifications(new_contents); } void ExtensionBrowserEventRouter::TabStripEmpty() {} diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/extension_browser_event_router.h index 2c02a1c..c2c7ca3 100644 --- a/chrome/browser/extensions/extension_browser_event_router.h +++ b/chrome/browser/extensions/extension_browser_event_router.h @@ -71,8 +71,7 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver, TabChangeType change_type); virtual void TabReplacedAt(TabContents* old_contents, TabContents* new_contents, - int index, - TabReplaceType type); + int index); virtual void TabStripEmpty(); // Page Action execute event. diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc index 2fb59c3..40bfc32 100644 --- a/chrome/browser/extensions/extension_message_service.cc +++ b/chrome/browser/extensions/extension_message_service.cc @@ -247,8 +247,8 @@ void ExtensionMessageService::OpenChannelToTab( } if (contents && contents->controller().needs_reload()) { - // The tab isn't loaded yet (it may be phantom). Don't attempt to connect. - // Treat this as a disconnect. + // The tab isn't loaded yet. Don't attempt to connect. Treat this as a + // disconnect. DispatchOnDisconnect(MessagePort(source, MSG_ROUTING_CONTROL), GET_OPPOSITE_PORT_ID(receiver_port_id)); return; @@ -336,7 +336,7 @@ int ExtensionMessageService::OpenSpecialChannelToTab( DCHECK(target_tab_contents); if (target_tab_contents->controller().needs_reload()) { - // The tab isn't loaded yet (it may be phantom). Don't attempt to connect. + // The tab isn't loaded yet. Don't attempt to connect. return -1; } diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 6cf9c42..016c3ec 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -800,13 +800,6 @@ bool RemoveTabFunction::RunImpl() { &browser, NULL, &contents, NULL, &error_)) return false; - int tab_index = browser->GetIndexOfController(&contents->controller()); - if (browser->tabstrip_model()->IsPhantomTab(tab_index)) { - // Don't allow closing phantom tabs. - error_ = keys::kCannotRemovePhantomTab; - return false; - } - // Close the tab in this convoluted way, since there's a chance that the tab // is being dragged, or we're in some other nested event loop. This code path // should ensure that the tab is safely closed under such circumstances, @@ -1003,8 +996,7 @@ bool DetectTabLanguageFunction::RunImpl() { } if (contents->controller().needs_reload()) { - // If the tab hasn't been loaded, such as happens with phantom tabs, don't - // wait for the tab to load, instead return. + // If the tab hasn't been loaded, don't wait for the tab to load. error_ = keys::kCannotDetermineLanguageOfUnloadedTab; return false; } diff --git a/chrome/browser/extensions/extension_tabs_module_constants.cc b/chrome/browser/extensions/extension_tabs_module_constants.cc index d1647f8..c7c515b 100644 --- a/chrome/browser/extensions/extension_tabs_module_constants.cc +++ b/chrome/browser/extensions/extension_tabs_module_constants.cc @@ -68,7 +68,6 @@ const char kMoreThanOneValuesError[] = "Code and file should not be specified " "at the same time in the second argument."; const char kLoadFileError[] = "Failed to load file: \"*\". "; const char kCannotUpdatePinnedTab[] = "Cannot update pinned tabs"; -const char kCannotRemovePhantomTab[] = "Cannot remove phantom tabs"; const char kCannotDetermineLanguageOfUnloadedTab[] = "Cannot determine language: tab not loaded"; diff --git a/chrome/browser/extensions/extension_tabs_module_constants.h b/chrome/browser/extensions/extension_tabs_module_constants.h index 3f0ddc0..79bd9a4 100644 --- a/chrome/browser/extensions/extension_tabs_module_constants.h +++ b/chrome/browser/extensions/extension_tabs_module_constants.h @@ -69,7 +69,6 @@ extern const char kNoCodeOrFileToExecuteError[]; extern const char kMoreThanOneValuesError[]; extern const char kLoadFileError[]; extern const char kCannotUpdatePinnedTab[]; -extern const char kCannotRemovePhantomTab[]; extern const char kCannotDetermineLanguageOfUnloadedTab[]; }; // namespace extension_tabs_module_constants |