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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 1 month 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
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/extensions/extension_uninstall_dialog.h" 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Close the widget (the views framework will delete view_). 110 // Close the widget (the views framework will delete view_).
111 if (view_) { 111 if (view_) {
112 view_->DialogDestroyed(); 112 view_->DialogDestroyed();
113 view_->GetWidget()->CloseNow(); 113 view_->GetWidget()->CloseNow();
114 } 114 }
115 } 115 }
116 116
117 void ExtensionUninstallDialogViews::Show() { 117 void ExtensionUninstallDialogViews::Show() {
118 view_ = new ExtensionUninstallDialogDelegateView( 118 view_ = new ExtensionUninstallDialogDelegateView(
119 this, extension_, triggering_extension_, &icon_); 119 this, extension_, triggering_extension_, &icon_);
120 CreateBrowserModalDialogViews(view_, parent_)->Show(); 120 CreateWindowModalDialogViews(view_, parent_)->Show();
121 } 121 }
122 122
123 void ExtensionUninstallDialogViews::ExtensionUninstallAccepted() { 123 void ExtensionUninstallDialogViews::ExtensionUninstallAccepted() {
124 // The widget gets destroyed when the dialog is accepted. 124 // The widget gets destroyed when the dialog is accepted.
125 view_->DialogDestroyed(); 125 view_->DialogDestroyed();
126 view_ = NULL; 126 view_ = NULL;
127 delegate_->ExtensionUninstallAccepted(); 127 delegate_->ExtensionUninstallAccepted();
128 } 128 }
129 129
130 void ExtensionUninstallDialogViews::ExtensionUninstallCanceled() { 130 void ExtensionUninstallDialogViews::ExtensionUninstallCanceled() {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 } // namespace 232 } // namespace
233 233
234 // static 234 // static
235 extensions::ExtensionUninstallDialog* 235 extensions::ExtensionUninstallDialog*
236 extensions::ExtensionUninstallDialog::Create(Profile* profile, 236 extensions::ExtensionUninstallDialog::Create(Profile* profile,
237 gfx::NativeWindow parent, 237 gfx::NativeWindow parent,
238 Delegate* delegate) { 238 Delegate* delegate) {
239 return new ExtensionUninstallDialogViews(profile, parent, delegate); 239 return new ExtensionUninstallDialogViews(profile, parent, delegate);
240 } 240 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698