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

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

Issue 12334073: Remove WebContents methods that duplicate WebContentsView methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_preview_dialog_controller.cc
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc
index 0f5fbfcbb042b7db47bc67038530dacdffc6863d..67184f4681fd0ccc276069da8558048cfdd5a451 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -40,6 +40,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_view.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
#include "webkit/plugins/webplugininfo.h"
@@ -127,7 +128,7 @@ void PrintPreviewTabDelegate::GetDialogSize(gfx::Size* size) const {
const gfx::Size kMinDialogSize(800, 480);
const int kBorder = 50;
gfx::Rect rect;
- initiator_tab_->GetContainerBounds(&rect);
+ initiator_tab_->GetView()->GetContainerBounds(&rect);
size->set_width(std::max(rect.width(), kMinDialogSize.width()) - kBorder);
size->set_height(std::max(rect.height(), kMinDialogSize.height()) - kBorder);
@@ -305,10 +306,6 @@ void PrintPreviewDialogController::EraseInitiatorTabInfo(
preview_tab_map_[preview_tab] = NULL;
}
-bool PrintPreviewDialogController::is_creating_print_preview_dialog() const {
- return is_creating_print_preview_dialog_;
-}
-
PrintPreviewDialogController::~PrintPreviewDialogController() {}
void PrintPreviewDialogController::OnRendererProcessClosed(
@@ -434,6 +431,9 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewTab(
AddObservers(initiator_tab);
AddObservers(preview_tab);
+ if (!print_preview_tab_created_callback_.is_null())
+ print_preview_tab_created_callback_.Run();
+
return preview_tab;
}
« no previous file with comments | « chrome/browser/printing/print_preview_dialog_controller.h ('k') | chrome/browser/speech/speech_recognition_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698