summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthewyuan@chromium.org <matthewyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-11 04:30:42 +0000
committermatthewyuan@chromium.org <matthewyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-11 04:30:42 +0000
commit4ff767f871d5d76d9cd32a364cb8f416c08c715f (patch)
tree79cceaad90a1aadbb0d065b6a9e5d8f2b4751171
parent6f73a4286c2b429030f69348568c3830118fbd20 (diff)
downloadchromium_src-4ff767f871d5d76d9cd32a364cb8f416c08c715f.zip
chromium_src-4ff767f871d5d76d9cd32a364cb8f416c08c715f.tar.gz
chromium_src-4ff767f871d5d76d9cd32a364cb8f416c08c715f.tar.bz2
Temporary revert, will undo this tomorrow.
Revert 281449 "Merge 276372 "Fix print preview dialog for <webvi..." > Merge 276372 "Fix print preview dialog for <webview>." > > > Fix print preview dialog for <webview>. > > > > Make constrained window use embedder's native window > > (through its WebContents) instead of using webview's. > > > > After print preview got enabled by default, the code > > trying to bring up print preview dialog (a constrained > > window) started crashing the browser. > > > > Original bug 286487 > > BUG=375987 > > Test=In chromeos device/LinuxAura/Mac: load the sample > > browser app > > https://github.com/GoogleChrome/chrome-app-samples/tree/master/webview-samples/browser > > Navigate to a page that calls window.print() > > http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_print > > Click "Print this page" to trigger window.print() inside > > webview. > > It should > > 1) not crash > > 2) correctly show the preview and print the contents of > > the webview, not the entire app. This > > means it shouldn't print the chrome (address bar/buttons etc.) > > of the browser sample. > > > > Review URL: https://codereview.chromium.org/321193003 > > TBR=lazyboy@chromium.org > > Review URL: https://codereview.chromium.org/365323003 TBR=lazyboy@chromium.org Review URL: https://codereview.chromium.org/388743002 git-svn-id: svn://svn.chromium.org/chrome/branches/1985/src@282538 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm5
-rw-r--r--chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc7
2 files changed, 0 insertions, 12 deletions
diff --git a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
index 0843caa..9ec3864 100644
--- a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
@@ -7,7 +7,6 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_nsobject.h"
-#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -131,10 +130,6 @@ ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
WebDialogDelegate* delegate,
WebDialogWebContentsDelegate* tab_delegate,
content::WebContents* web_contents) {
- WebViewGuest* guest = WebViewGuest::FromWebContents(web_contents);
- if (guest && guest->embedder_web_contents())
- web_contents = guest->embedder_web_contents();
-
// Deleted when the dialog closes.
ConstrainedWebDialogDelegateViewMac* constrained_delegate =
new ConstrainedWebDialogDelegateViewMac(
diff --git a/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc b/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc
index 0cc0474..c3042b0 100644
--- a/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc
+++ b/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
@@ -203,12 +202,6 @@ ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
WebDialogDelegate* delegate,
WebDialogWebContentsDelegate* tab_delegate,
content::WebContents* web_contents) {
- WebViewGuest* guest = WebViewGuest::FromWebContents(web_contents);
- content::WebContents* embedder_web_contents =
- guest ? guest->embedder_web_contents() : NULL;
- if (embedder_web_contents)
- web_contents = embedder_web_contents;
-
ConstrainedWebDialogDelegateViewViews* constrained_delegate =
new ConstrainedWebDialogDelegateViewViews(
browser_context, delegate, tab_delegate);