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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.mm

Issue 2127883003: Move chooser_controller directory from //components to //chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 5 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
OLDNEW
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"
11 #include "chrome/browser/chooser_controller/chooser_controller.h"
11 #include "chrome/browser/extensions/chrome_extension_chooser_dialog.h" 12 #include "chrome/browser/extensions/chrome_extension_chooser_dialog.h"
12 #include "chrome/browser/ui/browser_dialogs.h" 13 #include "chrome/browser/ui/browser_dialogs.h"
13 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 14 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
14 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h" 15 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h"
15 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h" 16 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h"
16 #include "components/chooser_controller/chooser_controller.h"
17 #include "components/web_modal/web_contents_modal_dialog_manager.h" 17 #include "components/web_modal/web_contents_modal_dialog_manager.h"
18 18
19 ChooserDialogCocoa::ChooserDialogCocoa( 19 ChooserDialogCocoa::ChooserDialogCocoa(
20 content::WebContents* web_contents, 20 content::WebContents* web_contents,
21 std::unique_ptr<ChooserController> chooser_controller) 21 std::unique_ptr<ChooserController> chooser_controller)
22 : web_contents_(web_contents) { 22 : web_contents_(web_contents) {
23 DCHECK(web_contents_); 23 DCHECK(web_contents_);
24 DCHECK(chooser_controller); 24 DCHECK(chooser_controller);
25 chooser_dialog_cocoa_controller_.reset([[ChooserDialogCocoaController alloc] 25 chooser_dialog_cocoa_controller_.reset([[ChooserDialogCocoaController alloc]
26 initWithChooserDialogCocoa:this 26 initWithChooserDialogCocoa:this
(...skipping 30 matching lines...) Expand all
57 57
58 web_modal::WebContentsModalDialogManager* manager = 58 web_modal::WebContentsModalDialogManager* manager =
59 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents_); 59 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents_);
60 if (manager) { 60 if (manager) {
61 // These objects will delete themselves when the dialog closes. 61 // These objects will delete themselves when the dialog closes.
62 ChooserDialogCocoa* chooser_dialog = 62 ChooserDialogCocoa* chooser_dialog =
63 new ChooserDialogCocoa(web_contents_, std::move(chooser_controller)); 63 new ChooserDialogCocoa(web_contents_, std::move(chooser_controller));
64 chooser_dialog->ShowDialog(); 64 chooser_dialog->ShowDialog();
65 } 65 }
66 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698