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

Unified Diff: chrome/browser/ui/webui/options2/advanced_options_handler2.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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/webui/options2/advanced_options_handler2.cc
===================================================================
--- chrome/browser/ui/webui/options2/advanced_options_handler2.cc (revision 116011)
+++ chrome/browser/ui/webui/options2/advanced_options_handler2.cc (working copy)
@@ -28,12 +28,12 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/page_zoom.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -362,8 +362,8 @@
SelectFileDialog::SELECT_FOLDER,
l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
pref_service->GetFilePath(prefs::kDownloadDefaultDirectory),
- NULL, 0, FILE_PATH_LITERAL(""), web_ui()->tab_contents(),
- web_ui()->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
+ NULL, 0, FILE_PATH_LITERAL(""), web_ui()->web_contents(),
+ web_ui()->web_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void AdvancedOptionsHandler::FileSelected(const FilePath& path, int index,
@@ -383,7 +383,7 @@
void AdvancedOptionsHandler::HandleAutoOpenButton(const ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles"));
DownloadManager* manager =
- web_ui()->tab_contents()->GetBrowserContext()->GetDownloadManager();
+ web_ui()->web_contents()->GetBrowserContext()->GetDownloadManager();
if (manager)
DownloadPrefs::FromDownloadManager(manager)->ResetAutoOpen();
}
@@ -453,14 +453,14 @@
#if !defined(OS_CHROMEOS)
void AdvancedOptionsHandler::ShowNetworkProxySettings(const ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ShowProxySettings"));
- AdvancedOptionsUtilities::ShowNetworkProxySettings(web_ui()->tab_contents());
+ AdvancedOptionsUtilities::ShowNetworkProxySettings(web_ui()->web_contents());
}
#endif
#if !defined(USE_NSS) && !defined(USE_OPENSSL)
void AdvancedOptionsHandler::ShowManageSSLCertificates(const ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ManageSSLCertificates"));
- AdvancedOptionsUtilities::ShowManageSSLCertificates(web_ui()->tab_contents());
+ AdvancedOptionsUtilities::ShowManageSSLCertificates(web_ui()->web_contents());
}
#endif
@@ -471,7 +471,7 @@
OpenURLParams params(
CloudPrintURL(profile).GetCloudPrintServiceManageURL(), Referrer(),
NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false);
- web_ui()->tab_contents()->OpenURL(params);
+ web_ui()->web_contents()->OpenURL(params);
}
#if !defined(OS_CHROMEOS)
@@ -483,7 +483,7 @@
CloudPrintURL(profile).GetCloudPrintServiceEnableURL(
CloudPrintProxyServiceFactory::GetForProfile(profile)->proxy_id()),
Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, false);
- web_ui()->tab_contents()->OpenURL(params);
+ web_ui()->web_contents()->OpenURL(params);
}
void AdvancedOptionsHandler::HandleDisableCloudPrintConnector(
@@ -613,7 +613,7 @@
// Set the enabled state for the AutoOpenFileTypesResetToDefault button.
// We enable the button if the user has any auto-open file types registered.
DownloadManager* manager =
- web_ui()->tab_contents()->GetBrowserContext()->GetDownloadManager();
+ web_ui()->web_contents()->GetBrowserContext()->GetDownloadManager();
bool disabled = !(manager &&
DownloadPrefs::FromDownloadManager(manager)->IsAutoOpenUsed());
base::FundamentalValue value(disabled);

Powered by Google App Engine
This is Rietveld 408576698