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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 10407122: Get rid of the last RenderViewHostDelegate usage in chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/ui/browser_navigator.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc (revision 138434)
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc (working copy)
@@ -46,8 +46,8 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/render_view_host_delegate.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_ui.h"
#include "printing/backend/print_backend.h"
#include "printing/metafile.h"
@@ -707,9 +707,10 @@
void PrintPreviewHandler::ActivateInitiatorTabAndClosePreviewTab() {
TabContentsWrapper* initiator_tab = GetInitiatorTab();
- if (initiator_tab)
- initiator_tab->web_contents()->GetRenderViewHost()->
- GetDelegate()->Activate();
+ if (initiator_tab) {
+ WebContents* web_contents = initiator_tab->web_contents();
+ web_contents->GetDelegate()->ActivateContents(web_contents);
+ }
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
web_ui()->GetController());
print_preview_ui->OnClosePrintPreviewTab();
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698