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

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

Issue 1918793004: MacViews: add extension install dialog to MacViewsWebUIDialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn build Created 4 years, 8 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 (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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h" 14 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h"
15 #include "chrome/browser/extensions/extension_install_prompt_show_params.h" 15 #include "chrome/browser/extensions/extension_install_prompt_show_params.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_dialogs.h"
17 #include "chrome/browser/ui/browser_finder.h" 18 #include "chrome/browser/ui/browser_finder.h"
18 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 19 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
19 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h" 20 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h"
20 #import "chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h " 21 #import "chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h "
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" 22 #include "chrome/browser/ui/tabs/tab_strip_model.h"
22 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
23 24
24 using extensions::ExperienceSamplingEvent; 25 using extensions::ExperienceSamplingEvent;
25 26
26 namespace { 27 namespace {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const char* decision_event) { 106 const char* decision_event) {
106 if (sampling_event_.get()) 107 if (sampling_event_.get())
107 sampling_event_->CreateUserDecisionEvent(decision_event); 108 sampling_event_->CreateUserDecisionEvent(decision_event);
108 base::ResetAndReturn(&done_callback_).Run(result); 109 base::ResetAndReturn(&done_callback_).Run(result);
109 constrained_window_->CloseWebContentsModalDialog(); 110 constrained_window_->CloseWebContentsModalDialog();
110 } 111 }
111 112
112 // static 113 // static
113 ExtensionInstallPrompt::ShowDialogCallback 114 ExtensionInstallPrompt::ShowDialogCallback
114 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { 115 ExtensionInstallPrompt::GetDefaultShowDialogCallback() {
116 if (chrome::ToolkitViewsWebUIDialogsEnabled())
117 return ExtensionInstallPrompt::GetViewsShowDialogCallback();
115 return base::Bind(&ShowExtensionInstallDialogImpl); 118 return base::Bind(&ShowExtensionInstallDialogImpl);
116 } 119 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/extensions/extension_install_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698