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

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

Issue 23903025: Close Views HTML authentication and tab modal confirm dialogs 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 | « chrome/browser/ui/views/login_prompt_views.cc ('k') | 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/views/tab_modal_confirm_dialog_views.h" 5 #include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser_dialogs.h" 8 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 56 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
57 WebContentsModalDialogManager::FromWebContents(web_contents); 57 WebContentsModalDialogManager::FromWebContents(web_contents);
58 WebContentsModalDialogManagerDelegate* modal_delegate = 58 WebContentsModalDialogManagerDelegate* modal_delegate =
59 web_contents_modal_dialog_manager->delegate(); 59 web_contents_modal_dialog_manager->delegate();
60 DCHECK(modal_delegate); 60 DCHECK(modal_delegate);
61 dialog_ = views::Widget::CreateWindowAsFramelessChild( 61 dialog_ = views::Widget::CreateWindowAsFramelessChild(
62 this, 62 this,
63 web_contents->GetView()->GetNativeView(), 63 web_contents->GetView()->GetNativeView(),
64 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 64 modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
65 web_contents_modal_dialog_manager->ShowDialog(dialog_->GetNativeView()); 65 web_contents_modal_dialog_manager->ShowDialog(dialog_->GetNativeView());
66 web_contents_modal_dialog_manager->SetCloseOnInterstitialWebUI(
67 dialog_->GetNativeView(), true);
66 delegate_->set_close_delegate(this); 68 delegate_->set_close_delegate(this);
67 } 69 }
68 70
69 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() { 71 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() {
70 } 72 }
71 73
72 void TabModalConfirmDialogViews::AcceptTabModalDialog() { 74 void TabModalConfirmDialogViews::AcceptTabModalDialog() {
73 GetDialogClientView()->AcceptWindow(); 75 GetDialogClientView()->AcceptWindow();
74 } 76 }
75 77
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 delete this; 148 delete this;
147 } 149 }
148 150
149 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { 151 ui::ModalType TabModalConfirmDialogViews::GetModalType() const {
150 #if defined(USE_ASH) 152 #if defined(USE_ASH)
151 return ui::MODAL_TYPE_CHILD; 153 return ui::MODAL_TYPE_CHILD;
152 #else 154 #else
153 return views::WidgetDelegate::GetModalType(); 155 return views::WidgetDelegate::GetModalType();
154 #endif 156 #endif
155 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_prompt_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698