OLD | NEW |
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 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void ExtensionInstallDialogController::InstallUIAbort(bool user_initiated) { | 65 void ExtensionInstallDialogController::InstallUIAbort(bool user_initiated) { |
66 delegate_->InstallUIAbort(user_initiated); | 66 delegate_->InstallUIAbort(user_initiated); |
67 delegate_ = NULL; | 67 delegate_ = NULL; |
68 constrained_window_->CloseWebContentsModalDialog(); | 68 constrained_window_->CloseWebContentsModalDialog(); |
69 } | 69 } |
70 | 70 |
71 void ExtensionInstallDialogController::OnConstrainedWindowClosed( | 71 void ExtensionInstallDialogController::OnConstrainedWindowClosed( |
72 ConstrainedWindowMac* window) { | 72 ConstrainedWindowMac* window) { |
73 if (delegate_) | 73 if (delegate_) |
74 delegate_->InstallUIAbort(false); | 74 delegate_->InstallUIAbort(false); |
75 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 75 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
76 } | 76 } |
77 | 77 |
78 // static | 78 // static |
79 ExtensionInstallPrompt::ShowDialogCallback | 79 ExtensionInstallPrompt::ShowDialogCallback |
80 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { | 80 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { |
81 return base::Bind(&ShowExtensionInstallDialogImpl); | 81 return base::Bind(&ShowExtensionInstallDialogImpl); |
82 } | 82 } |
OLD | NEW |