| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chooser_dialog_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 void ChooserDialogCocoa::Dismissed() { | 60 void ChooserDialogCocoa::Dismissed() { |
| 61 if (constrained_window_) | 61 if (constrained_window_) |
| 62 constrained_window_->CloseWebContentsModalDialog(); | 62 constrained_window_->CloseWebContentsModalDialog(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ChromeExtensionChooserDialog::ShowDialog( | 65 void ChromeExtensionChooserDialog::ShowDialog( |
| 66 ChooserController* chooser_controller) const { | 66 ChooserController* chooser_controller) const { |
| 67 web_modal::WebContentsModalDialogManager* manager = | 67 web_modal::WebContentsModalDialogManager* manager = |
| 68 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents()); | 68 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents_); |
| 69 if (manager) { | 69 if (manager) { |
| 70 // These objects will delete themselves when the dialog closes. | 70 // These objects will delete themselves when the dialog closes. |
| 71 ChooserDialogCocoa* chooser_dialog = | 71 ChooserDialogCocoa* chooser_dialog = |
| 72 new ChooserDialogCocoa(web_contents(), chooser_controller); | 72 new ChooserDialogCocoa(web_contents_, chooser_controller); |
| 73 chooser_dialog->ShowDialog(); | 73 chooser_dialog->ShowDialog(); |
| 74 } | 74 } |
| 75 } | 75 } |
| OLD | NEW |