Chromium Code Reviews| Index: chrome/browser/extensions/extension_tab_util.cc |
| diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc |
| index 4fc76cb88ee22959056c993c9f1fcc4d262da043..48d6b744ce483a77d797f24b681626162cd3b40c 100644 |
| --- a/chrome/browser/extensions/extension_tab_util.cc |
| +++ b/chrome/browser/extensions/extension_tab_util.cc |
| @@ -24,7 +24,6 @@ |
| #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| #include "chrome/common/extensions/api/tabs.h" |
| -#include "chrome/common/extensions/manifest_url_handler.h" |
| #include "chrome/common/url_constants.h" |
| #include "components/url_fixer/url_fixer.h" |
| #include "content/public/browser/favicon_status.h" |
| @@ -36,6 +35,7 @@ |
| #include "extensions/common/feature_switch.h" |
| #include "extensions/common/manifest_constants.h" |
| #include "extensions/common/manifest_handlers/incognito_info.h" |
| +#include "extensions/common/manifest_handlers/options_page_info.h" |
| #include "extensions/common/permissions/api_permission.h" |
| #include "extensions/common/permissions/permissions_data.h" |
| #include "url/gurl.h" |
| @@ -557,7 +557,7 @@ WindowController* ExtensionTabUtil::GetWindowControllerOfTab( |
| void ExtensionTabUtil::OpenOptionsPage(const Extension* extension, |
| Browser* browser) { |
| - DCHECK(!ManifestURL::GetOptionsPage(extension).is_empty()); |
| + DCHECK(!OptionsPageInfo::GetOptionsPage(extension).is_empty()); |
|
not at google - send to devlin
2014/08/29 05:39:23
At this point I realise there should be an Options
ericzeng
2014/08/29 22:08:49
Done.
|
| // Force the options page to open in non-OTR window, because it won't be |
| // able to save settings from OTR. |
| @@ -569,7 +569,8 @@ void ExtensionTabUtil::OpenOptionsPage(const Extension* extension, |
| browser = displayer->browser(); |
| } |
| - if (FeatureSwitch::embedded_extension_options()->IsEnabled()) { |
| + if (FeatureSwitch::embedded_extension_options()->IsEnabled() && |
| + !OptionsPageInfo::OpenInTab(extension)) { |
| // If embedded extension options are enabled, open chrome://extensions |
| // in a new tab and show the extension options in an embedded popup. |
| chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( |
| @@ -585,7 +586,7 @@ void ExtensionTabUtil::OpenOptionsPage(const Extension* extension, |
| chrome::ShowSingletonTabOverwritingNTP(browser, params); |
| } else { |
| // Otherwise open a new tab with the extension's options page |
| - content::OpenURLParams params(ManifestURL::GetOptionsPage(extension), |
| + content::OpenURLParams params(OptionsPageInfo::GetOptionsPage(extension), |
| content::Referrer(), |
| SINGLETON_TAB, |
| content::PAGE_TRANSITION_LINK, |