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

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 9241032: Switch chrome code to use content::WebUI interface instead of WebUI concrete class. The latter wi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 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/printing/print_dialog_cloud.cc
===================================================================
--- chrome/browser/printing/print_dialog_cloud.cc (revision 117926)
+++ chrome/browser/printing/print_dialog_cloud.cc (working copy)
@@ -29,7 +29,6 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/browser/webui/web_ui.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -37,6 +36,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui.h"
#include "ui/base/l10n/l10n_util.h"
#include "webkit/glue/webpreferences.h"
@@ -311,7 +311,7 @@
// to the real server URL, now that we've gotten an HTML dialog
// going.
NavigationController* controller =
- &web_ui()->web_contents()->GetController();
+ &web_ui()->GetWebContents()->GetController();
NavigationEntry* pending_entry = controller->GetPendingEntry();
if (pending_entry) {
Profile* profile = Profile::FromWebUI(web_ui());
@@ -329,13 +329,13 @@
if (type == content::NOTIFICATION_LOAD_STOP) {
// Take the opportunity to set some (minimal) additional
// script permissions required for the web UI.
- GURL url = web_ui()->web_contents()->GetURL();
+ GURL url = web_ui()->GetWebContents()->GetURL();
GURL dialog_url = CloudPrintURL(
Profile::FromWebUI(web_ui())).GetCloudPrintServiceDialogURL();
if (url.host() == dialog_url.host() &&
url.path() == dialog_url.path() &&
url.scheme() == dialog_url.scheme()) {
- RenderViewHost* rvh = web_ui()->web_contents()->GetRenderViewHost();
+ RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost();
if (rvh && rvh->delegate()) {
WebPreferences webkit_prefs = rvh->delegate()->GetWebkitPrefs();
webkit_prefs.allow_scripts_to_close_windows = true;
@@ -361,7 +361,7 @@
void CloudPrintFlowHandler::ShowDebugger() {
if (web_ui()) {
- RenderViewHost* rvh = web_ui()->web_contents()->GetRenderViewHost();
+ RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost();
if (rvh)
DevToolsWindow::OpenDevToolsWindow(rvh);
}
@@ -441,9 +441,9 @@
}
void CloudPrintFlowHandler::StoreDialogClientSize() const {
- if (web_ui() && web_ui()->web_contents() &&
- web_ui()->web_contents()->GetView()) {
- gfx::Size size = web_ui()->web_contents()->GetView()->GetContainerSize();
+ if (web_ui() && web_ui()->GetWebContents() &&
+ web_ui()->GetWebContents()->GetView()) {
+ gfx::Size size = web_ui()->GetWebContents()->GetView()->GetContainerSize();
Profile* profile = Profile::FromWebUI(web_ui());
profile->GetPrefs()->SetInteger(prefs::kCloudPrintDialogWidth,
size.width());

Powered by Google App Engine
This is Rietveld 408576698