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

Side by Side Diff: chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc

Issue 23819028: Close Views constrained web dialog on interstitial WebUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/views/constrained_window_views.h" 8 #include "chrome/browser/ui/views/constrained_window_views.h"
9 #include "components/web_modal/web_contents_modal_dialog_host.h" 9 #include "components/web_modal/web_contents_modal_dialog_host.h"
10 #include "components/web_modal/web_contents_modal_dialog_manager.h" 10 #include "components/web_modal/web_contents_modal_dialog_manager.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 228 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
229 WebContentsModalDialogManager::FromWebContents(web_contents); 229 WebContentsModalDialogManager::FromWebContents(web_contents);
230 WebContentsModalDialogManagerDelegate* modal_delegate = 230 WebContentsModalDialogManagerDelegate* modal_delegate =
231 web_contents_modal_dialog_manager->delegate(); 231 web_contents_modal_dialog_manager->delegate();
232 DCHECK(modal_delegate); 232 DCHECK(modal_delegate);
233 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( 233 views::Widget* window = views::Widget::CreateWindowAsFramelessChild(
234 constrained_delegate, 234 constrained_delegate,
235 web_contents->GetView()->GetNativeView(), 235 web_contents->GetView()->GetNativeView(),
236 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 236 modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
237 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView()); 237 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView());
238 web_contents_modal_dialog_manager->SetCloseOnInterstitialWebUI(
239 window->GetNativeView(), true);
238 constrained_delegate->SetWindow(window); 240 constrained_delegate->SetWindow(window);
239 return constrained_delegate; 241 return constrained_delegate;
240 } 242 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698